Building pkgsrc perl on Tru64 5.1B

My adventures compiling perl5 in /pkgsrc/lang/perl5  Tru64 UNIX and pkgsrc
OS – Tru64 Unix 5.1B
pkgsrc 2014 May current – bootstrap works fine

Using pkgsrc-current snapshot from 2014-May

Building perl5  here are my experiment notes

cd /pkgsrc/pkgsrc/lang/perl5 
# env CC=/data/gcc447/bin/gcc CXX=/data/gcc447/bin/g++ CFLAGS=-pthread bmake install package 
..............

CCCMD =  gcc -DPERL_CORE -c -D_REENTRANT -pthread -O2 -pthread -D_REENTRANT -I/usr/pkg/include -I/usr/include -ansi -mfp-rounding-mode=d -mieee -fno-strict-aliasing -I/usr/local/include -DLANGUAGE_C  -pthread -O2  -pthread  -D_REENTRANT -I/usr/pkg/include -I/usr/include  -Wall 
LD_LIBRARY_PATH=/pkgsrc/pkgsrc\-current/lang/perl5/work/perl\-5.18.2:/usr/local/lib gcc -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -o miniperl  perlmini.o opmini.o miniperlmain.o   gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   -lpthread -lrt -lexc
frexp
floor
ceil
sin
sqrt
exp
log
cos
atan2
fmod
pow
modf
collect2: ld returned 1 exit status
*** Error code 1

Added to work/perl-5.18.2/Makefile  following entry

# Static targets are ordinarily built without CCCDLFLAGS.  However,
# if building a shared libperl.so that might later be linked into
# another application, then it might be appropriate to also build static
# extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
# for GNU cc).
STATIC_LDFLAGS = -lm

and here

libs = -lpthread -lrt -lexc -lm

# env CC=/data/gcc447/bin/gcc CXX=/data/gcc447/bin/g++  bmake package

Remove stuff from line 86 in work/perl-5.18.2/Makefile

# env CC=/data/gcc447/bin/gcc CXX=/data/gcc447/bin/g++  bmake package

..................
Making all in cpan/Pod-Checker
 /pkgsrc/pkg/bin//bmake all PERL_CORE=1 LIBPERL_A=libperl.so
LD_LIBRARY_PATH=/pkgsrc/pkgsrc\-current/lang/perl5/work/perl\-5.18.2:/usr/local/lib  ./miniperl -Ilib make_ext.pl cpan/Pod-Escapes/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
        Making Pod::Escapes (all)
Making all in cpan/Pod-Escapes
 /pkgsrc/pkg/bin//bmake all PERL_CORE=1 LIBPERL_A=libperl.so
bmake: don't know how to make cpan/Pod-Simple/pm_to_blib. Stop

bmake: stopped in /pkgsrc/pkgsrc-current/lang/perl5/work/perl-5.18.2
*** Error code 2

Fixed by doing the following

# cd work/perl-5.18.2/
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-Simple MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-Simple/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/XSLoader MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/XSLoader/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-* MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-LaTeX/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.14.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-Usage/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-Parser/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Pod-Perldoc/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/Safe MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/Safe/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/constant MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/constant/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/lib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/lib/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl ext/DynaLoader MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl ext/DynaLoader/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Text-Tabs MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Text-Tabs/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/base MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl dist/base/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/podlators MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/podlators/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Text-ParseWords MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so
# env LD_LIBRARY_PATH=/pkgsrc/pkgsrc\ -current/lang/perl5/work/perl-5.18.2:/usr/local/lib ./miniperl -Ilib make_ext.pl cpan/Text-ParseWords/pm_to_blib MAKE=/pkgsrc/pkg/bin//bmake LIBPERL_A=libperl.so

Add the dist/Safe/pm_to_blib to worl/perl-5.18.2/Makefile !!

# vi /pkgsrc/pkgsrc\-current/lang/perl5/work/perl-5.18.2/Makefile
static_ext = dist/Safe/pm_to_blib cpan/Text-ParseWords/pm_to_blib
# cd ../../
# bmake package
..............
Making all in cpan/Socket
/pkgsrc/pkg/bin//bmake all PERL_CORE=1 LIBPERL_A=libperl.so LINKTYPE=dynamic
cp Socket.pm ../../lib/Socket.pm
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap -typemap typemap  Socket.xs > Socket.xsc && mv Socket.xsc Socket.c
gcc -c    -D_REENTRANT -pthread -O2 -pthread -D_REENTRANT -I/usr/pkg/include -I/usr/include -ansi -mfp-rounding-mode=d -mieee -fno-strict-aliasing -I/usr/local/include -DLANGUAGE_C -pthread -O2 -pthread -D_REENTRANT -I/usr/pkg/include -I/usr/include    -DVERSION=\"2.009\"  -DXS_VERSION=\"2.009\" -fpic "-I../.."   Socket.c
Socket.xs: In function 'XS_Socket_pack_sockaddr_in':
Socket.xs:784: error: 'struct sockaddr_in' has no member named 'sin_len'
Socket.xs: In function 'XS_Socket_pack_sockaddr_in6':
Socket.xs:850: error: 'struct sockaddr_in6' has no member named 'sin6_len'
*** Error code 1

To fix this error do this

# vi /pkgsrc/pkgsrc\-current/lang/perl5/work/perl-5.18.2/cpan/Socket/Makefile

and add -D_SOCKADDR_LEN like this :

CCFLAGS = -D_REENTRANT -O2 -O2 -pthread -D_REENTRANT -D_SOCKADDR_LEN  -I/usr/pkg/include -I/usr/include -ansi -mfp-rounding-mo
de=d -mieee -fno-strict-aliasing -I/usr/local/include -DLANGUAGE_C
# bmake package install

Finally produced the perl-5.18.2nb2.tgz

Advertisements
Gallery | This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s