Subject: recent libtool broken
To: None <tech-pkg@netbsd.org>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: tech-pkg
Date: 03/18/2001 10:33:03
Hi, I have a trouble with recent libtool. It doesn't handle
'--mode=link' target on ELF platforms. I reproduced this on
i386 and macppc.
Here's the log output.
----------
cd /usr/pkgsrc/devel/glib
make
...
Making all in gthread
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../gthread -DG_LOG_DOMAIN=\"GThread\" -I/usr/pkg/include -O -Wall -D_REENTRANT -c gthread.c
mkdir .libs
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../gthread -DG_LOG_DOMAIN=\"GThread\" -I/usr/pkg/include -O -Wall -D_REENTRANT -c gthread.c -fPIC -DPIC -o .libs/gthread.o
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../gthread -DG_LOG_DOMAIN=\"GThread\" -I/usr/pkg/include -O -Wall -D_REENTRANT -c gthread.c -o gthread.o >/dev/null 2>&1
/bin/sh ../libtool --mode=link cc -O -Wall -D_REENTRANT -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o libgthread.la -rpath /usr/pkg/lib -version-info 13:9:0 gthread.lo -lpthread
/usr/bin/ld -shared -o .libs/libgthread.so.13.9 /usr/lib/crtbeginS.o .libs/gthread.o -Wl,--rpath -Wl,/usr/pkg/lib -Wl,--rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib /usr/pkg/lib/libpthread.so -R/usr/pkg/lib -R/usr/pkg/lib -soname libgthread.so.13 /usr/lib/crtendS.o
/usr/bin/ld: unrecognized option `-Wl,--rpath'
*** Error code 1
Stop.
...
----------
Looking at the ltcf-*.sh in libtool source, they set a
variable archive_cmds to '$LD -Bshareable ...', which is
expaned to 'ld -Bshareable ...' on ELF platforms, but ld
doesn't understand '-Wl, ' type options, which comes from
${wl}. Simply replacing '--rpath' to '-R' doesn't help.
Please someone have clue look at this? I don't know what is
the right solution here.
--
SUNAGAWA Keiki <kei@NetBSD.org> <kei@jp.NetBSD.org>
http://www.NetBSD.org/ http://www.jp.NetBSD.org/