Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99764 - alsa-lib-1.0.9 test fails "... when making a shared object; recompile with -fPIC"
Summary: alsa-lib-1.0.9 test fails "... when making a shared object; recompile with -f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
: 96103 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-21 02:33 UTC by Attila Stehr
Modified: 2005-11-10 17:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Stehr 2005-07-21 02:33:21 UTC
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.3/../../../../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


Reproducible: Always
Steps to Reproduce:
1. emerge -vD alsa-lib

Actual Results:  
test fail

Expected Results:  
test pass

Portage 2.0.51.22-r2 (default-linux/amd64/2004.3/lib64, gcc-3.4.3,
glibc-2.3.5-r0, 2.6.12-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks sandbox severe sfperms strict test"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LINGUAS="de_DE@euro"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 audiofile avi berkdb bitmap-fonts bzlib cdr crypt
cups curl dga directfb dlloader dmalloc dpms dts dvd dvdr dvdread eds emacs
encode esd exif fam fame fat fbcon ffmpeg flac font-server foomaticdb fortran
gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 hal hardened howl imagemagick
imlib ipv6 ithreads javascript jp2 jpeg jpeg2k kde lcms libwww lzo lzw lzw-tiff
mad matroska memlimit mikmod mjpeg mmap mng mozdevelop mozsvg mp3 mpeg mpi
multilib ncurses nls nptl nptlonly ntfs nvidia ogg oggvorbis on-the-fly-crypt
openal opengl oss pam pda pdflib perl png ppds python qt quicktime readline real
reiserfs sdl slang sndfile spell ssl svg symlink tcltk tcpd test tetex tga
threads tidy tiff toolbar truetype truetype-fonts type1-fonts unicode usb
userlocales videos vorbis wmf xine xml2 xmms xpm xprint xrandr xtermtoolbar xv
xvid xvmc yv12 zlib linguas_de_DE@euro userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Attila Stehr 2005-07-21 02:38:39 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
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-21 02:51:26 UTC
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. 
 
Comment 3 Attila Stehr 2005-07-21 04:27:24 UTC
(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

Comment 4 Simon Stelling (RETIRED) gentoo-dev 2005-09-08 04:22:19 UTC
attila, can you still reproduce it? it works fine here..
also, what gcc-profile are you using? gcc-config -l shows it
Comment 5 Simon Stelling (RETIRED) gentoo-dev 2005-09-08 10:11:51 UTC
*** Bug 96103 has been marked as a duplicate of this bug. ***
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2005-11-07 12:12:04 UTC
still works fine here, assuming it's fixed since attila didn't reply to comment
#5 :)
Comment 7 Attila Stehr 2005-11-09 03:43:18 UTC
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
Comment 8 Attila Stehr 2005-11-09 03:43:18 UTC
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.
Comment 9 Simon Stelling (RETIRED) gentoo-dev 2005-11-09 11:57:11 UTC
shaving off the work over to the hardened team then ;)
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-10 03:59:05 UTC
Please try with the latest committed version which adds a patch to 1.0.10_rc3 
to fix the PIC issue (avoids static linking). 
 
Comment 11 Attila Stehr 2005-11-10 16:35:18 UTC
Seems to work fine now. Thank you!
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-10 17:35:31 UTC
Considering fixed :) I sent the patch upstream, too.