Subject: Re: problems with Solaris 8 and pkgsrc
To: None <tech-pkg@netbsd.org>
From: Hal Snyder <hal@vailsys.com>
List: tech-pkg
Date: 10/25/2003 17:44:06
Ryan Cresawn <cresawn@chass.utoronto.ca> writes:

> I've been trying to get gcc3-3.3nb5 to compile on Solaris 8 (sparc64)
> now for some time and I'm really having problems.  I will also add
> that I've had similar problems on IRIX64.  Each platform has its own
> unique set of problems.  My goal is to have a simple method for
> keeping all the software current on the servers I administer.  It
> seems like 'pkgsrc' is the perfect tool to that end, if I could only
> get it working completely.

Sorry, my SparcStation died recently - but I can tell you what works
on x86 Solaris 8.

>
...
> What I'm hoping for is that someone will write me with explicit
> instructions such as:
>
> 1 - remove all your homegrown Solaris packages
> 2 - install Sun's freeware GCC package
> 3 - set PATH to "/usr/pkg/sbin:/usr/pkg/bin:/usr/local/bin:/usr/bin"
> 4 - type 'bmake install' in the "/usr/pkgsrc/lang/gcc3" directory

Here's what we did. Nothing needs to be removed. It's basically
following the directions on the pkgsrc page
  http://www.netbsd.org/Documentation/software/packages.html

We already had assorted freeware packages installed for gcc and gzip,
running out of /usr/local and /opt/sfw. All pkgsrc work goes to
/usr/pkg and /usr/pkgsrc. We created a pkgsrc pseudo user and group to
own the /usr/pkgsrc tree.

0. put /usr/pkg/bin:/usr/pkg/sbin at front of your PATH

1. from netbsd anoncvs, check out othersrc/bootstrap-pkgsrc

2. cd othersrc/bootstrap-pkgsrc
   sudo ./bootstrap

3. setup /etc/mk.conf -
   at least enable netbsd style ftp and passive mode
   we had to add
     GZCAT=/usr/local/bin/zcat
   ymmv

4. get current auto tools before anything else - including m4, perl,
   autconf, automake, and libtool - teck-pkg list guys warned against
   trying to use other perls

   cd /usr/pkgsrc/devel/m4
   bmake package
   ... and so on ...

5. install the gcc3 package

Et voila:

%pkg_info gcc3   
Information for gcc3-3.3nb5:

Comment:
GNU Compiler Collection, version 3
...


advocacy:
   pkgsrc is a huge advance for maintaining consistent server config
   across a diverse platform.

   Due to customer and vendor (hardware driver) constraints, we just
   added some RedHat 7.3 systems. With a little autoconf kluging (see
   netbsd gnats pkg/23263), we got pkgsrc going on these hosts as
   well.