Closed nonchip closed 4 years ago
Hi, you can rebuild the lua static library by following this guide: https://github.com/rdeioris/LuaMachine/blob/master/BuildingNotes.md
the linux one is pretty "useless" (just a "make linux") but adding CFLAGS='-fPIC' should do the trick
assuming, because there's no makefile or customized lua sources in this repo, that's literally just "how to build lua from source", that won't be necessary, as i said the static lib provided by my system did the job, it's just the one you're providing that's built the wrong way.
Yes, i was meaning "lua official sources". PIC should not harm even in non-editor/non-shared so i can probably include a PIC version directly in the repository
yeah the linker usually doesn't care if the code is PIC compatible when it doesn't need to be. there's even some old server OSses that require everything to be PIC, so while nobody will run UE on those, it shows it definitely doesnt hurt :D
The included lua static library for linux x64 has been rebuilt with -fPIC. Thanks for reporting
apparently it tries to link the shared object for the plugin against a static lua library built without the PositionIndependentCode flag:
see also https://stackoverflow.com/a/19768349/668125 for an explanation why this is happening, the binary static libs you provide were compiled without the
-fPIC
compiler flag, which would be required for the code to be relocatable in a shared lib.a quick workaround was to just replace your
Source/ThirdParty/x64/liblua53_linux64.a
with the one from my distribution's lua (/usr/lib/liblua5.3.a
), because that happened to be built with PIC, but i'd suggest you rebuild the one you're providing. or if you want i can send you my "known good" binary version?