GNU bug report logs -
#15673
Problem when linking non-libNAMEd modules on AIX 6.1
Previous Next
To reply to this bug, email your comments to 15673 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#15673
; Package
libtool
.
(Mon, 21 Oct 2013 16:47:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thomas Jahns <jahns <at> dkrz.de>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Mon, 21 Oct 2013 16:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I was investigating a problem with libtool on AIX which occured as part of the
testcase libtool7.sh of automake 1.14.
The test project tries to link via -dlpreopen a module named mod2.la.
libtool then goes on to replace, as can be seen below, mod2.la with -L.libs -lmod2
$ make
/client/bin/bash ./libtool --tag=CC --mode=link xlc_r -q32 -qmaxmem=-1 -O
-o prg prg.o -dlopen libmod1.la -dlpreopen mod2.la
libtool: link: rm -f .libs/prg.nm .libs/prg.nmS .libs/prg.nmT
libtool: link: (cd .libs && xlc_r -q32 -qmaxmem=-1 -O -c "prgS.c")
libtool: link: rm -f ".libs/prgS.c" ".libs/prg.nm" ".libs/prg.nmS" ".libs/prg.nmT"
libtool: link: xlc_r -q32 -qmaxmem=-1 -O -o .libs/prg prg.o .libs/prgS.o
-L./.libs -lmod2
-Wl,-blibpath:/sw/src/autotools/automake-1.14-build/t/libtool7.dir/_inst/lib:/sw/ibm/xlc/11.1.0.8/usr/lib:/sw/ibm/xlc/11.1.0.8/usr/vac/lib:/usr/lib:/lib
ld: 0706-006 Cannot find or open library file: -l mod2
ld:open(): No such file or directory
make: *** [prg] Error 255
When I make the change to the resolution of dlpreopen modules to libtool (see
attached patch), the problem goes away:
$ make
/client/bin/bash ./libtool --tag=CC --mode=link xlc_r -q32 -qmaxmem=-1 -O
-o prg prg.o -dlopen libmod1.la -dlpreopen mod2.la
libtool: link: rm -f .libs/prg.nm .libs/prg.nmS .libs/prg.nmT
libtool: link: (cd .libs && xlc_r -q32 -qmaxmem=-1 -O -c "prgS.c")
libtool: link: rm -f ".libs/prgS.c" ".libs/prg.nm" ".libs/prg.nmS" ".libs/prg.nmT"
libtool: link: xlc_r -q32 -qmaxmem=-1 -O -o .libs/prg prg.o .libs/prgS.o
-bstatic ./.libs/mod2.a -bdynamic
-Wl,-blibpath:/sw/src/autotools/automake-1.14-build/t/libtool7.dir/_inst/lib:/sw/ibm/xlc/11.1.0.8/usr/lib:/sw/ibm/xlc/11.1.0.8/usr/vac/lib:/usr/lib:/lib
I'm sure my patch is imperfect in that it shouldn't simply switch back to
dynamic mode but instead infer from other flags what the current state of the
link editor was before switching to -bstatic but I don't know how to make that
happern. At least it's working for the moment. Because shared object can be
linked statically on AIX, it would probably also be preferrable to link the
mod2.so file.
Regards, Thomas
host-triplet: powerpc-ibm-aix6.1.0.0
shell: GNU bash 4.0.10(1)-release (powerpc-ibm-aix5.3.0.0
compiler: xlc_r 13.1.0.8
compiler flags: -q32 -qmaxmem=-1 -O
linker: /usr/bin/ld ld: LD 1.65.5.1 (1/10/12)
libtool: 2.4.2
automake 1.14
autoconf 2.69
--
Thomas Jahns
DKRZ GmbH, Department: Application software
Deutsches Klimarechenzentrum
Bundesstraße 45a
D-20146 Hamburg
Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <jahns <at> dkrz.de>
[aix-dlpreopen.patch (text/x-patch, attachment)]
[smime.p7s (application/pkcs7-signature, attachment)]
This bug report was last modified 11 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.