Hello,
I’ve posted this on the unreal forum already, but didn’t get an answer yet. So I hope that here’s someone who could help me.
I’m trying to compile my project on UE4Editor for Linux and get the error message when creating the libUE4Editor-Unreal_Project.so:
ThirdParty/orbitTools/lib/libcore.a(cJulian.cpp.o): relocation R_X86_64_32 against `.rodata’ can not be used when making a shared object; recompile with -fPIC
However cross compiling the same project with Visual Studio using the proposed toolchain clang-3.5.0-x86 does work also packaging the project using the UE4Editor on Windows works and most importantly the packed Game works on Linux.
Nevertheless I’d like to be able to use the Linux native UE4Editor to edit and compile the project…
Setup:
Cross compile chain
Win7 64bit, Visual Studio 2015, v4_clang-3.5.0_ld-2.24_glibc-2.12.2, UE4Editor 4.10.4 compiled in Visual Studio 2015 for Windows + Linux
Linux
Ubuntu 14.04.4 x86-64, UE4Editor 4.10.4, gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1), all dependencies installed according to A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums
ThirdParty library is build on the same Linux simply using cmake without any specific flags etc.
I know it might be specific to the thirds party library but the thing I don’t get is why would it compile with the same library on Windows using the cross compile change but not on Linux. Using the proposed “-fPIC” may not help because it does compile on Windows without it… Or is it specific to the Linux UE4Editor?
Many thanks in advance