realm-cpp
realm-cpp copied to clipboard
fPIC required on Linux
My Linux build server reports the following linker error:
ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol 'vtable for realm::internal::DefaultTransport'; recompile with -fPIC
>>> defined in ../_deps/cpprealm-build/src/libcpprealm.a(network_transport.cpp.o)
>>> referenced by network_transport.cpp
>>> network_transport.cpp.o:(realm::internal::DefaultTransport::~DefaultTransport()) in archive ../_deps/cpprealm-build/src/libcpprealm.a
I have solved this issue with our own libraries with the following:
set_target_properties(${PROJECT_NAME} PROPERTIES
POSITION_INDEPENDENT_CODE TRUE
@leemaguire would it be helpful if I provide a PR for this issue?
@adamski could you share the details of your linux box? Distro version, compiler version etc.
@leemaguire I'm using this Docker image: https://hub.docker.com/r/arbmind/cmake-clang
This is a link to the Docker file used to create the image: https://github.com/arBmind/cmake-containers/blob/develop/Dockerfile
@leemaguire any updates?