Subject: Re: pkgsrc bootstrap kit for Solaris 10?
To: Malcolm Herbert <mjch@mjch.net>
From: Raymond Meyer <raymond.meyer@rambler.ru>
List: tech-pkg
Date: 08/21/2006 13:48:45
On Mon, 21 Aug 2006 18:27:37 +1000
Malcolm Herbert <mjch@mjch.net> wrote:

> Is there any particular benefit in running the native Sun compiler any
> more? I thought so initially however work colleague says that the Sun
> packaged gcc has been retro-fitted with the Sun code optimisations and
> therefore code produced by it isn't as different in performance as
> it has been in the past ... is that the case? I have been able to do
> _something_ with gcc before today so may yet be able to use it ... 

Sun compilers produce faster executables on SPARC architecture. I reluctantly
use GCC and only for those packages that have sloppy C/C++ code and don't
compile with anything but GCC.

In regard to your package builds hanging, I don't know what might be causing it.
I would suggest using the latest snapshot of pkgsrc, also try putting the
following in your mk.conf file:

_ACCEPTABLE=yes
DEPENDS_TARGET=package

# -- On Solaris some packages fail to build when this variable is not set
PREFER_PKGSRC=yes

PREFER_NATIVE=solaris-pam

# -- Adjust LOCALBASE and PKG_DBDIR for your site
LOCALBASE=/opt/pkg
VARBASE=/var
PKG_DBDIR=${LOCALBASE}/db/pkg
PKG_TOOLS_BIN=${LOCALBASE}/sbin
PKGMANDIR=man
TOOLS_PLATFORM.awk?=${LOCALBASE}/bin/nawk
TOOLS_PLATFORM.sed?=${LOCALBASE}/bin/nbsed
TOOLS_PLATFORM.pax?=${LOCALBASE}/bin/pax
TOOLS_PLATFORM.tar?=${LOCALBASE}/bin/tar
TOOLS_PLATFORM.mtree?=${LOCALBASE}/sbin/mtree
FETCH_CMD?=${LOCALBASE}/bin/ftp

PACKAGES=/opt/pkg.packages
WRKOBJDIR=/opt/pkg.obj
DISTDIR=/opt/distfiles

PKGSRC_COMPILER=sunpro
CC=/opt/SUNWspro/bin/cc
CXX=/opt/SUNWspro/bin/CC

_PKGSRC_COPTS=-xO3 -xtarget=native -xbuiltin -xdepend=yes -xlibmil -xlibmopt
_PKGSRC_CFLAGS=${_PKGSRC_COPTS} -xstrconst -Xa
_PKGSRC_CXXFLAGS=${_PKGSRC_COPTS} -features=%all

COPTS=${_PKGSRC_COPTS}
CFLAGS=${_PKGSRC_CFLAGS}
CXXFLAGS=${_PKGSRC_CXXFLAGS}

Also make sure PATH is set to:

/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ccs/lib:/opt/pkg/bin:/opt/pkg/sbin:/usr/xpg4/bin:/usr/bin:/sbin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin

If you install your packages to /usr/pkg then replace /opt/pkg with /usr/pkg