<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>35675</bug_id>
          
          <creation_ts>2003-12-12 12:26 0000</creation_ts>
          <short_desc>lua 5.0.1_beta needs -fPIC on amd64</short_desc>
          <delta_ts>2004-02-06 15:52:25 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>TEST-REQUEST</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>3.14159@gmx.net</reporter>
          <assigned_to>amd64@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>3.14159@gmx.net</who>
            <bug_when>2003-12-12 12:26:28 0000</bug_when>
            <thetext>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:  
&gt;&gt;&gt; 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=&quot;amd64 ~amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O3 -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
COMPILER=&quot;gcc3&quot;
CONFIG_PROTECT=&quot;/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
hare/config /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/env.d&quot;
CXXFLAGS=&quot;-O3 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs ccache sandbox userpriv usersandbox&quot;
GENTOO_MIRRORS=&quot;ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.inode
.at/&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.europe.gentoo.org/gentoo-portage&quot;
USE=&quot;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
&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aliz@gentoo.org</who>
            <bug_when>2004-01-06 09:23:58 0000</bug_when>
            <thetext>Already fixed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>darrylbleau@submersion.com</who>
            <bug_when>2004-01-27 13:20:07 0000</bug_when>
            <thetext>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
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>3.14159@gmx.net</who>
            <bug_when>2004-01-28 08:46:32 0000</bug_when>
            <thetext>same here,still get the original error....</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aliz@gentoo.org</who>
            <bug_when>2004-02-06 08:07:44 0000</bug_when>
            <thetext>Please try lua-5.0.1_beta20031003-r2.ebuild, I&apos;ve readded the pic patch and it compiled cleanly for me.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>3.14159@gmx.net</who>
            <bug_when>2004-02-06 15:52:25 0000</bug_when>
            <thetext>compiles fine here</thetext>
          </long_desc>
      
    </bug>

</bugzilla>