Bug 9247 - ld --as-needed causes either crash or BFD internal error
Summary: ld --as-needed causes either crash or BFD internal error
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: binutils (show other bugs)
Version: unstable
Hardware: all Linux
: P2 critical
Assignee: Gleb F-Malinovskiy
QA Contact: qa-sisyphus
URL: http://sources.redhat.com/bugzilla/sh...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-15 17:51 MSK by Dmitry V. Levin
Modified: 2006-09-15 01:52 MSD (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Dmitry V. Levin 2006-03-16 18:06:51 MSK
Fixed in binutils-2.16.91.0.6-alt2
Comment 2 Sergey V Turchin 2006-03-22 18:07:18 MSK
Не связано ли исправлние с тем, что у меня весь kde* перестал собираться? 
 
При сборке .libs лежат свежесобранные библиотеки. 
Пытается слинковаться программа с одной из .libs/* и линкер ругается, что в 
той библиотеке unresolved символы. А они там не резолвяться из-за того, что 
они находятся в библиотеке, которая тоже свежесобранная и лежит рядом с ней 
в .libs 
--allow-shlib-undefined не подойдет, т.к. там и действительно могут оказаться 
неправильные unresolved символы. 
Comment 3 Anton Farygin 2006-03-22 18:40:36 MSK
Точнее сказать - это выглядит вот так:


/bin/sh ../libtool --silent --tag=CXX --mode=link x86_64-alt-linux-g++ 
-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align
-Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2
-pipe -Wall -Os -fpic -Wformat-security -Wmissing-format-attribute
-Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common
-fvisibility=hidden  -ftemplate-depth-99  -Wl,--as-needed
-L/usr/src/tmp/arts-buildroot//usr/lib64 -o artsplay  artsplay.o
libsoundserver_idl.la -lpthread 
/usr/bin/ld: warning: libkmedia2_idl.so.1, needed by
./.libs/libsoundserver_idl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libartsflow_idl.so.1, needed by
./.libs/libsoundserver_idl.so, not found (try using -rpath or -rpath-link)
Comment 4 Dmitry V. Levin 2006-03-22 18:49:00 MSK
http://sourceware.org/ml/binutils/2006-03/msg00259.html
Comment 5 Sergey V Turchin 2006-03-22 19:31:40 MSK
Если еще точнее, то так: 
 
 i586-alt-linux-g++ -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-su 
bscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -pipe -Wall -O3 
-march=i586 -mtune=pentium4 -fpic -Wformat- 
security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions 
-fno-check-new -fno-common -ftemplate-depth 
-99 -Wl,--as-needed -o .libs/artsplay artsplay.o  
-L/usr/src/tmp/arts-buildroot//usr/lib ./.libs/libsoundserver_idl.s 
o -L/usr/lib/qt3/lib/ 
-L/usr/lib /usr/src/RPM/BUILD/arts-1.5.1/soundserver/.libs/libkmedia2_idl.so /usr/src/RPM/BUILD 
/arts-1.5.1/flow/.libs/libartsflow.so -laudiofile -lasound -laudio -lXt -ljack 
-lvorbisfile -lvorbisenc -lvorbis -log 
g 
-lmad /usr/src/RPM/BUILD/arts-1.5.1/flow/.libs/libartsflow_idl.so /usr/src/RPM/BUILD/arts-1.5.1/mcop/.libs/libmcop. 
so -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -ldl -lpthread 
/usr/bin/ld: warning: libkmedia2_idl.so.1, needed 
by ./.libs/libsoundserver_idl.so, not found (try using -rpath or -r 
path-link) 
Comment 6 Sergey V Turchin 2006-03-23 13:49:09 MSK
А если собирать с lintool-1.5, то не доходя до вышеуказанного: 
 
i586-alt-linux-g++ -shared -nostdlib  -march=i586 -mtune=pentium4 
-Wl,-rpath-link -Wl,./.libs -Wl,--as-needed -Wl,--no-undefined 
-Wl,--allow-shlib-undefined -Wl,-rpath-link -Wl,./.libs -Wl,--as-needed 
-Wl,--enable-new-dtags /usr/lib/gcc/i586-alt-linux/3.4.5/../../../crti.o /usr/lib/gcc/i586-alt-linux/3.4.5/crtbeginS.o  .libs/kmedia2.o  
-Wl,--rpath -Wl,/usr/src/RPM/BUILD/arts-1.5.1/flow/.libs 
-L/usr/src/tmp/arts-buildroot//usr/lib -L/usr/lib/qt3/lib/ 
-L/usr/lib ../flow/.libs/libartsflow.so -L/usr/lib/gcc/i586-alt-linux/3.4.5 
-L/usr/lib/gcc/i586-alt-linux/3.4.5/../../.. -lstdc++ -lm -lc 
-lgcc_s /usr/lib/gcc/i586-alt-linux/3.4.5/crtendS.o /usr/lib/gcc/i586-alt-linux/3.4.5/../../../crtn.o 
-Wl,-soname -Wl,libkmedia2_idl.so.1 -o .libs/libkmedia2_idl.so.1.0.0 
.libs/kmedia2.o: In function `Arts::poTime::operator=(Arts::poTime 
const&)':kmedia2.cc:(.text+0x24): undefined reference to 
`Arts::Buffer::Buffer()' 
:kmedia2.cc:(.text+0x4d): undefined reference to `Arts::Buffer::~Buffer()'