"Hidden symbol `atexit' verwiesen wird, die von DSO" bei der Verwendung von libtool mit gcov

Ich habe ein C++ - Projekt, benutzt die GNU Autotools für seine Skripts erstellen und libtool für die Verknüpfung. Vor kurzem habe ich Hinzugefügt, code-coverage-instrumentation mit gcov, indem sichergestellt wird, dass

GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
GCOV_LDFLAGS="-fprofile-arcs -ftest-coverage"

bekommen..in meiner CFLAGS und LDFLAGS beziehungsweise. Auf OS X 10.7.4 mit g++-4.2 (installiert homebrew), funktioniert alles einwandfrei.

Auf Ubuntu 12.04 mit g++ 4.6.3, libtool ausfällt link zu einem meiner tests:

/bin/bash ./libtool --tag=CXX   --mode=link g++ -Wall -Wextra -Werror -ansi -fprofile-arcs -ftest-coverage -g -O0 -fprofile-arcs -ftest-coverage -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib   -o myproj/inttests/locale_test myproj/inttests/locale_test.o myproj/app/libapp.la -lboost_thread-mt -lboost_system-mt -pthread -llog4cplus  
libtool: link: g++ -Wall -Wextra -Werror -ansi -fprofile-arcs -ftest-coverage -g -O0 -fprofile-arcs -ftest-coverage -Wl,-rpath -Wl,/usr/local/lib -o myproj/inttests/.libs/locale_test myproj/inttests/locale_test.o -pthread  -L/usr/local/lib myproj/app/.libs/libapp.so -lboost_thread-mt -lboost_system-mt /usr/lib/liblog4cplus.so -pthread
/usr/bin/ld: myproj/inttests/.libs/locale_test: hidden symbol `atexit' in /usr/lib/x86_64-linux-gnu/libc_nonshared.a(atexit.oS) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [myproj/inttests/locale_test] Error 1

Wie behebe ich meine bauen auf ubuntu/g++ 4.6?

InformationsquelleAutor phs | 2012-07-28
Schreibe einen Kommentar