Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118242 - [-fPIC] media-gfx/swftools-0.7.0
Summary: [-fPIC] media-gfx/swftools-0.7.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2006-01-07 18:35 UTC by Alan Strohm
Modified: 2007-02-14 15:53 UTC (History)
3 users (show)

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


Attachments
Add -fPIC in the relevant Makefiles (swftools-0.7.0-pic.patch,4.04 KB, patch)
2006-08-26 15:17 UTC, Bruno Roggeri
Details | Diff
swftools-0.7.0.ebuild.patch (swftools-0.7.0.ebuild.patch,288 bytes, patch)
2006-08-26 15:18 UTC, Bruno Roggeri
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Strohm 2006-01-07 18:35:44 UTC
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -g -shared SWF.o tagmap.o taglist.o tag.o image.o tags.o action.o primitives.o pyutils.o  -o SWF.so -lpython2.4 /usr/lib/python2.4/site-packages/PIL/_imaging.so ../librfxswf.a -L/usr/local/lib -L/usr/lib64 -lmp3lame -lt1 -ljpeg -lz -lm  -lz -lfontconfig -lfreetype
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.2/../../../../x86_64-pc-linux-gnu/bin/ld: ../librfxswf.a(rfxswf.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
../librfxswf.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [SWF.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/swftools-0.7.0/work/swftools-0.7.0/lib/python'
make: *** [all] Error 2

Adding -fPIC to my CFLAGS fixes it, but I suppose there should be a better solution.
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2006-01-08 10:10:52 UTC
I cannot reproduce this in x86/amd64.
Comment 2 Scott Stoddard (RETIRED) gentoo-dev 2006-01-09 19:43:57 UTC
I also cannot reproduce this.  Please post the output of your emerge info.


delta ~ # emerge --info
Portage 2.1_pre3-r1 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.13-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre13
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3 -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe -msse3 -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks multilib-strict sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa audiofile avi berkdb bitmap-fonts browserplugin bzip2 cdr crypt cups curl dbus divx4linux dvd dvdread eds emboss encode esd exif expat fam ffmpeg firefox flac foomaticdb fortran gdbm gif gimpprint glut gnome gpm gstreamer gtk gtk2 hal icq idn imagemagick imap imlib ipv6 jabber java jpeg lcms live lua lzw lzw-tiff mad mjpeg mng motif mozilla mp3 mpeg msn mysql native ncurses network nls no-old-linux noantlr nobcel nobeanutils nobsh nptl nptlonly offensive ogg oggvorbis openal opengl pam pcre pdflib perl png python qt quicktime radeon readline real rtc sdk sdl spell sqlite ssl svg tcltk tcpd theora tiff transcode truetype truetype-fonts type1-fonts udev usb userlocales v4l v4l2 vorbis wmf xine xml xml2 xpm xv xvid xvmc yahoo zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Alan Strohm 2006-01-09 21:48:31 UTC
% emerge info
Portage 2.1_pre3-r1 (default-linux/amd64/2005.0, gcc-3.4.2, glibc-2.3.6-r2, 2.6.11-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre13
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.90.0.1.1-r3, 2.15.92.0.2-r1, 2.15.92.0.2-r8, 2.16-r1, 2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/  http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo"
LANG="en_US"
LC_ALL="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 16bit 3ds X X509 Xaw3d a52 aac aalib aim alsa amd ao apache2 arts artswrappersuid audiofile avi bash-completion beepmp berkdb bigger-fonts bitmap-fonts bluetooth bmp bonobo bootsplash bzip2 bzlib cairo cddb cdparanoia cdr cgi chroot cjk codecs crypt cscope css cups curl dbus dillo directfb divx4linux doc dvd dvdr dvdread dvi eds emacs emboss encode esd ethereal evo examples exif expat fam fbcon ffmpeg flac foomaticdb fortran freetype gb gd geoip ggi gif gimpprint glut gmail gmp gnome gpm gstreamer gtk gtk2 hal howl id3 idea idn imagemagick imap imlib ipv6 jack jack-tmpfs java javascript jpeg junit kde lame lcms libcaca libwww lirc lua lzw lzw-tiff mad madwifi maildir matroska mbox mhash mikmod mng motif mozcalendar mozilla mp3 mpeg mpeg2 mpeg4 mplayer multislot musicbrainz mysql mythtv nas nautilus ncurses nfsv4 nls nptl nvidia offensive ogg oggvorbis openal opengl pam parse-clocks pcre pdflib perl php plotutils png ppds python qt quicktime readline real recode rtc samba sdl slang spell sqlite ssl startup-notification svg tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales visualization vorbis winbind wxgtk1 xanim xine xml xml2 xmms xosd xpm xscreensaver xv xvid xvmc zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Comment 4 Marcelo Goes (RETIRED) gentoo-dev 2006-01-26 11:51:34 UTC
Well, as I said, it works for me, no need do add -fPIC. You may want to ask upstream about it, but otherwise there isn't much I can do. I'm not going to add -fPIC if it is not really necessary.

Thanks for reporting, anyway.
Comment 5 Bruno Roggeri 2006-08-26 15:17:28 UTC
Created attachment 95159 [details, diff]
Add -fPIC in the relevant Makefiles

Hello, I've just been bitten by this bug. Could it be reopened ?

Attached is a patch that adds -fPIC only where it is needed. As the same object files are used to build executable and shared object, this result in some part of the executables'code to be PI, but I guess it isn't such a big deal and I prefer to leave the build system reorganisation to upstream :).
Comment 6 Bruno Roggeri 2006-08-26 15:18:27 UTC
Created attachment 95160 [details, diff]
swftools-0.7.0.ebuild.patch

and this is the associated ebuild patch.
Comment 7 Simon Stelling (RETIRED) gentoo-dev 2006-08-27 00:43:32 UTC
reopening per comment #5
Comment 8 Andrew Brock 2006-10-05 19:21:39 UTC
I can reproduce also.

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -g -shared SWF.o tagmap.o taglist.o tag.o image.o tags.o action.o primitives.o pyutils.o  -o SWF.so -lpython2.4 /usr/lib/python2.4/site-packages/PIL/_imaging.so ../librfxswf.a -L/usr/local/lib -L/usr/lib64 -lmp3lame -lt1 -ljpeg -lz -lm  -lz -lfontconfig -lfreetype
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: ../librfxswf.a(rfxswf.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
../librfxswf.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [SWF.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/swftools-0.7.0/work/swftools-0.7.0/lib/python'
make: *** [all] Error 2

!!! ERROR: media-gfx/swftools-0.7.0 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  ebuild.sh, line 608:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.




Portage 2.1.1-r1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.5
Last Sync: Thu, 05 Oct 2006 21:50:01 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.internode.on.net/pub/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="amd64 X aac alsa arts bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli crypt cups dbus dlloader dri dvd dvdr eds elibc_glibc emacs emboss emul-linux-x86 encode exif fam firefox flac ftp gcj gdbm gif gpm gstreamer hal icq input_devices_keyboard input_devices_mouse isdnlog java javascript jpeg kde kdeenablefinal kernel_linux libg++ mad mikmod mp3 mpeg msn ncurses nptl nptlonly nvidia ogg opengl pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection samba sdl session spell spl ssl svg tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_nvidia vorbis xml xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Simon Stelling (RETIRED) gentoo-dev 2007-01-14 05:01:53 UTC
Comment on attachment 95159 [details, diff]
Add -fPIC in the relevant Makefiles

Actually it is a problem, there really shouldn't be any PIC-objects in executables (except for hardened)
Comment 10 Bruno Roggeri 2007-01-14 15:45:37 UTC
(In reply to comment #9)
> (From update of attachment 95159 [details, diff] [edit])
> Actually it is a problem, there really shouldn't be any PIC-objects in
> executables (except for hardened)
> 

I agree, but is it a hard rule ? I thought it was only a performance problem. (please correct me if I'm wrong).

Well, if it's really unacceptable, maybe I'll find some time to see if I can do this better (or at list see if upstream would be willing to fix this). 

Probably not right now though, I'm somewhat busy :)
Comment 11 Simon Stelling (RETIRED) gentoo-dev 2007-02-14 15:53:06 UTC
I had a closer look at the build system and now it is clear to me why it works fine here but not for you: The ebuild doesn't install any libraries, except for the python bindings, which are only built if some obscure requirements related to python are met. Since there's no configure switch for it and nothing in the tree depends on swftools anyway, I decided to just disable them.

swftools-0.8.0 should build for everybody now.