Subject: Strange pkgviews or buildlink3 problem on FreeBSD, works on Linux
To: None <tech-pkg@NetBSD.org>
From: Eric Gillespie <epg@pretzelnet.org>
List: tech-pkg
Date: 11/10/2004 14:50:47
With PKG_INSTALLATION_PREFS=pkgviews overwrite in mk.conf, if i
try to build any Perl module that actually has to compile
something (e.g. devel/p5-Compress-Zlib), the build fails on
FreeBSD but works on Linux.  This is with the exact same pkgsrc
tree and mk.conf settings.

===> Building for p5-Compress-Zlib-1.33nb1
cp Zlib.pm blib/lib/Compress/Zlib.pm
AutoSplitting blib/lib/Compress/Zlib.pm (blib/lib/auto/Compress/Zlib)
/.amd_mnt/oven/vol/v1/mls/pkg/ix86-FreeBSD-4.9/packages/perl-5.8.5/bin/perl /m/mls/pkg/ix86-FreeBSD-4.9/packages/perl-5.8.5/lib/perl5/5.8.5/ExtUtils/xsubpp  -typemap /m/mls/pkg/ix86-FreeBSD-4.9/packages/perl-5.8.5/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap  Zlib.xs > Zlib.xsc && mv Zlib.xsc Zlib.c
gcc -c  -I/.amd_mnt/oven/vol/v1/mls/pkg/ix86-FreeBSD-4.9/packages/zlib-1.2.2/include  -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/m/mls/pkg/ix86-FreeBSD-4.9/include -O2 -I/.amd_mnt/oven/vol/v1/mls/pkg/ix86-FreeBSD-4.9/packages/zlib-1.2.2/include   -I/.amd_mnt/oven/vol/v1/mls/pkg/ix86-FreeBSD-4.9/packages/zlib-1.2.2/include    -DVERSION=\"1.33\"  -DXS_VERSION=\"1.33\" -DPIC -fPIC "-I/m/mls/pkg/ix86-FreeBSD-4.9/packages/perl-5.8.5/lib/perl5/5.8.5/i386-freebsd/CORE"   Zlib.c
Zlib.xs:21: EXTERN.h: No such file or directory
[...]

I used bmake show-var VARNAME=MAKE_ENV to track the problem down
to the wrappers.  If i use the environment from MAKE_ENV exactly,
go into WRKSRC, and run bmake, i get the same error.  If i use
the environment from MAKE_ENV but *not* its PATH changes, go into
WRKSRC, and run bmake, it works:

0 Compress-Zlib-1.33% PATH=../.buildlink/bin:../.tools/bin:../.gcc/bin:$PATH bmake
gcc -c  -I/.amd_mnt/oven/vol/v1/mls/pkg/ix86-FreeBSD-4.9/packages/zlib-1.2.2/include  -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/m/mls/pkg/ix86-FreeBSD-4.9/include -O2    -DVERSION=\"1.33\"  -DXS_VERSION=\"1.33\" -DPIC -fPIC "-I/m/mls/pkg/ix86-FreeBSD-4.9/packages/perl-5.8.5/lib/perl5/5.8.5/i386-freebsd/CORE"   Zlib.c
Zlib.xs:21: EXTERN.h: No such file or directory
[...]
1 Compress-Zlib-1.33% bmake
gcc -c  -I/.amd_mnt/oven/vol/v1/mls/pkg/ix86-FreeBSD-4.9/packages/zlib-1.2.2/include  -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/m/mls/pkg/ix86-FreeBSD-4.9/include -O2    -DVERSION=\"1.33\"  -DXS_VERSION=\"1.33\" -DPIC -fPIC "-I/m/mls/pkg/ix86-FreeBSD-4.9/packages/perl-5.8.5/lib/perl5/5.8.5/i386-freebsd/CORE"   Zlib.c
Running Mkbootstrap for Compress::Zlib ()
[...]

This problem seems to be in pkgsrc-2004Q3 as well as HEAD.
Ideas?  Should i just send-pr?

Thanks.

-- 
Eric Gillespie <*> epg@pretzelnet.org