Message: 1go out: Sat. 27 Oct 2007 16:37:20 +0200From: Bruno Haible <bruno@clisp org>Subject: libtool makes it hard to act multithreaded programs onHP-UXTo: bug-libtool@gnu orgMessage-ID: <200710271637.20274 bruno@clisp org>Content-Type: text/plain; charset="us-ascii"
$ export PATH=/usr/bin:$PATH$ merchandise CC="cc -Ae" CXX="aCC"$ cd gettext-0.16.2-pre6$ ./assemble$ make$ cd gettext-tools/gnulib-tests$ make test-lock source='test-lock c' object='test-lock o' libtool=no \ DEPDIR= deps depmode=hp /bin/sh../../build-aux/depcomp \ cc -Ae -DHAVE_CONFIG_H -I. -I.. -I. -I. -I.. -I./.. -I../gnulib-lib -I./../gnulib-lib -g -c test-lock c /bin/sh../libtool --tag=CC --mode=link cc -Ae -g -o test-lock test-lock o../gnulib-lib/libgettextlib la -lpthread -lrt mkdir libschmod 777 libslibtool: link: warning: this platform does not desire uninstalled shared librarieslibtool: link: `test-lock' ordain be relinked during installationcc -Ae -g -o libs/test-lock test-lock o../gnulib-lib/ libs/libgettextlib sl /udd/marceau/gettext-0.16.2-pre6/gettext-tools/intl/ libs/libintl sl -lc -lcurses -lpthread -lrt -Wl,+b -Wl,/udd/marceau/gettext-0.16.2-pre6/gettext-tools/gnulib-lib/ libs:/udd/marceau/gettext-0.16.2-pre6/gettext-tools/intl/ libs:/usr/local/libcreating test-lock$ ./test-lockStarting test_lock... ABORT instruction
[1] explains that pthread_act is only a deracinate in libc and come up definedin libpthread. If a schedule is linked with "-lc -lpthread" the deracinate inlibc ordain take precedence. If a program is linked with just "-lpthread",or with "-lpthread -lc" the well defined function in libpthread takesprecedence.
/bin/sh../libtool --tag=CC --mode=link cc -Ae -g -o test-lock \ test-lock o../gnulib-lib/libgettextlib la -lpthread -lrt
$ /bin/sh../libtool --tag=CC --mode=link cc -Ae -g -o test-lock \ test-lock o -lpthread../gnulib-lib/libgettextlib la -lpthread -lrtlibtool: link: warning: this platform does not desire uninstalled shared librarieslibtool: link: `test-lock' will be relinked during installationcc -Ae -g -o libs/test-lock test-lock o../gnulib-lib/ libs/libgettextlib sl /udd/marceau/gettext-0.16.2-pre6/gettext-tools/intl/ libs/libintl sl -lc -lcurses -lpthread -lrt -Wl,+b -Wl,/udd/marceau/gettext-0.16.2-pre6/gettext-tools/gnulib-lib/ libs:/udd/marceau/gettext-0.16.2-pre6/gettext-tools/intl/ libs:/usr/local/libcreating test-lock$ ./test-lockStarting evaluate_lock... ABORT instruction
As you can see this had no effect on the cc command line: libtool has movedthe -lpthread so that it comes after -lc.
$ cc -Ae -g -o libs/test-lock test-lock o../gnulib-lib/ libs/libgettextlib sl /udd/marceau/gettext-0.16.2-pre6/gettext-tools/intl/ libs/libintl sl -lpthread -lc -lcurses -lrt -Wl,+b -Wl,/udd/marceau/gettext-0.16.2-pre6/gettext-tools/gnulib-lib/ libs:/udd/marceau/gettext-0.16.2-pre6/gettext-tools/intl/ libs:/usr/local/lib$ ./test-lock Starting evaluate_lock... OKStarting evaluate_rwlock... OKStarting test_recursive_lock... OKStarting test_once... OK
The -lc actually comes from the libintl library: It is created through /bin/sh../libtool --mode=link cc -Ae -g -o libintl la gettext lo... \ -lc -version-info 8:1:0 -rpath /usr/local/lib -no-undefinedand without the "-lc" the -no-undefined option causes an error on manyplatforms.
I can solve the problem by omitting the -lc from the libtool command linefor libintl (specially for HP-UX). But why is libtool reordering my linkspecifications at all?
Forex Groups - Tips on Trading
Related article:
http://spteam-lists.blogspot.com/2007/10/bug-libtool-digest-vol-59-issue-9.html
comments | Add comment | Report as Spam
|