Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107166 - p7zip-4.27 needs fPIC lovin'
Summary: p7zip-4.27 needs fPIC lovin'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-25 05:26 UTC by marvin rouge
Modified: 2005-10-04 03:47 UTC (History)
5 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 marvin rouge 2005-09-25 05:26:19 UTC
Trying tu upgrade after a sync, p7zip-2.4.20-r1 to 2.4.27
I have an error about "reloaction" and "fPIC". As suggested in the error
message, I add -fPIC to my CFLAGS and p7zip  builds.

Reproducible: Always
Steps to Reproduce:
1.Sync
2.Update p7zip from 4.20-r1 to 4.27
3.

Actual Results:  
Build ends with "relocation error" (some thing I don't understand):

x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../../Windows/FileIO.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../../Windows/PropVariant.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../../Windows/Synchronization.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../Compress/Copy/CopyCoder.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -shared -o
../../../bin/Formats/7z.so  ../../../Common/MyWindows.o ../../../Common/Alloc.o
../../../Common/Vector.o ../../../Common/StringConvert.o
../../../Common/String.o ../../../Common/CRC.o ../../../Common/IntToString.o
../../../Common/StringToInt.o DllExports.o 7zDecode.o 7zEncode.o 7zExtract.o
7zFolderInStream.o 7zFolderOutStream.o 7zHandler.o 7zHandlerOut.o 7zHeader.o
7zIn.o 7zMethodID.o 7zMethods.o 7zOut.o 7zProperties.o 7zSpecStream.o 7zUpdate.o
CodecsPath.o CoderLoader.o CoderMixer2.o CoderMixer2MT.o CrossThreadProgress.o
FilterCoder.o InStreamWithCRC.o ItemNameUtils.o MultiStream.o StreamUtils.o
OutStreamWithCRC.o InOutTempBuffer.o LimitedStreams.o LockedStream.o OutBuffer.o
ProgressUtils.o StreamBinder.o StreamObjects.o DLL.o FileDir.o FileFind.o
FileIO.o PropVariant.o Synchronization.o CopyCoder.o
../../../myWindows/wine_date_and_time.o ../../../myWindows/myModuleFileName.o
-lpthread -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
../../../Common/Vector.o: relocation R_X86_64_32S against `vtable for
CBaseRecordVector' can not be used when making a shared object; recompile with -fPIC
../../../Common/Vector.o: could not read symbols: Mauvaise valeur
collect2: ld a retourn
Comment 1 marvin rouge 2005-09-25 05:26:19 UTC
Trying tu upgrade after a sync, p7zip-2.4.20-r1 to 2.4.27
I have an error about "reloaction" and "fPIC". As suggested in the error
message, I add -fPIC to my CFLAGS and p7zip  builds.

Reproducible: Always
Steps to Reproduce:
1.Sync
2.Update p7zip from 4.20-r1 to 4.27
3.

Actual Results:  
Build ends with "relocation error" (some thing I don't understand):

x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../../Windows/FileIO.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../../Windows/PropVariant.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../../Windows/Synchronization.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -c -I../../../myWindows
-I../../../ -I../../../include_windows ../../Compress/Copy/CopyCoder.cpp
x86_64-pc-linux-gnu-g++ -march=k8 -O2 -pipe -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX  -shared -o
../../../bin/Formats/7z.so  ../../../Common/MyWindows.o ../../../Common/Alloc.o
../../../Common/Vector.o ../../../Common/StringConvert.o
../../../Common/String.o ../../../Common/CRC.o ../../../Common/IntToString.o
../../../Common/StringToInt.o DllExports.o 7zDecode.o 7zEncode.o 7zExtract.o
7zFolderInStream.o 7zFolderOutStream.o 7zHandler.o 7zHandlerOut.o 7zHeader.o
7zIn.o 7zMethodID.o 7zMethods.o 7zOut.o 7zProperties.o 7zSpecStream.o 7zUpdate.o
CodecsPath.o CoderLoader.o CoderMixer2.o CoderMixer2MT.o CrossThreadProgress.o
FilterCoder.o InStreamWithCRC.o ItemNameUtils.o MultiStream.o StreamUtils.o
OutStreamWithCRC.o InOutTempBuffer.o LimitedStreams.o LockedStream.o OutBuffer.o
ProgressUtils.o StreamBinder.o StreamObjects.o DLL.o FileDir.o FileFind.o
FileIO.o PropVariant.o Synchronization.o CopyCoder.o
../../../myWindows/wine_date_and_time.o ../../../myWindows/myModuleFileName.o
-lpthread -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
../../../Common/Vector.o: relocation R_X86_64_32S against `vtable for
CBaseRecordVector' can not be used when making a shared object; recompile with -fPIC
../../../Common/Vector.o: could not read symbols: Mauvaise valeur
collect2: ld a retourné 1 code d'état d'exécution
make[1]: *** [../../../bin/Formats/7z.so] Erreur 1
make[1]: Leaving directory
`/var/tmp/portage/p7zip-4.27/work/p7zip_4.27/7zip/Archive/7z'
make: *** [7z] Erreur 2

!!! ERROR: app-arch/p7zip-4.27 failed.
!!! Function src_compile, Line 30, Exitcode 2


Expected Results:  
Full without adding -fPIC to my CFLAGS !

Portage 2.0.52-r1 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-gentoo x86_64)
=================================================================
System uname: 2.6.13-gentoo x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.0_pre7
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
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
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="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /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/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildsyspkg candy ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.proxad.net/mirrors/ftp.gentoo.org/
http://mirror.switch.ch/ftp/mirror/gentoo/
ftp://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="fr_FR.utf8"
LC_ALL="fr_FR.utf8"
LINGUAS="fr en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib alsa apache2 audiofile avi bash-completion berkdb
bitmap-fonts bonobo cdr chroot crypt curl dba dvd dvdr dvdread eds emboss encode
esd fam firefox flac foomaticdb fortran gd gdbm gif gstreamer gtk gtk2 gtkhtml
guile hal imagemagick imlib ipv6 jabber java jpeg junit kdeenablefinal libwww
lm_sensors logrotate lzw lzw-tiff mad matroska mikmod motif mozsvg mp3 mpeg
mplayer msn mysql ncurses nls nowin nptl nptlonly nvidia ofx ogg opengl pam
pdflib perl php png python quicktime readline real ruby samba scanner sdl slang
spell sqlite ssl subtitles svg tcltk tcpd tetex tiff truetype truetype-fonts
type1-fonts unicode usb userlocales vorbis wmf xine xml xml2 xmms xpm xv xvid
zlib linguas_fr linguas_en_GB userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS


cheers !
Comment 2 Canal Vorfeed 2005-09-25 15:34:02 UTC
No wonder. p7zip-4.27.ebuild does this:

sed -i \
                -e "/^CXX=/s:g++:$(tc-getCXX):" \
                -e "/^CC=/s:gcc:$(tc-getCC):" \
                -e "s:-O1 -s -fPIC:${CXXFLAGS}:" \
                makefile* || die "cleaning up makefiles"

Of course if you'll strip -fPIC from CFLAGS it'll barf on AMD64!
Comment 3 Christian Petri 2005-10-01 14:00:23 UTC
Hi,

I can confirm that! We need a fix!
Comment 4 Simon Stelling (RETIRED) gentoo-dev 2005-10-04 03:47:33 UTC
removing the -fPIC from the sed statement obviously did the trick, thanks for
the hint :)