LuaD
LuaD copied to clipboard
Multiple linker errors of: PIE object; recompile with -fPIC
Multiple linking errors with dmd 2.081. Linker errors are beyond me but is there an easy fix to this.
Errors:
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lapi.o): relocation R_X86_64_32 against hidden symbol
luaO_nilobject_' can not be used when making a PIE object
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ldebug.o): relocation R_X86_64_32S against hidden symbol luaP_opmodes' can not be used when making a PIE object /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ldo.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lgc.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lmem.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lobject.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lparser.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lstate.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ltable.o): relocation R_X86_64_32S against
.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ltm.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lundump.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lvm.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lauxlib.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lcode.o): relocation R_X86_64_32S against hidden symbol luaP_opmodes' can not be used when making a PIE object /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(llex.o): relocation R_X86_64_32S against hidden symbol
luaX_tokens' can not be used when making a PIE object
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Error: linker exited with status 1`
Thanks!
`
dub build --force
should help.
On Sun, Jul 8, 2018 at 4:46 PM, Paul Crane [email protected] wrote:
Multiple linking errors with dmd 2.081. Linker errors are beyond me but is there an easy fix to this.
Errors: /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lapi.o): relocation R_X86_64_32 against hidden symbolluaO_nilobject_' can not be used when making a PIE object /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ldebug.o): relocation R_X86_64_32S against hidden symbol luaP_opmodes' can not be used when making a PIE object /usr/bin/ld: ../../../.dub/packages/luad- master/luad/extlib/x86_64-linux-gnu/liblua.a(ldo.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lgc.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad- master/luad/extlib/x86_64-linux-gnu/liblua.a(lmem.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lobject.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad- master/luad/extlib/x86_64-linux-gnu/liblua.a(lparser.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lstate.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ltable.o): relocation R_X86_64_32S against.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(ltm.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad- master/luad/extlib/x86_64-linux-gnu/liblua.a(lundump.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lvm.o): relocation R_X86_64_32S against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad- master/luad/extlib/x86_64-linux-gnu/liblua.a(lauxlib.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../../../.dub/packages/luad-master/luad/extlib/x86_64-linux-gnu/liblua.a(lcode.o): relocation R_X86_64_32S against hidden symbol luaP_opmodes' can not be used when making a PIE object /usr/bin/ld: ../../../.dub/packages/luad- master/luad/extlib/x86_64-linux-gnu/liblua.a(llex.o): relocation R_X86_64_32S against hidden symbolluaX_tokens' can not be used when making a PIE object /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Error: linker exited with status 1`
Thanks!
`
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JakobOvrum/LuaD/issues/109, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8l8yglLNSgs9r_nWP0itS_9wQ9HHRHks5uEY6NgaJpZM4VGlyd .
Thanks! No sadly the same result.
May have found a fix! Removing these lines from dub.json:
"sourceFiles-linux-x86": ["extlib/x86_32-linux-gnu/liblua.a"], "sourceFiles-linux-x86_64": ["extlib/x86_64-linux-gnu/liblua.a"],
Everything compiles fine then. There is also a line for windows but I didn't test it with it removed.