Summary: | alsa-lib-1.0.9 test fails "... when making a shared object; recompile with -fPIC" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Attila Stehr <as.gentoo> |
Component: | [OLD] Unspecified | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kugelfang, sound |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Attila Stehr
2005-07-21 02:33:21 UTC
Danny & Diego: :o) Hope you're not angry about adding you to the CC list. If you're: please tell me to never do it again. Just thought you could help on this issue. greetz ~ Attila I receive amd64@g.o mails, and also sound@g.o that I'm adding cc to. I never tried with test, anyway x86_64-pc-linux-gnu-gcc -Wall -pipe -g -march=athlon64 -O3 -pipe -fomit-frame-pointer -o control control.o ../src/.libs/libasound.a -lm -ldl -lpthread shouldn't crate a shared object afaik, so i can't see why it fails. (In reply to comment #2) > I receive amd64@g.o mails, and also sound@g.o that I'm adding cc to. ok, thx > I never tried with test, anyway Hum... I have FEATURES="candy severe sfperms test" in my make.conf. > x86_64-pc-linux-gnu-gcc -Wall -pipe -g -march=athlon64 -O3 -pipe > -fomit-frame-pointer -o control control.o ../src/.libs/libasound.a -lm -ldl > -lpthread > > shouldn't crate a shared object afaik, so i can't see why it fails. with (guessing -g and -Wall are compiler flags) magic ~ # CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -ldl -lm -lpthread -g -Wall" CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -ldl -lm -lpthread -g -Wall" emerge -vD alsa-lib I get x86_64-pc-linux-gnu-gcc -shared .libs/conf.o .libs/confmisc.o .libs/input.o .libs/output.o .libs/async.o .libs/error.o .libs/dlmisc.o .libs/socket.o .libs/shmarea.o .libs/userfile.o .libs/names.o -Wl,--whole-archive control/.libs/libcontrol.a mixer/.libs/libmixer.a ordinary_mixer/.libs/libordinarymixer.a pcm/.libs/libpcm.a ordinary_pcm/.libs/libordinarypcm.a rawmidi/.libs/librawmidi.a timer/.libs/libtimer.a hwdep/.libs/libhwdep.a seq/.libs/libseq.a instr/.libs/libinstr.a compat/.libs/libcompat.a alisp/.libs/libalisp.a -Wl,--no-whole-archive -lm -ldl -lpthread -march=athlon64 -Wl,--version-script=Versions -Wl,-soname -Wl,libasound.so.2 -o .libs/libasound.so.2.0.0 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object. /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/conf.o: relocation R_X86_64_PC32 against `snd_config_delete' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [libasound.la] Fehler 1 make[2]: Leaving directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/src' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/src' make: *** [all-recursive] Fehler 1 !!! ERROR: media-libs/alsa-lib-1.0.9 failed. !!! Function src_compile, Line 34, Exitcode 2 !!! make failed attila, can you still reproduce it? it works fine here.. also, what gcc-profile are you using? gcc-config -l shows it *** Bug 96103 has been marked as a duplicate of this bug. *** still works fine here, assuming it's fixed since attila didn't reply to comment #5 :) Sorry for replying this late! Problem persists with the hardened version of gcc (see below) - no problems when using the vanilla version. magic atti # gcc-config -l [1] x86_64-pc-linux-gnu-3.4.4 * [2] x86_64-pc-linux-gnu-3.4.4-hardenednopie [3] x86_64-pc-linux-gnu-3.4.4-hardenednopiessp [4] x86_64-pc-linux-gnu-3.4.4-hardenednossp [5] x86_64-pc-linux-gnu-3.4.4-vanilla magic atti # Making check in alsalisp make[1]: Entering directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/alsalisp' make[1]: F Sorry for replying this late! Problem persists with the hardened version of gcc (see below) - no problems when using the vanilla version. magic atti # gcc-config -l [1] x86_64-pc-linux-gnu-3.4.4 * [2] x86_64-pc-linux-gnu-3.4.4-hardenednopie [3] x86_64-pc-linux-gnu-3.4.4-hardenednopiessp [4] x86_64-pc-linux-gnu-3.4.4-hardenednossp [5] x86_64-pc-linux-gnu-3.4.4-vanilla magic atti # Making check in alsalisp make[1]: Entering directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/alsalisp' make[1]: Für das Ziel »check« ist nichts zu tun. make[1]: Leaving directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/alsalisp' Making check in test make[1]: Entering directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/test' make control pcm latency seq playmidi1 timer rawmidi midiloop omixer code oldapi queue_timer make[2]: Entering directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/test' if x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -static -Wall -pipe -g -march=athlon64 -O3 -pipe -fomit-frame-pointer -MT control.o -MD -MP -MF ".deps/control.Tpo" \ -c -o control.o `test -f 'control.c' || echo './'`control.c; \ then mv -f ".deps/control.Tpo" ".deps/control.Po"; \ else rm -f ".deps/control.Tpo"; exit 1; \ fi /bin/sh ../libtool --mode=link x86_64-pc-linux-gnu-gcc -static -Wall -pipe -g -march=athlon64 -O3 -pipe -fomit-frame-pointer -o control control.o ../src/libasound.la mkdir .libs x86_64-pc-linux-gnu-gcc -Wall -pipe -g -march=athlon64 -O3 -pipe -fomit-frame-pointer -o control control.o ../src/.libs/libasound.a -lm -ldl -lpthread /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: control.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC control.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [control] Fehler 1 make[2]: Leaving directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/test' make[1]: *** [check-am] Fehler 2 make[1]: Leaving directory `/var/tmp/portage/alsa-lib-1.0.9/work/alsa-lib-1.0.9/test' make: *** [check-recursive] Fehler 1 !!! ERROR: media-libs/alsa-lib-1.0.9 failed. !!! Function src_test, Line 566, Exitcode 0 !!! Make check failed. See above for details. !!! If you need support, post the topmost build error, NOT this status message. shaving off the work over to the hardened team then ;) Please try with the latest committed version which adds a patch to 1.0.10_rc3 to fix the PIC issue (avoids static linking). Seems to work fine now. Thank you! Considering fixed :) I sent the patch upstream, too. |