Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108261 - x11-libs/xview-3.2-r4 needs -fPIC
Summary: x11-libs/xview-3.2-r4 needs -fPIC
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-06 05:02 UTC by Dustin C. Hatch
Modified: 2006-01-25 14:06 UTC (History)
0 users

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


Attachments
patch that fixes the problem (xview-fPIC.patch,382 bytes, patch)
2006-01-24 21:22 UTC, Patrick McLean
Details | Diff
this one seems to actually work properly (xview-fPIC.patch,291 bytes, patch)
2006-01-24 22:12 UTC, Patrick McLean
Details | Diff
ebuild with patch and multilib fixups (xview-3.2-r4.ebuild,2.96 KB, text/plain)
2006-01-24 22:22 UTC, Patrick McLean
Details
patch to fix multilib issues (xview-libdir-fix.patch,3.31 KB, patch)
2006-01-25 07:12 UTC, Patrick McLean
Details | Diff
ebuild that applies multilib fixup patch and inserts the proper libdir (xview-3.2-r4.ebuild,3.11 KB, text/plain)
2006-01-25 07:15 UTC, Patrick McLean
Details
xview-dirfix.patch patch to fix up directory references (xview-dirfix.patch,4.16 KB, patch)
2006-01-25 10:58 UTC, Patrick McLean
Details | Diff
xview-3.2-r5.ebuild fixed ebuild (xview-3.2-r5.ebuild,3.31 KB, text/plain)
2006-01-25 11:13 UTC, Patrick McLean
Details
current ebuild (xview-3.2-r5.ebuild,3.31 KB, text/plain)
2006-01-25 13:17 UTC, Patrick McLean
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin C. Hatch 2005-10-06 05:02:39 UTC
When emerging x11-libs/xview-3.2-r4, the process crashes during the compile
stage with:

(cd ./xshared; x86_64-pc-linux-gnu-gcc -shared -Wl,-soname -Wl,`basename
libolgx.so.3.2.4 | sed 's/\(\.[0-9]\).*$/\1/'` -o libolgx.so.3.2.4~ ?*.o
-L/usr/lib64   -lXext  -lX11 -lutil -lc)
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
ol_color.o: relocation R_X86_64_32S against `a local symbol' can not be used
when making a shared object; recompile with -fPIC
ol_color.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [libolgx.so.3.2.4] Error 1
make[3]: Leaving directory
`/var/tmp/portage/xview-3.2-r4/work/xview-3.2p1.4-18c/lib/libolgx'
make[2]: *** [all] Error 1
make[2]: Leaving directory
`/var/tmp/portage/xview-3.2-r4/work/xview-3.2p1.4-18c/lib'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/xview-3.2-r4/work/xview-3.2p1.4-18c'
make: *** [World] Error 2

I have tried adding -fPIC to CFLAGS and pic to USE, but neither seemed to help.
I even recompiled my world having added pic to USE. Nothing seems to help.

Reproducible: Always
Steps to Reproduce:
1. emerge -av xview
2. Confirm emerge
3. Watch emerge make it to the compile stage and crash with the above error

Actual Results:  
Compile crashed, giving the above errors.

Expected Results:  
Emerge complete, installing a new and updated version of xview

Portage 2.0.53_rc3 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.11-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre8
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.13
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
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
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/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/issue /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.mirrors.tds.net/gentoo http://adelie.polymtl.ca/
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j5"
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 acpi alsa avi bash-completion bcmath berkdb bitmap-fonts bmp bonobo
bzip2 bzlib cdparanoia cdr crypt cups curl dvd dvdr dvdread emboss
emul-linux-x86 encode esd fam foomaticdb fortran gdbm gif gnome gpm gstreamer
gtk gtk2 gtkhtml guile imagemagick imlib java jpeg kde lzw lzw-tiff mad mng
motif mozilla mozsvg mp3 mpeg ncurses nls offensive ogg oggvorbis opengl pdflib
perl pic png postgres ppds python qt quicktime readline samba sasl sdl sox speex
spell ssl svg tcltk tcpd tiff truetype truetype-fonts type1-fonts usb
userlocales v4l vcd videos vorbis xml xml2 xpm xprint xv zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2005-10-06 05:34:00 UTC
no maintainer...
Comment 2 Anders Persson 2005-11-26 11:52:21 UTC
I have the same problem

# emerge --info
Portage 2.0.53_rc7 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.6-r0, 2.6.
14-gentoo x86_64)
=================================================================
System uname: 2.6.14-gentoo x86_64 AMD Opteron(tm) Processor 242
Gentoo Base System version 1.12.0_pre10
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.13
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
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O2 -pipe"
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/share/config /usr/lib/X11/xkb /
usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.linux.ee/
pub/gentoo/distfiles/ http://ftp.linux.ee/pub/gentoo/distfiles/ ftp://trumpetti.
atm.tut.fi/gentoo/"
LANG="sv_SE.ISO-8859-1"
LC_ALL="sv_SE.UTF8"
LINGUAS="sv"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 X alsa apache2 audiofile authdaemond avi berkdb bitmap-fonts 
browserplugin bzip2 cdr cgi cli crypt cups curl dba dvd eds emboss encode esd 
exif expat fam ffmpeg flac flash foomaticdb fortran ftp gd gif glut gnome gpm 
gstreamer gtk gtk2 hal idn imagemagick imlib ipv6 java javascript jpeg junit kde 
lcms ldap lzw lzw-tiff mad ming mng motif mozilla mp3 mpeg mysql mysqli ncurses 
nls nptl nptlonly ogg opengl pam pcre pdflib pear perl php png python qt 
quicktime readline samba sasl scanner sdl session sockets spell ssl svg tcltk 
tcpd tiff truetype truetype-fonts type1 type1-fonts udev unicode usb userlocales 
vhosts vorbis xml2 xmms xpm xv zlib linguas_sv userland_GNU kernel_linux 
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 3 Simon Stelling (RETIRED) gentoo-dev 2005-12-26 09:22:34 UTC
something's seriously wrong here.. not even globally doing `append-flags -fPIC ` helps to fix this crappy build system
Comment 4 Patrick McLean gentoo-dev 2006-01-24 21:22:12 UTC
Created attachment 78046 [details, diff]
patch that fixes the problem

Here's a patch that makes it compile shared libs with -fPIC. I will commit the fixed ebuild tomorrow after I get approval from Simon.
Comment 5 Patrick McLean gentoo-dev 2006-01-24 22:12:44 UTC
Created attachment 78047 [details, diff]
this one seems to actually work properly

Well, apparently that last patch just made it get a LOT farther. This is one messed up build system. Anyway this one works, though it's not as clean (I am not absolutely sure that it doesn't compile any executables with -fPIC, but I don't know if this build system has a clean way to ensure that). Sorry about the spam.
Comment 6 Patrick McLean gentoo-dev 2006-01-24 22:22:36 UTC
Created attachment 78048 [details]
ebuild with patch and multilib fixups

This has the patch line added and a multilib fixup, though it still needs some work for multilib-strict.

When I was testing, I found a missing dep on app-text/rman, and this ebuild also needs to have it's deps fixed for modular X. I will look into that and the multilib-strict issue tomorrow, if I have time.
Comment 7 Patrick McLean gentoo-dev 2006-01-25 07:12:40 UTC
Created attachment 78075 [details, diff]
patch to fix multilib issues
Comment 8 Patrick McLean gentoo-dev 2006-01-25 07:15:34 UTC
Created attachment 78076 [details]
ebuild that applies multilib fixup patch and inserts the proper libdir

This compiles cleanly, I have no way to test functionality at the moment, though.

I made a patch that replaces the hardcoded lib paths in the app with %GENTOO_LIBDIR%, then ebuild applies the patch, then uses sed to replace %GENTOO_LIBDIR% with the current libdir (output of get_libdir). This is a bit messy, but I could not think of a better way to do it.
Comment 9 Patrick McLean gentoo-dev 2006-01-25 10:58:09 UTC
Created attachment 78091 [details, diff]
xview-dirfix.patch patch to fix up directory references

This fixes up directory references in the build tree, it fixes /usr/lib references to be multilib compliant and kills /usr/X11R6 references.
Comment 10 Patrick McLean gentoo-dev 2006-01-25 11:13:11 UTC
Created attachment 78092 [details]
xview-3.2-r5.ebuild fixed ebuild

Updated ebuild, this fixes the multilib issues, moves /usr/X11R6 to /usr adds USE flags for examples and docs and fixes the dependencies for modular X
Comment 11 Patrick McLean gentoo-dev 2006-01-25 13:17:24 UTC
Created attachment 78099 [details]
current ebuild

Here's the current ebuild, I am not in front of the machine I am testing this with, I need someone to test this with games-fps/imaze and app-editors/jove (use "xjove" to test the version that links against xview) to see if they are working properly.
Comment 12 Patrick McLean gentoo-dev 2006-01-25 14:06:43 UTC
This library is not 64-bit safe, it compiles cleanly, but any app that uses it just crashes on startup. Masking this and everything that depends on it.