Subject: Re: Some p5-* modules fail to build on NetBSD/amd64
To: NetBSD/pkgsrc users <pkgsrc-users@NetBSD.org>
From: Martti Kuparinen <martti.kuparinen@iki.fi>
List: pkgsrc-users
Date: 03/14/2007 09:56:57
This is a weird problem. On my server I'm running this:

# uname -srm
NetBSD 4.0_BETA2 amd64

# lintpkgsrc -i
Scan Makefiles: 6555 packages
Version mismatch: 'perl' 5.8.8nb3 vs 5.8.8nb4

Now, I'm afraid of upgrading perl because I can't compile some of
the p5-* modules inside chroot. The installation of chroot is made
from fresh NetBSD/amd64 4.0_BETA2 .tgz files (these are built daily
from the latest netbsd-4 sources, and with empty /usr/obj).

This is how I create my chroot area and start the build.

# rm -rf /var/chroot/netbsd/rootdir
# mkdir /var/chroot/netbsd/rootdir

# ls
base.tgz            kern-GENERIC.tgz    xbase.tgz           xserver.tgz
comp.tgz            man.tgz             xcomp.tgz
etc.tgz             misc.tgz            xetc.tgz
games.tgz           text.tgz            xfont.tgz

# for i in *.tgz; do tar xpzf $i -C /var/chroot/netbsd/rootdir; done
# cd /var/chroot/netbsd/rootdir/dev && ./MAKEDEV all
# cp /etc/mk.conf /var/chroot/netbsd/rootdir/etc/
# cp /etc/resolv.conf /var/chroot/netbsd/rootdir/etc/
# chroot /var/chroot/netbsd/rootdir /bin/sh

# cd /usr/pkgsrc/mail/spamassassin
# make deinstall package clean clean-depends
...
===> Building for p5-Socket6-0.19
cp Socket6.pm blib/lib/Socket6.pm
/usr/pkgsrc/net/p5-Socket6/work/.tools/bin/perl 
/usr/pkg/lib/perl5/5.8.0/ExtUtils/xsubpp -noprototypes -typemap 
/usr/pkg/lib/perl5/5.8.0/ExtUtils/typemap  Socket6.xs > Socket6.xsc && mv 
Socket6.xsc Socket6.c
cc -c    -fno-strict-aliasing -pipe -Wdeclaration-after-statement -O2 -pipe 
-I/usr/pkg/include -I/usr/include   -I/usr/pkg/include -I/usr/include 
-DVERSION=\"0.19\"  -DXS_VERSION=\"0.19\" -DPIC -fPIC 
"-I/usr/pkg/lib/perl5/5.8.0/x86_64-netbsd-thread-multi/CORE"   Socket6.c
Socket6.xs:101:1: warning: "PL_sv_undef" redefined
In file included from 
/usr/pkgsrc/net/p5-Socket6/work/.buildlink/lib/perl5/5.8.0/x86_64-netbsd-thread-multi/CORE/XSUB.h:348,
                  from Socket6.xs:76:
/usr/pkgsrc/net/p5-Socket6/work/.buildlink/lib/perl5/5.8.0/x86_64-netbsd-thread-multi/CORE/perlapi.h:609:1: 
warning: this is the location of the previous definition
Socket6.xs: In function 'XS_Socket6_getaddrinfo':
Socket6.xs:664: error: 'sv_undef' undeclared (first use in this function)
Socket6.xs:664: error: (Each undeclared identifier is reported only once
Socket6.xs:664: error: for each function it appears in.)
Socket6.xs:668: warning: assignment discards qualifiers from pointer target type
Socket6.xs: In function 'XS_Socket6_gai_strerror':
Socket6.xs:724: warning: assignment discards qualifiers from pointer target type
Socket6.xs: In function 'XS_Socket6_getipnodebyname':
Socket6.xs:771: warning: cast to pointer from integer of different size
Socket6.xs: In function 'XS_Socket6_getipnodebyaddr':
Socket6.xs:842: warning: cast to pointer from integer of different size


All ideas are welcome...

Martti