Making SDBM_File (dynamic)
Writing Makefile for sdbm
Writing Makefile for SDBM_File
cp SDBM_File.pm ../../lib/SDBM_File.pm
cd sdbm && make all
../../../miniperl "-I../../../lib" "-I../../../lib" -e 'use ExtUtils::Mksymlists; Mksymlists("NAME" => "sdbm", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);'
cc -c -I../../.. -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF sdbm.c
cc -c -I../../.. -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF pair.c
cc -c -I../../.. -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/usr/local/include -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF hash.c
rm -rf libsdbm.a
/usr/bin/ar cr libsdbm.a sdbm.o pair.o hash.o && : libsdbm.a
chmod 755 libsdbm.a
Running Mkbootstrap for sdbm ()
chmod 644 sdbm.bs
rm -f ../../../lib/auto/sdbm/sdbm.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE -bI:../../../perl.exp -bE:sdbm.exp -bnoentry -lc -L/usr/local/lib sdbm.o pair.o hash.o -o ../../../lib/auto/sdbm/sdbm.so
ld : 0711-319 AVERTISSEMENT : Symbole exporté mais
non défini : boot_sdbm
ld : 0711-244 ERREUR : Aucun symbole exporté ni csect
n'a été sauvegardé.
make : 1254-004 Code d'erreur de la dernière commande : 8.
Arrêt.
make : 1254-004 Code d'erreur de la dernière commande : 2.
Arrêt.
make : 1254-004 Code d'erreur de la dernière commande : 2.
Arrêt.
Apparently due to ExtUtils::Mksymlist.
If I edit ext/SDBM_File/sdbm/sdbm.exp to contain :
sdbm__chkpage
sdbm__delpair
sdbm__duppair
sdbm__exipair
sdbm__fitpair
sdbm__getnkey
sdbm__getpair
sdbm__putpair
sdbm__splpage
sdbm_close
sdbm_delete
sdbm_exists
sdbm_fetch
sdbm_firstkey
sdbm_hash
sdbm_nextkey
sdbm_open
sdbm_prep
sdbm_store
(the list of symbols it should export, according to my linux build)
this goes fine.
But the sdbm.exp produced contains only "boot_sdbm", a symbol that
does not exist.
No further clue right now.
> No further clue right now.
Are there any other platforms which need explicit lists of symbols to
link against, which therefore ought to be failing in the same way as AIX?
[And if so, are they?]
Nicholas Clark
Building with gcc succeeds. ext/SDBM_File/sdbm/sdbm.exp are the same in both
cases: they only have "boot_sdbm"
gcc however gladly accepts, and xlc/cc barfs.
If one creates the expected list of external symbols by hand, somwhat like
# nm sdbm.o | perl -ne's/^(sdbm_\w+).*/$1/&&print' | sort -u>sdbm.exp
xlc/cc happily continues
Main difference is the way 'ld' is called. xlc/cc confs call id directly,
whereas the gcc conf call it indirectly with -Wl,... flags
xlc:
Making SDBM_File (dynamic)
Writing Makefile for sdbm
Writing Makefile for SDBM_File
make[1]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
make[1]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
make[1]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
cp SDBM_File.pm ../../lib/SDBM_File.pm
cd sdbm && make all
make[2]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
../../../miniperl "-I../../../lib" "-I../../../lib" -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" => "sdbm", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);'
xlc -c -I../../.. -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF sdbm.c
xlc -c -I../../.. -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF pair.c
xlc -c -I../../.. -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF hash.c
rm -rf libsdbm.a
/usr/bin/ar cr libsdbm.a sdbm.o pair.o hash.o && : libsdbm.a
chmod 755 libsdbm.a
Running Mkbootstrap for sdbm ()
chmod 644 sdbm.bs
rm -f ../../../lib/auto/sdbm/sdbm.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE -bI:../../../perl.exp -bE:sdbm.exp -bnoentry -lc -L/pro/local/lib sdbm.o pair.o hash.o -o ../../../lib/auto/sdbm/sdbm.so
ld: 0711-319 WARNING: Exported symbol not defined: boot_sdbm
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
make[2]: *** [../../../lib/auto/sdbm/sdbm.so] Error 8
make[2]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
make[1]: *** [sdbm/libsdbm.a] Error 2
make[1]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
gcc:
Making SDBM_File (dynamic)
Writing Makefile for sdbm
Writing Makefile for SDBM_File
make[1]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
make[1]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
make[1]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
cp SDBM_File.pm ../../lib/SDBM_File.pm
cd sdbm && make all
make[2]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
../../../miniperl "-I../../../lib" "-I../../../lib" -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" => "sdbm", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);'
gcc -c -I../../.. -maix32 -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -fno-strict-aliasing -I
/pro/local/include -D_LARGE_FILES -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF sdbm.c
gcc -c -I../../.. -maix32 -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -fno-strict-aliasing -I
/pro/local/include -D_LARGE_FILES -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF pair.c
gcc -c -I../../.. -maix32 -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -fno-strict-aliasing -I
/pro/local/include -D_LARGE_FILES -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -DDUFF hash.c
rm -rf libsdbm.a
/usr/local/ppc64/bin/ar cr libsdbm.a sdbm.o pair.o hash.o && : libsdbm.a
chmod 755 libsdbm.a
Running Mkbootstrap for sdbm ()
chmod 644 sdbm.bs
rm -f ../../../lib/auto/sdbm/sdbm.so
LD_RUN_PATH="" gcc -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:../../../perl.exp -Wl,-bE:sdbm.exp -Wl,-bnoentry -lc -L/pro/local/lib sdbm.o
pair.o hash.o -o ../../../lib/auto/sdbm/sdbm.so
ld: 0711-319 WARNING: Exported symbol not defined: boot_sdbm
chmod 755 ../../../lib/auto/sdbm/sdbm.so
cp sdbm.bs ../../../lib/auto/sdbm/sdbm.bs
chmod 644 ../../../lib/auto/sdbm/sdbm.bs
make[2]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
make[2]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
rm -rf libsdbm.a
/usr/local/ppc64/bin/ar cr libsdbm.a sdbm.o pair.o hash.o && : libsdbm.a
chmod 755 libsdbm.a
Running Mkbootstrap for sdbm ()
chmod 644 sdbm.bs
make[2]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
../../miniperl "-I../../lib" "-I../../lib" -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" => "SDBM_File", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);'
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap -typemap t
ypemap SDBM_File.xs > SDBM_File.xsc && mv SDBM_File.xsc SDBM_File.c
gcc -c -maix32 -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -fno-strict-aliasing -I/pro/local
/include -D_LARGE_FILES -O -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_call
oc -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" "-I../.." SDBM_File.c
Running Mkbootstrap for SDBM_File ()
chmod 644 SDBM_File.bs
rm -f ../../lib/auto/SDBM_File/SDBM_File.so
LD_RUN_PATH="" gcc -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:../../perl.exp -Wl,-bE:SDBM_File.exp -Wl,-bnoentry -lc -L/pro/local/lib SDBM
_File.o -o ../../lib/auto/SDBM_File/SDBM_File.so sdbm/libsdbm.a
chmod 755 ../../lib/auto/SDBM_File/SDBM_File.so
cp SDBM_File.bs ../../lib/auto/SDBM_File/SDBM_File.bs
chmod 644 ../../lib/auto/SDBM_File/SDBM_File.bs
make[1]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0, & 5.9.x, and 806 on HP-UX 10.20 & 11.00, 11i,
AIX 4.3, SuSE 8.2, and Win2k. http://www.cmve.net/~merijn/
http://archives.develooper.com/daily...@perl.org/ per...@perl.org
send smoke reports to: smokers...@perl.org, QA: http://qa.perl.org
The question is: has sdbm.exp always looked this way? What does 5.8.2's
sdbm.exp contain?
--
Michael G Schwern sch...@pobox.com http://www.pobox.com/~schwern/
OH GOD!! It's LINUX! All you Linux fanboys go wild! It never crashes!
It'll wash your underpants! It'll eat your dog for you, if you want your
dog to be eaten! It'll make you attractive and smell good and... it'll...
uh... uh. Man, I'm so sick of this shit.
http://www.goats.com/archive/000602.html
There's ain't no sdbm.exp file in 5.8.2. It's built statically. (and it should
be IMHO because no other module than SDBM_File will use it)
Why do we build it dynamically in bledaperl again ? I remember that this
has something to do with some 6.18 changes.
ext/SDBM_File/sdbm/Makefile already states that the default build type is
static, but it builds using dynamic
> Why do we build it dynamically in bleadperl again ? I remember that this
> has something to do with some 6.18 changes.
Solution at the end if you want to skip the thinking/testing/experimental path
If I change SDBM_File/sdbm/Makefile to use xlc as loader, like
CC = xlc
CCCDLFLAGS =
CCDLFLAGS = -bE:/pro/lib/perl5/5.9.0/aix/CORE/perl.exp
DLEXT = so
DLSRC = dl_aix.xs
LD = xlc
LDDLFLAGS = -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:$(PERL_INC)/perl.exp -Wl,-bE:$(BASEEXT).exp -Wl,-bnoentry -lc -L/pro/local/lib
LDFLAGS = -L/pro/local/lib -Wl,-brtl -Wl,-b32
LIBC = /lib/libc.a
I get the same error :(
rm -f ../../../lib/auto/sdbm/sdbm.so
LD_RUN_PATH="" xlc -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:../../../perl.exp -Wl,-bE:sdbm.exp -Wl,-bnoentry -lc -L/pro/local/lib sdbm.o pair.o hash.o -o ../../../lib/auto/sdbm/sdbm.so
ld: 0711-319 WARNING: Exported symbol not defined: boot_sdbm
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
_This_ however helps:
--8<--- ext/SDBM_File/sdbm/Makefile
# --- MakeMaker dynamic section:
##dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
# $(NOECHO) $(NOOP)
dynamic :: static
-->8---
Making SDBM_File (dynamic)
make[1]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
make[1]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
make[1]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
cd sdbm && make all
make[2]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
../../../miniperl "-I../../../lib" "-I../../../lib" -e 'use ExtUtils::Mksymlists
; \
Mksymlists("NAME" => "sdbm", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" =>
[]);'
xlc -c -I../../.. -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -q
maxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARG
E_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -
DDUFF sdbm.c
xlc -c -I../../.. -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -q
maxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARG
E_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -
DDUFF pair.c
xlc -c -I../../.. -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -q
maxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARG
E_FILES -qlonglong -O -DVERSION=\"\" -DXS_VERSION=\"\" "-I../../.." -DSDBM -
DDUFF hash.c
rm -rf libsdbm.a
/usr/bin/ar cr libsdbm.a sdbm.o pair.o hash.o && : libsdbm.a
chmod 755 libsdbm.a
make[2]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
make[2]: Entering directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
rm -rf libsdbm.a
/usr/bin/ar cr libsdbm.a sdbm.o pair.o hash.o && : libsdbm.a
chmod 755 libsdbm.a
make[2]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File/sdbm'
../../miniperl "-I../../lib" "-I../../lib" -e 'use ExtUtils::Mksymlists; \
Mksymlists("NAME" => "SDBM_File", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS
" => []);'
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototyp
es -typemap ../../lib/ExtUtils/typemap -typemap typemap SDBM_File.xs > SDBM_Fil
e.xsc && mv SDBM_File.xsc SDBM_File.c
xlc -c -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=163
84 -qnoansialias -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARGE_FILES -q
longlong -O -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Dreall
oc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" "
-I../.." SDBM_File.c
Running Mkbootstrap for SDBM_File ()
chmod 644 SDBM_File.bs
rm -f ../../lib/auto/SDBM_File/SDBM_File.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE -bI:../../perl.exp -bE:SDBM_File.exp -bnoent
ry -lc -L/pro/local/lib SDBM_File.o -o ../../lib/auto/SDBM_File/SDBM_File.so sd
bm/libsdbm.a
chmod 755 ../../lib/auto/SDBM_File/SDBM_File.so
cp SDBM_File.bs ../../lib/auto/SDBM_File/SDBM_File.bs
chmod 644 ../../lib/auto/SDBM_File/SDBM_File.bs
make[1]: Leaving directory `/pro/3gl/CPAN/perl-current/ext/SDBM_File'
Which means, One can make SDBM_File dynamic, but still use static only build
in .../sdbm. Whatever is chosen for
All tests pass
--- ext/SDBM_File/Makefile.PL 2001-09-02 04:11:02.000000000 +0200
+++ ext/SDBM_File/Makefile.PL 2003-12-17 12:19:21.000000000 +0100
@@ -44,7 +44,7 @@ EOT
} elsif ($^O ne 'VMS') {
'
$(MYEXTLIB): sdbm/Makefile
- cd sdbm && $(MAKE) all
+ cd sdbm && $(MAKE) static
';
}
else {
End Of Patch
Maybe all "all"'s should be changed to "static" in Makefile.PL, but maybe anly
for when it is called in the core distro.
Leaves the inconsistency now arising that $(LDFROM) is not including
sdbm/libsdbm.a
If I add that to Makefile, all works.
Open for follow up's on this
We shouldn't be building dynamically, it should be static.
This all started because of changes to top_targets in MakeMaker. SDBM's
Makefile.PL overrode top_targets without calling its parent's methods
and thus lost some critical targets. In fixing that in the Makefile.PL,
other things broke, etc...
I moved the new targets (blibdirs stuff) out of top_targets and they're
now generated independently. So if we just wanted to throw up our
hands in frustration we could roll the SDBM Makefile.PLs back to what they
were.
--
Michael G Schwern sch...@pobox.com http://www.pobox.com/~schwern/
One disease, long life. No disease, short life.
My PIT shows that it must have been changed between 21563 and 21567
Automated smoke report for 5.9.0 patch 21563 on aix - 3 (004ca4aa4c00/1 cpu)
(i2) using version
Report by Test::Smoke v1.18.10 (perl 5.8.0) [9 hours 15 minutes]
21563 Configuration (common) none
------------ ----------------------------------------------------------------
O O O O O O
F F F F F F -Duselongdouble
O O O O O O -Duse64bitint
c c c c c c -Duseithreads
c c c c c c -Duseithreads -Duselongdouble
c c c c c c -Duseithreads -Duse64bitint
| | | | | +- LC_ALL = EN_US.UTF-8 -DDEBUGGING
| | | | +--- PERLIO = perlio -DDEBUGGING
| | | +----- PERLIO = stdio -DDEBUGGING
| | +------- LC_ALL = EN_US.UTF-8
| +--------- PERLIO = perlio
+----------- PERLIO = stdio
Automated smoke report for 5.9.0 patch 21567 on aix - 3 (004ca4aa4c00/1 cpu)
(i2) using version
Report by Test::Smoke v1.18.10 (perl 5.8.0) [1 hour 7 minutes]
21567 Configuration (common) none
------------ ----------------------------------------------------------------
m m m m m m
m m m m m m -Duselongdouble
m m m m m m -Duse64bitint
c c c c c c -Duseithreads
c c c c c c -Duseithreads -Duselongdouble
c c c c c c -Duseithreads -Duse64bitint
This is exactly what I did :
Change 21959 by rgs@sixop on 2003/12/26 08:51:06
Restore ext/SDBM_File/sdbm/Makefile to its pre-21655 state.
This fixes building SDBM_File on AIX.
Affected files ...
... //depot/perl/ext/SDBM_File/sdbm/Makefile.PL#20 edit
bleadperl now builds on AIX 5.2 (and all tests passes with the
default configuration.)