Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2011 12:19:40 +0100
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Rainer Hurling <rhurlin@gwdg.de>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Ed Schouten <ed@80386.nl>, Current FreeBSD <freebsd-current@freebsd.org>, Ports FreeBSD <freebsd-ports@freebsd.org>
Subject:   lang/lua: /usr/bin/ld: lapi.o: relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC
Message-ID:  <4EFC4CCC.3050507@zedat.fu-berlin.de>
In-Reply-To: <4EFC4579.6060608@gwdg.de>
References:  <4EFAF3FC.60002@zedat.fu-berlin.de> <20111228135808.GW50300@deviant.kiev.zoral.com.ua> <4EFB2344.3000302@zedat.fu-berlin.de> <20111228142957.GX50300@deviant.kiev.zoral.com.ua> <4EFB447D.3000808@gwdg.de> <20111228181054.GF1895@hoeg.nl> <4EFB5E0C.90302@zedat.fu-berlin.de> <20111228183132.GB50300@deviant.kiev.zoral.com.ua> <4EFC4579.6060608@gwdg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigD84A0952DF1FB12075D23DE5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Am 12/29/11 11:48, schrieb Rainer Hurling:
> On 28.12.2011 19:31 (UTC+1), Kostik Belousov wrote:
>> On Wed, Dec 28, 2011 at 07:21:00PM +0100, O. Hartmann wrote:
>>> Am 12/28/11 19:10, schrieb Ed Schouten:
>>>> * Rainer Hurling<rhurlin@gwdg.de>, 20111228 17:31:
>>>>> error: macro "_Static_assert" passed 3 arguments, but takes just 2
>>>>> In file included from
>>>>> /usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/include/pr=
ecompiled/stdc++.h:103:0:
>>>>>
>>>>
>>>> Hmmm... This seems to apply to my changes. I will look into this
>>>> tomorrow. Thanks for the report!
>>>>
>>>
>>>
>>> Be aware that the error produced by the linker I mentioned in the
>>> initial post occurs on FreeBSD 10 as well as FreeBSD 9.0.
>>>
>>> I already filed a PR about the problem of a non compiling lang/gcc46
>>> today (ports/163672: lang/gcc46: make failed for lang/gcc46). For tes=
t
>>> puproses, I rebuild gcc46 on our FreeBSD 9.0 boxes - without any
>>> problem.
>>>
>>> I guess, the commit r228902 has been done to FreeBSD 10.0 and not 9.0=
=2E
>>
>> Obviously, linker error during the compilation of third-party software=

>> has nothing to do with compiler error occuring when building gcc.
>>
>> Do people ever read the texts of the messages ?
>=20
> Kostik, probably you are right. I had read the messages, but there are
> some strange errors with gcc46 on head for two days now, which leaded m=
e
> in the wrong direction. So sorry for erroneously 'hijacking' this threa=
d
> with another problem most certain only existing in head.
>=20
>=20
> I found another trail, which hopefully is more usefull for solving the
> problem Oliver described.
>=20
> Whe I try to build lang/lua I get this error:
>=20
> [..snip..]
> cc -o liblua.so -O2 -fno-strict-aliasing -pipe -msse3  -Wall
> -DLUA_USE_LINUX   -shared -Wl,-soname=3Dliblua-5.1.so.1 lapi.o lcode.o
> ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o=

> lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
> lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o
> lstrlib.o loadlib.o linit.o
> ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o
> llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.=
o
> ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o
> lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
> ranlib liblua.a
> cc -o lua  lua.o liblua.a -lm -Wl,-E -lreadline
> cc -o luac  luac.o print.o liblua.a -lm -Wl,-E -lreadline
> /usr/bin/ld: lapi.o: relocation R_X86_64_32 against `luaO_nilobject_'
> can not be used when making a shared object; recompile with -fPIC
> lapi.o: could not read symbols: Bad value
> *** Error code 1
>=20
>=20
> It also gives a linker error, almost the same relocation is named. This=

> does only happen with option '-msse3' enabled in /etc/make.conf:
>=20
> CFLAGS=3D -O2 -fno-strict-aliasing -pipe -msse3
>=20
> Using CLFAGS without -msse3 (default) works well:
>=20
> CFLAGS=3D -O2 -fno-strict-aliasing -pipe
>=20
>=20
> The systems processor, were this happens, is a
>=20
> CPU: AMD Phenom(tm) II X6 1090T Processor (3214.32-MHz K8-class CPU)
>   Origin =3D "AuthenticAMD"  Id =3D 0x100fa0  Family =3D 10  Model =3D =
a
> Stepping =3D 0
> Features=3D0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,=
PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
>=20
>   Features2=3D0x802009<SSE3,MON,CX16,POPCNT>
>   AMD
> Features=3D0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3=
DNow!>
>   AMD
> Features2=3D0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW=
,IBS,SKINIT,WDT>
>=20
>   TSC: P-state invariant, performance statistics
>=20
> FreeBSD 10-CURRENT (amd64) r228920
>=20
> In hope of a more belonging posting,
> Rainer
> _______________________________________________


WOW!

I tried lang/lua on FreeBSD 9.0-PRE and see exactly this error:

clang -O2  -fno-strict-aliasing -pipe -march=3Dcore2 -Wall -DLUA_USE_LINU=
X
-c print.c
clang -o liblua.so -O2  -fno-strict-aliasing -pipe -march=3Dcore2 -Wall
-DLUA_USE_LINUX   -shared -Wl,-soname=3Dliblua-5.1.so.1 lapi.o lcode.o
ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o
lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o
lstrlib.o loadlib.o linit.o
/usr/bin/ld: lapi.o: relocation R_X86_64_32 against `luaO_nilobject_'
can not be used when making a shared object; recompile with -fPIC
lapi.o: could not read symbols: Bad value
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
*** Error code 1
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o
llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o
ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o
lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
ranlib liblua.a
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/lang/lua.

=3D=3D=3D>>> make failed for lang/lua
=3D=3D=3D>>> Aborting update



On FreeBSD 10.0-CURRENT I see this:
clang -O2 -fno-strict-aliasing -pipe -march=3Dcore2 -Wall -DLUA_USE_LINUX=

-c linit.c
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o
llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o
ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o
lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o
ranlib liblua.a
clang -O2 -fno-strict-aliasing -pipe -march=3Dcore2 -Wall -DLUA_USE_LINUX=

-c lua.c
clang -o lua  lua.o liblua.a -lm -Wl,-E -lreadline
clang -O2 -fno-strict-aliasing -pipe -march=3Dcore2 -Wall -DLUA_USE_LINUX=

-c luac.c
clang -O2 -fno-strict-aliasing -pipe -march=3Dcore2 -Wall -DLUA_USE_LINUX=

-c print.c
clang -o luac  luac.o print.o liblua.a -lm -Wl,-E -lreadline
clang -o liblua.so -O2 -fno-strict-aliasing -pipe -march=3Dcore2 -Wall
-DLUA_USE_LINUX   -shared -Wl,-soname=3Dliblua-5.1.so.1 lapi.o lcode.o
ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o
lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o
lstrlib.o loadlib.o linit.o
/usr/bin/ld: lapi.o: relocation R_X86_64_32 against `luaO_nilobject_'
can not be used when making a shared object; recompile with -fPIC
lapi.o: could not read symbols: Bad value
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
*** Error code 1

Stop in /usr/ports/lang/lua/work/lua-5.1.4/src.
*** Error code 1

Stop in /usr/ports/lang/lua/work/lua-5.1.4/src.
*** Error code 1

Stop in /usr/ports/lang/lua/work/lua-5.1.4.
*** Error code 1

Stop in /usr/ports/lang/lua.

=3D=3D=3D>>> make failed for lang/lua
=3D=3D=3D>>> Aborting update

Terminated
Terminated

This is very strange!


Regards,
Oliver


--------------enigD84A0952DF1FB12075D23DE5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iQEcBAEBAgAGBQJO/EzMAAoJEOgBcD7A/5N8aroIAKBHS+QwuohlXIi25B6zFU6I
SWw0GV3NEWOa8IAarrPYSjG8qUAW07XNsmv+TAEuXwetalD0AMp0yn8p39SZ/2MA
i9a0e8XkRWl5XW4VRgjSDSsN9q3vkiCwZRa+iAvYyFj1N53uo2haGSqfUf8P4Tan
g9PGSD3pILoDw0NoG3gtVN3kEuWegl4IQa9c/szplxFZ8AKS7yDuc9QKgNWnPySZ
CFkguebT2u8GCBUqSq04sl7MNJePP2/EzCnvNPF2pKpmy8p9DvW2bZnZFhjbmXCO
DqswMP9IuXqzL/2Sd2atLQKZbShpReY5lIZCu2JF0QGUQ9p0wnD8gwnJWFJFe0I=
=r/UC
-----END PGP SIGNATURE-----

--------------enigD84A0952DF1FB12075D23DE5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EFC4CCC.3050507>