Subject: Re: solaris pkgsrc, gcc, and bulk builds
To: Dan McMahill <dmcmahill@netbsd.org>
From: Eric Boutilier <Eric.Boutilier@Sun.COM>
List: tech-pkg
Date: 02/07/2005 11:53:03
On Fri, 4 Feb 2005, Dan McMahill wrote:
> I seem to be having a bit of a problem trying to do a bulk pkgsrc build
> under solaris. I have an older gcc-3.something that I'm using for the
> bootstrap. Thats installed in /opt/sfw/gcc3/bin. This is at the very
> end of my PATH.
>
> In my mk.conf I have
>
>
> .ifdef BSD_PKG_MK # begin pkgsrc settings
>
> PKG_DBDIR=/var/db/pkg
> LOCALBASE=/usr/pkg
> FETCH_CMD=/usr/pkg/bin/ftp
> PAX=/usr/pkg/bin/pax
> SED=/usr/pkg/bin/nbsed
>
> .endif # end pkgsrc settings
>
> .sinclude "/usr/pkg/share/mk/cpuflags.mk"
>
> # use gcc
> PKGSRC_COMPILER= gcc
>
> # force the use of the pkgsrc gcc
> USE_PKGSRC_GCC= YES
>
> # and don't bother installing gcc-2.95.*
> GCC_REQD= 3.0
>
> # set cpu optimization flags
> BULK_PREREQ+= devel/cpuflags
>
> # don't nuke this, we always need it
> BULK_PREREQ+= lang/gcc3-c
> BULK_PREREQ+= lang/gcc3-c++
> BULK_PREREQ+= lang/gcc3-f77
>
>
>
> Before running the bulk build I tried to build binary packages for lang/gcc3-c and
> for some reason it did not build and install the gmake dependency first. Not
> sure why because 'bmake show-var VARNAME=BUILD_DEPENDS' shows the dependency.
>
> So I built and installed the gmake package and then the binary pkgs for gcc3-{c,c++,f77}.
>
> Now I start the build and almost first thing it decides that gcc3-c is out of
> date so it tries to rebuild but fails because of the gmake thing.
>
> So now I'm wondering if perhaps we need another variable, something like
> BOOTSTRAP_PKGS where I'd do
>
> BOOTSTRAP_PKGS+= lang/gcc3-c
> BOOTSTRAP_PKGS+= lang/gcc3-c++
> BOOTSTRAP_PKGS+= lang/gcc3-f77
>
> and they would
>
> 1) be preserved like some of the other bootstrap stuff during the pre-build big
> cleanout of all installed pkgs.
>
> 2) be removed from the list of pkgs to be built
>
> 3) somehow always be marked as up to date so nothing else tries to go and
> rebuild them.
>
> Thoughts? Am I missing something basic here?
>
> -Dan
>
> --
Dan -- What good timing! I was just about to post about my
experience (and success!) doing the same thing, when I saw your
message. I just spent the good part of my weekend working out (and
taking notes on) bootstraping pkgsrc from scratch on Solaris 10
(also installed from scratch -- sort of).
I'll provide all the details in a separate message. Stay tuned...
Before I do though, I need to thank two people profusely:
Gavan Fantom, Sun's resident pkgsrc guru, who helped me a ton in
many ways! And Hal Snyder, whose document here:
http://www.drxyzzy.org/opsys/pkgsrc-sol9.html
was, for me, like finding the lynch-pin piece of a really tricky
puzzle! As you'll see, a large part of my documentation of the
process is simply derived from Hal's fine page.
Gavan and Hal: THANK YOU! THANK YOU!
Eric
--
_________________________________________________________________
Eric Boutilier
http://blogs.sun.com/eric_boutilier
Sun Microsystems
Solaris x86 Engineering
Community and open-source programs