On Sun, Oct 22, 2000 at 10:51:12AM -0600, Wesley W. Terpstra wrote:
> All of what you have just described should already work under the newest libtool.

I'll double check that it doesn't work with 1.3.5, then upgrade
libtool to the latest cvs version and check again.

First for 1.3.5 thus:

> Try getting the version out of cvs and seeing if that solves your
> problems. Also check that you are compiling with commands roughly like:
> 
> libtool c++ -Wall -O2 -g -c cwd.c -o cwd.lo

/bin/sh ./libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I- -I./include 
-I../libcw/src/libcwd/include -DDEBUG    -g -fno-exceptions -pipe -Wall 
-Woverloaded-virtual -Wundef -Wpointer-arith -Winline -Wwrite-strings -Werror -c 
../libcw/src/libcwd/type_info.cc
which executes:
g++ -DHAVE_CONFIG_H -I. -I- -I./include -I../libcw/src/libcwd/include -DDEBUG -g 
-fno-exceptions -pipe -Wall -Woverloaded-virtual -Wundef -Wpointer-arith -Winline 
-Wwrite-strings -Werror -Wp,-MD,.deps/type_info.pp -c ../libcw/src/libcwd/type_info.cc 
 -fPIC -DPIC -o type_info.lo

That seems correct.

> libtool c++ -Wall -O2 -g -rpath /usr/lib -o libcwd.la cwd.lo -ldl -lbfd

/bin/sh ./libtool --mode=link g++  -g -fno-exceptions -pipe -Wall -Woverloaded-virtual 
-Wundef -Wpointer-arith -Winline -Wwrite-strings -Werror  -o libcwd.la -rpath 
/usr/local/lib -version-info 99:4:99 bfd.lo debug.lo debugdebugcheckpoint.lo 
debugmalloc.lo demangle.lo printcw.lo strerrno.lo type_info.lo utils/libutils.la -lbfd 
-liberty -ldl 
which executes:
gcc -shared  bfd.lo debug.lo debugdebugcheckpoint.lo debugmalloc.lo demangle.lo 
printcw.lo strerrno.lo type_info.lo -Wl,--whole-archive utils/.libs/libutils.al 
-Wl,--no-whole-archive  -lbfd -liberty -ldl -lc  -Wl,-soname -Wl,libcwd.so.0 -o 
.libs/libcwd.so.0.99.4

I am afraid that -liberty got linked in:

~/c++/libcw-objdir/.libs>nm libcwd.so.0.99.4 | grep xmalloc
00036a30 T xmalloc
00036a20 T xmalloc_set_program_name

while libiberty.a is a static library, not compiled with -fPIC.
This is bad.  For the rest it looks conceptually like your line.

> libtool c++ -Wall -O2 -g -c cw.c -o cw.lo

/bin/sh ./libtool --mode=compile g++  -I. -I- -I./include 
-I../../../libcw/src/libcw/include    -DDEBUG -g -fno-exceptions -pipe -Wall 
-Woverloaded-virtual -Wundef -Wpointer-arith -Winline -Wwrite-strings -Werror -c 
version.cc
which executes:
g++ -I. -I- -I./include -I../../../libcw/src/libcw/include -DDEBUG -g -fno-exceptions 
-pipe -Wall -Woverloaded-virtual -Wundef -Wpointer-arith -Winline -Wwrite-strings 
-Werror -Wp,-MD,.deps/version.pp -c version.cc  -fPIC -DPIC -o version.lo

This is equivalent with the above

> libtool c++ -Wall -O2 -g -rpath /usr/lib -o libcw.la cw.lo libcwd.la

/bin/sh ./libtool --mode=link g++  -DDEBUG -g -fno-exceptions -pipe -Wall 
-Woverloaded-virtual -Wundef -Wpointer-arith -Winline -Wwrite-strings -Werror  -o 
libcw.la -rpath /usr/local/lib -version-info 0:0:0 version.lo 
crosslink/libcrosslink.la io/libio.la kernel/libkernel.la llists/libllists.la 
net/libnet.la ../libcwd/libcwd.la 
which executes:
libtool: link: error: cannot link shared libraries into libtool libraries

Duh.  Well, you said that it was supported in 1.4, not 1.3.5.

> c++ -Wall -O2 -g -c mytest.c -o mytest.o
> libtool c++ -Wall -O2 -g -o mytest mytest.o libcwd.la

Surely you mean: libtool c++ -Wall -O2 -g -o mytest mytest.o libcw.la
Note the libcwd.la -> libcw.la

> PS. I've moved my reply from 'libtool-patch' to 'libtool' b/c there is no
> patch under discussion.

Ok.

> Wesley W. Terpstra <[EMAIL PROTECTED]>
> Javien Canada Inc. - Linux Developer

Thanks, I'll follow up with the results under 1.4-to-be tomorrow.

-- 
Carlo Wood <[EMAIL PROTECTED]>                        -=- Jesus Loves you -=-

_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to