Bug 35675 - lua 5.0.1_beta needs -fPIC on amd64
Bug#: 35675 Product:  Gentoo Linux Version: unspecified Platform: AMD64
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: TEST-REQUEST Assigned To: amd64@gentoo.org Reported By: 3.14159@gmx.net
Component: Applications
URL: 
Summary: lua 5.0.1_beta needs -fPIC on amd64
Keywords:  
Status Whiteboard: 
Opened: 2003-12-12 12:26 0000
Description:   Opened: 2003-12-12 12:26 0000
emerging lua 5.0.1_beta20031003 on amd64 fails because of some relocation
errors,when building an shared library. adding -fPIC to CFLAGS fixes this and
lua compiles cleanly? (ready for unmasking?).

Reproducible: Always
Steps to Reproduce:
1.emerge /usr/portage/dev-lang/lua/lua-5.0.1_beta20031003.ebuild

Actual Results:  
ld -o lib/liblua.so.5.0 -shared src/*.o
ld: src/lapi.o: relocation R_X86_64_32 can not be used when making a shared
object; recompile with -fPIC
src/lapi.o: could not read symbols: Bad value
make: *** [so] Error 1

!!! ERROR: dev-lang/lua-5.0.1_beta20031003 failed.
!!! Function src_compile, Line 30, Exitcode 2
!!! emake so failed


Expected Results:  
>>> dev-lang/lua-5.0.1_beta20031003 merged.


Portage 2.0.49-r18 (default-amd64-1.4, gcc-3.3.2, glibc-2.3.2-r9,
2.6.0-test11-g
entoo-r2)
=================================================================
System uname: 2.6.0-test11-gentoo-r2 x86_64 4
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/s
hare/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo
http://gentoo.inode
.at/"
MAKEOPTS="-j2"
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="3dnow X aalib alsa amd64 apm arts avi berkdb cdr crypt dvdr encode esd
fbco
n foomaticdb gdbm gif gpm gtk gtk2 imlib ipv6 javascript jpeg libg++ libwww
mikm
od mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png
p
ython quicktime readline sdl slang spell sse ssl tcpd truetype xml2 xmms xv
zlib
"

------- Comment #1 From Daniel Ahlberg (RETIRED) 2004-01-06 09:23:58 0000 -------
Already fixed

------- Comment #2 From Darryl Bleau 2004-01-27 13:20:07 0000 -------
It is? I still get this same error:

ld -o lib/liblua.so.5.0 -shared src/*.o
ld: src/lapi.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
src/lapi.o: could not read symbols: Bad value
make: *** [so] Error 1

------- Comment #3 From Thomas Weidner 2004-01-28 08:46:32 0000 -------
same here,still get the original error....

------- Comment #4 From Daniel Ahlberg (RETIRED) 2004-02-06 08:07:44 0000 -------
Please try lua-5.0.1_beta20031003-r2.ebuild, I've readded the pic patch and it
compiled cleanly for me.

------- Comment #5 From Thomas Weidner 2004-02-06 15:52:25 0000 -------
compiles fine here