[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test suite failures with --no-copy-dt-needed-entries

From: Kurt Roeckx
Subject: Re: test suite failures with --no-copy-dt-needed-entries
Date: Mon, 28 Mar 2011 01:08:22 +0200
User-agent: Mutt/1.5.20 (2009-06-14)


We're seeing this currently in Debian:

FAIL: tests/tagdemo-make.test
SKIP: tests/tagdemo-exec.test
PASS: tests/tagdemo-shared.test
FAIL: tests/tagdemo-make.test
SKIP: tests/tagdemo-exec.test
PASS: tests/tagdemo-undef.test
FAIL: tests/tagdemo-make.test
SKIP: tests/tagdemo-exec.test
3 of 119 tests failed

I've tested this with the 2.4 version.

The failure from the log is:
/bin/bash ./libtool --tag=CXX   --mode=link g++  -g -O2   -o tagdemo main.o 
libbaz.la -ldl
libtool: link: g++ -g -O2 -o .libs/tagdemo main.o  ./.libs/libbaz.so -ldl 
-Wl,-rpath -Wl,/home/kurt/libtool/libtool-2.4/_inst-tagdemo/lib
/usr/bin/ld: main.o: undefined reference to symbol 'convenience'
/usr/bin/ld: note: 'convenience' is defined in DSO 
//home/kurt/libtool/libtool-2.4/tests/tagdemo/.libs/libfoo.so.0 so try adding 
it to the linker command line
//home/kurt/libtool/libtool-2.4/tests/tagdemo/.libs/libfoo.so.0: could not read 
symbols: Invalid operation
collect2: ld returned 1 exit status

I was expecting this to break with the change in toolchain.

In case you wonder why we get that error now, it's because gcc now
passes --no-copy-dt-needed-entries to the linker.  I think I've
mailed the lists with a similar case just like this before.

The problem is main.o is linking to libbaz (which is not a
convenience library, and is linked to libfoo), but is using
symbols from libfoo directly and not linking too it.  This
is just wrong, but used to work because ld fixed it for you.
And libtool probably also tries to fix it for you if you don't
set link_all_deplibs to no.

I plan to adjust all the tests to add the proper libraries.
Would you be interested in the patch?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]