Front page | perl.perl5.porters |
Postings from November 2003
[perl #24446] 5.8.2 fails to build on AIX with GCC
From:
James Jurach
Date:
November 9, 2003 12:03
Subject:
[perl #24446] 5.8.2 fails to build on AIX with GCC
Message ID:
rt-24446-67253.8.30802418323934@rt.perl.org
# New Ticket Created by James Jurach
# Please include the string: [perl #24446]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24446 >
This is a bug report for perl from muaddib@cheetah.mesas.com,
generated with the help of perlbug 1.34 running under perl v5.8.2.
-----------------------------------------------------------------
[Please enter your report here]
Perl does not build properly out of the box on recent AIX version with
UCLA gcc 3.3.1. There are two apparent problems:
(1) Not all linker args are being wrapped with "-Wl," for gcc to pass
through. For example: -H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp
(2) There is some strange and apparently inappropriate (at least,
inappropriate to gcc) link step for libperl.a whereby a good
shared object library generated by $(CC) is getting further
archived by $(AR). The end result similar to the following occurs
at the beginning of "make test":
/tmp/perl-5.8.2$ LIBPATH=. ./perl -v
exec: 0509-036 Cannot load program ./perl because of the following errors:
0509-150 Dependent module ./libperl.a could not be loaded.
0509-103 The module has an invalid magic number.
Just for a little insight, when I apply only the following hack to
Makefile.SH, "make test" succeeds with no errors. (I realize the
following patch would probably break xlC.C and vac.C).
-james
diff -urb perl-5.8.2.orig/Makefile.SH perl-5.8.2/Makefile.SH
--- perl-5.8.2.orig/Makefile.SH Wed Oct 22 14:14:29 2003
+++ perl-5.8.2/Makefile.SH Sat Nov 8 01:39:39 2003
@@ -62,11 +62,11 @@
linklibperl="-L. -lperl"
;;
aix*)
- shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
+ shrpldflags="-Wl,-H512 -Wl,-T512 -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bE:perl.exp"
case "$osvers" in
3*) shrpldflags="$shrpldflags -e _nostart"
;;
- *) shrpldflags="$shrpldflags -b noentry"
+ *) shrpldflags="$shrpldflags -Wl,-bnoentry"
;;
esac
shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
@@ -504,11 +504,11 @@
!NO!SUBS!
case "$osname" in
aix)
- $spitshell >>Makefile <<'!NO!SUBS!'
- rm -f libperl$(OBJ_EXT)
- mv $@ libperl$(OBJ_EXT)
- $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
-!NO!SUBS!
+# $spitshell >>Makefile <<'!NO!SUBS!'
+# rm -f libperl$(OBJ_EXT)
+# mv $@ libperl$(OBJ_EXT)
+# $(AR) qv $(LIBPERL) libperl$(OBJ_EXT)
+#!NO!SUBS!
;;
esac
;;
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.8.2:
Configured by muaddib at Sat Nov 8 01:40:52 CST 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
Platform:
osname=aix, osvers=5.1.0.0, archname=aix
uname='aix cheetah 1 5 000c58bd4c00 '
config_args='-d -e -s -Dprefix=/mesa/devtrees/myarch -Dversiononly=yes -Dscriptdir=/mesa/devtrees/myarch/bin -Dlocincpth=/mesa/devtrees/myarch/include /mesa/myarch/include /usr/gnu/include -Dloclibpth=/mesa/devtrees/myarch/lib /mesa/myarch/lib /usr/gnu/lib -Daltmake=make -Uinstallusrbinperl -Doptimize=-g -Duseshrplib -DDEBUGGING -Dcc=gcc'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DDEBUGGING -fno-strict-aliasing -I/mesa/devtrees/myarch/include -I/mesa/myarch/include -D_LARGE_FILES',
optimize='-g',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DDEBUGGING -fno-strict-aliasing -I/mesa/devtrees/myarch/include -I/mesa/myarch/include'
ccversion='', gccversion='3.3.1', gccosandvers='aix5.1.0.0'
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, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -Wl,-brtl -L/mesa/devtrees/myarch/lib -L/mesa/myarch/lib -Wl,-b32'
libpth=/mesa/devtrees/myarch/lib /mesa/myarch/lib /lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc -lbsd
perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lc -lbsd
libc=/lib/libc.a, so=a, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Xlinker -bE:/mesa/devtrees/myarch/lib/perl5/5.8.2/aix/CORE/perl.exp'
cccdlflags=' ', lddlflags=' -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:$(PERL_INC)/perl.exp -Wl,-bE:$(BASEEXT).exp -Wl,-bnoentry -lc -L/mesa/devtrees/myarch/lib -L/mesa/myarch/lib'
Locally applied patches:
---
@INC for perl v5.8.2:
/mesa/devtrees/muaddib/mainline/lib/perl/5.8.0
/mesa/devtrees/muaddib/mainline/lib/perl
/mesa/devtrees/myarch/lib/perl5/5.8.2/aix
/mesa/devtrees/myarch/lib/perl5/5.8.2
/mesa/devtrees/myarch/lib/perl5/site_perl/5.8.2/aix
/mesa/devtrees/myarch/lib/perl5/site_perl/5.8.2
/mesa/devtrees/myarch/lib/perl5/site_perl
.
---
Environment for perl v5.8.2:
HOME=/home/muaddib
LANG=en_US
LANGUAGE (unset)
LC__FASTMSG=true
LD_LIBRARY_PATH=/mesa/oracle/current/lib:/mesa/devtrees/muaddib/mainline/lib:/mesa/devtrees/muaddib/fx3_5/lib:/mesa/myarch/tools/dev/lib:/mesa/devtrees/muaddib/mainline/lib:/mesa/devtrees/myarch/lib:/mesa/myarch/lib:/mesa/myarch/tools/dev/lib:/mesa/tools/arch/common/lib:/mesa/tools/arch/rs_aix51/lib:.:/usr/krb5/lib:/usr/local/lib:/usr/share/lib:/usr/lib:/lib:/usr/X11R6/lib:/usr/ccs/lib
LIBPATH=/mesa/oracle/current/lib:/mesa/devtrees/muaddib/mainline/lib:/mesa/myarch/tools/dev/lib:/mesa/devtrees/muaddib/mainline/lib:/mesa/devtrees/myarch/lib:/mesa/myarch/lib:/mesa/myarch/tools/dev/lib:/mesa/tools/arch/common/lib:/mesa/tools/arch/rs_aix51/lib:.:/usr/krb5/lib:/usr/local/lib:/usr/share/lib:/usr/lib:/lib:/usr/X11R6/lib:/usr/ccs/lib
LOGDIR (unset)
PATH=/usr/java14/bin:/mesa/myarch/tools/dev/bin:/mesa/oracle/current/bin:/mesa/devtrees/muaddib/mainline/sbin:/mesa/devtrees/muaddib/mainline/bin:/mesa/devtrees/myarch/bin:/mesa/bin:/usr/local/ssl/bin:/usr/krb5/sbin:/usr/krb5/bin:/opt/share/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/ccs/bin:/home/muaddib/bin/hosts:/home/muaddib/bin
PERLLIB=/mesa/devtrees/muaddib/mainline/lib/perl/5.8.0:/mesa/devtrees/muaddib/mainline/lib/perl
PERL_BADLANG (unset)
PERL_READLINE_NOWARN=1
SHELL=/bin/bash
-
[perl #24446] 5.8.2 fails to build on AIX with GCC
by James Jurach