Subject: Re: Toolchain Update (27-Nov-2001)
To: gabriel rosenkoetter <gr@eclipsed.net>
From: James Chacon <jchacon@genuity.net>
List: tech-toolchain
Date: 11/28/2001 00:26:44
I'd have to look at the exact package but some of the sub makes do not read
in bsd.pkg.mk but do read in the system .mk files.

Don't set USETOOLS=yes...The build system will set it for you by default.
By setting it explictly to yes you are forcing the toolchain to be used
by anything which may happen to use the system make files.

Ok...you can set it like that but the behavior you're seeing is what it's
supposed to do in that case.

James

>
>
>--7CZp05NP8/gJM8Cl
>Content-Type: text/plain; charset=us-ascii
>Content-Disposition: inline
>Content-Transfer-Encoding: quoted-printable
>
>On Tue, Nov 27, 2001 at 08:29:55PM -0500, James Chacon wrote:
>> Probably the better check is just to not set it if BSD_PKG_MK is set. The
>> presumption is that things within /usr/src are using the /usr/src build
>> structure.
>
>Except that that seems to be broken in pgksrc presently. To whit...
>
>My /etc/mk.conf:
>
># For src... some of these make pkgsrc freak out, so:
>=2Eifndef BSD_PKG_MK
>DESTDIR=3D/build/i386
>RELEASEDIR=3D/release/20011122
>TOOLDIR=3D/usr/obj/tools
>MKTOOLS=3Dalways
>USETOOLS=3Dyes
>USE_NEW_TOOLCHAIN=3Dyes
>MKOBJ=3Dyes
>MKOBJDIRS=3Dyes
>#MKHOSTOBJ=3Dyes
># big honking obj link names; only necessary if we're cross-compiling
># from this tree to a given target on multiple (differently-arched)
># hosts
>OBJMACHINE=3Dyes
>#NOCLEANDIR=3D1
>#UPDATE=3D1
>#CFLAGS+=3D-g
>=2Eendif
>
># For pkgsrc
>=2Eifdef BSD_PKG_MK
>ACCEPTABLE_LICENSES+=3Dfee-based-commercial-use opera-license no-commercial=
>-use
>ACCEPTABLE_LICENSES+=3Dadobe-acrobat-license jdk-license shareware no-profit
>=2Eendif
>
>Then:
>
>grappa:pkgsrc/mk# pwd                                                      =
> [2]
>/usr/pkgsrc/mk
>grappa:pkgsrc/mk# cvs update -dP                                           =
> [3]
>cvs server: Updating .
>cvs server: Updating bulk
>cvs server: Updating install
>grappa:pkgsrc/mk# cd ../graphics/apla                                      =
> [4]
>grappa:graphics/apla# make                                                 =
> [5]
>grappa:graphics/apla# make clean                                           =
> [6]
>=3D=3D=3D> Cleaning for apla-1.0.3
>grappa:graphics/apla# cvs update -dP                                       =
> [7]
>cvs server: Updating .
>cvs server: Updating patches
>cvs server: Updating pkg
>grappa:graphics/apla# make                                                 =
> [8]
>=3D=3D=3D> Validating dependencies for apla-1.0.3
>=3D> Checksum OK for apla-1.0.3.tar.gz.
>=3D=3D=3D> Extracting for apla-1.0.3
>=3D=3D=3D> Required installed package avifile>=3D0.6: avifile-0.53.5 found
>=3D=3D=3D> Required installed package SDL_ttf>=3D2.0.3: SDL_ttf-2.0.3 found
>=3D=3D=3D> Required installed package SDL>=3D1.2.0: SDL-1.2.1 found
>=3D=3D=3D> Required installed package esound>=3D0.2.18: esound-0.2.22 found
>=3D=3D=3D> Required installed package libaudiofile>=3D0.2.1: libaudiofile-0=
>.2.1 found
>=3D=3D=3D> Required installed package pth>=3D1.3.2: pth-1.4.0 found
>=3D=3D=3D> Required installed package freetype2>=3D2.0.1: freetype2-2.0.3 f=
>ound
>=3D=3D=3D> Required installed package libiconv>=3D1.5: libiconv-1.6.1 found
>=3D=3D=3D> Required installed package Mesa>=3D3.2.1: Mesa-3.4.1 found
>=3D=3D=3D> Patching for apla-1.0.3
>=3D=3D=3D> Applying NetBSD patches for apla-1.0.3
>=3D=3D=3D> Configuring for apla-1.0.3
>Linking avifile files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Creating wrapper script /usr/pkgsrc/graphics/apla/work/.buildlink/bin/avifi=
>le-config.
>Linking audiofile files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Creating wrapper script /usr/pkgsrc/graphics/apla/work/.buildlink/bin/audio=
>file-config.
>Linking esound files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Creating wrapper script /usr/pkgsrc/graphics/apla/work/.buildlink/bin/esd-c=
>onfig.
>Linking pth files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Creating wrapper script /usr/pkgsrc/graphics/apla/work/.buildlink/bin/pthre=
>ad-config.
>Linking Mesa-x11base files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Linking Mesa-localbase files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Linking SDL files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Creating wrapper script /usr/pkgsrc/graphics/apla/work/.buildlink/bin/sdl-c=
>onfig.
>Linking freetype2 files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Creating wrapper script /usr/pkgsrc/graphics/apla/work/.buildlink/bin/freet=
>ype-config.
>Linking SDL_ttf files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Linking iconv files into /usr/pkgsrc/graphics/apla/work/.buildlink.
>Removing rpath references to buildlink directories:
>        Makefile
>=3D=3D=3D> Building for apla-1.0.3
>/usr/obj/tools/bin/i386--netbsdelf-c++ -I/usr/pkgsrc/graphics/apla/work/.bu=
>ildlink/include -O2  -Werror  -I/usr/pkgsrc/graphics/apla/work/.buildlink/i=
>nclude  `/usr/pkgsrc/graphics/apla/work/.buildlink/bin/avifile-config --cfl=
>ags` `/usr/pkgsrc/graphics/apla/work/.buildlink/bin/sdl-config --cflags` `/=
>usr/pkgsrc/graphics/apla/work/.buildlink/bin/freetype-config --cflags`     =
>          '-DX11BASE=3D"/usr/X11R6"'   -nostdinc -idirafter /build/i386/usr=
>/include -c main.cc
>main.cc:1: cmath: No such file or directory
>main.cc:2: cstdlib: No such file or directory
>main.cc:3: ctime: No such file or directory
>main.cc:4: iostream: No such file or directory
>main.cc:5: vector: No such file or directory
>[etcetera]
>
>Commenting my DESTDIR and USETOOLS settings (notably within a
>#ifndef BSD_PKG_MK) yields a successful build with compile lines
>that look like:
>
>c++ -I/usr/pkgsrc/graphics/apla/work/.buildlink/include -O2  -Werror  -I/us=
>r/pkgsrc/graphics/apla/work/.buildlink/include  `/usr/pkgsrc/graphics/apla/=
>work/.buildlink/bin/avifile-config --cflags` `/usr/pkgsrc/graphics/apla/wor=
>k/.buildlink/bin/sdl-config --cflags` `/usr/pkgsrc/graphics/apla/work/.buil=
>dlink/bin/freetype-config --cflags`          '-DX11BASE=3D"/usr/X11R6"'    =
>-c main.cc
>
>Clearly, pkgsrc Makefiles (or buildlink?) is not paying attention
>to the #ifndef.
>
>Is this me, or shall I send-pr?
>
>--=20
>       ~ g r @ eclipsed.net
>
>--7CZp05NP8/gJM8Cl
>Content-Type: application/pgp-signature
>Content-Disposition: inline
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.0.6 (NetBSD)
>Comment: For info see http://www.gnupg.org
>
>iEYEARECAAYFAjwEbcEACgkQ9ehacAz5CRqziQCgtIZEgZLCqk5Zxq1H6J8fNDIJ
>FDEAn1wnxuNob14nqLrBgtbEhQitIRoG
>=Hzpv
>-----END PGP SIGNATURE-----
>
>--7CZp05NP8/gJM8Cl--
>
>
>
>