I have been fighting with this for a whole day now and nothing positive. I have to install a bunch of modules on perl 5.6.1 on AIX. Let's pick one of them:
Compress-Zlib-1.33
compilation seems to work but then
Running Mkbootstrap for Compress::Zlib ()^M chmod 644 Zlib.bs^M rm -f blib/arch/auto/Compress/Zlib/Zlib.so^M LD_RUN_PATH="" xlc -bexpall -G -L/opt/freeware/lib -L/usr/local/lib Zlib.o adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o -o blib/arch/auto/Compress/Zlib/Zlib.so ^M ld: 0711-317 ERROR: Undefined symbol: PL_markstack_ptr^M ld: 0711-317 ERROR: Undefined symbol: PL_stack_base^M ld: 0711-317 ERROR: Undefined symbol: PL_stack_sp^M ld: 0711-317 ERROR: Undefined symbol: .Perl_sv_2pv^M ld: 0711-317 ERROR: Undefined symbol: .Perl_form^M ld: 0711-317 ERROR: Undefined symbol: .perl_get_sv^M ld: 0711-317 ERROR: Undefined symbol: .Perl_croak^M ld: 0711-317 ERROR: Undefined symbol: .Perl_newXS^M ld: 0711-317 ERROR: Undefined symbol: .Perl_sv_setiv^M ...
and more similar lines
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=aix, osvers=4.3.3.0, archname=ppc-aix uname='aix emperor 3 4 000289424c00 unknown ' config_args='-desr -Doptimize=-O2 -Dcc=xlc -Dldflags=-s -Wl,-bmaxdata:0x80000000 -Dinstallprefix=/opt/freeware -Dprefix=/opt/freeware -Darchname=ppc-aix -A define:ld=xlc -A define:ccdlflags=-brtl -bdynamic -A define:lddlflags=-bexpall -G -L/opt/freeware/lib' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='xlc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong', optimize='-O2 ', cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -I/usr/local/include' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='xlc', ldflags ='-s -Wl,-bmaxdata:0x80000000 -L/usr/local/lib -b32' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lbind -lnsl -lgdbm -ldbm -ldb -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv perllibs=-lbind -lnsl -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv libc=, so=a, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-brtl -bdynamic -bE:/opt/freeware/lib/perl5/5.6.1/ppc-aix/CORE/perl.exp' cccdlflags=' ', lddlflags='-bexpall -G -L/opt/freeware/lib -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under aix Compiled at Apr 25 2003 12:24:22 @INC: /opt/freeware/lib/perl5/5.6.1/ppc-aix /opt/freeware/lib/perl5/5.6.1 /opt/freeware/lib/perl5/site_perl/5.6.1/ppc-aix /opt/freeware/lib/perl5/site_perl/5.6.1 /opt/freeware/lib/perl5/site_perl .
The configuration shows it was compiled by xlc, which I presume is AIX's proprietary C compiler. Are you using xlc to compile the modules? (Are you intending to use it, and are you verifying that Makefile.PL is indeed picking it up? Might need to CC=xlc Makefile.PL or modify your PATH.)
Forgive me if this is stuff you already know. It might be something you've never heard of or thought of before, or it might be trivial old hat stuff to you.
If you try to compile modules with a compiler other than that used to compile perl, your success is not guaranteed. I think it works sometimes on some platforms, but I would never depend on it. I always get gcc going and make sure to compile my own perl. Have never used AIX; I might use the system compiler on that, if available, but I'd have more trust for gcc and definitely no trust if I was trying to mix output from the two.
Re:Compiler and linker?
bluto on 2004-12-15T17:46:50
FWIW, I've never had luck on AIX with gcc, though that was generally years ago. Xlc or vac(?) tends to work ok, but you'll want to make sure they are reasonably up to date. That said, I 100% agree with the idea of building your own copy of perl. IBM's builtin perl is usually ancient and for some reason it causes me no end of grief when building/installing modules.Re:Compiler and linker?
jdavidb on 2004-12-15T18:10:50
My advice is never, ever, ever, ever try to add a module to your OS vendor's version of perl. Compiler incompatiblities is the number one reason, along with inconsistent configuration options, possible behind-the-scenes changes your vendor made, and very importantly the chance that some user-level component of the operating system (say, sysadmin tools or init scripts) depends on an installed module that has changed in an incompatible way.
It is near-trivial to install an independent perl for someone who is able to get perl compiled at all. I highly recommend it. And I tie all my programs to the specific instance of perl on the #! line, using full path and version number, to allow myself to upgrade perl by installing a new independent instance without affecting older programs.
Re:Compiler and linker?
gabor on 2004-12-16T16:12:12
Unfortunately I cannot make the people change the installed perl, I am totally dependent on some system administrators who told me to call the supplier of this module. They did not specify if I should call the maintainer of the module or CPAN...Anyway, this is perl supplied by IBM and installed in some way by the local sysadmins. As this is a productions system they don't let me install another perl that I'd compile.
Both the compiler and the linker seem to be called XLC on this system
Re:Compiler and linker?
n1vux on 2004-12-16T16:14:12
Be aware that xlC and xlc are two different compilers (or rather, sets of options) on AIX.Re:Compiler and linker?
gabor on 2004-12-16T16:20:05
lovelythanks for the warning, next time I am there I should look into this more closely