Subject: recent libtool broken
To: None <>
From: SUNAGAWA Keiki <>
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
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 -rpath /usr/pkg/lib -version-info 13:9:0 gthread.lo -lpthread 
/usr/bin/ld -shared -o .libs/ /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/  -R/usr/pkg/lib -R/usr/pkg/lib -soname /usr/lib/crtendS.o
/usr/bin/ld: unrecognized option `-Wl,--rpath'
*** Error code 1


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 <> <>