Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fPIC required on Linux #127

Open
adamski opened this issue Dec 6, 2023 · 4 comments
Open

fPIC required on Linux #127

adamski opened this issue Dec 6, 2023 · 4 comments

Comments

@adamski
Copy link

adamski commented Dec 6, 2023

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
@adamski
Copy link
Author

adamski commented Jan 9, 2024

@leemaguire would it be helpful if I provide a PR for this issue?

@leemaguire
Copy link
Contributor

@adamski could you share the details of your linux box? Distro version, compiler version etc.

@adamski
Copy link
Author

adamski commented Jan 9, 2024

@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

@adamski
Copy link
Author

adamski commented May 7, 2024

@leemaguire any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants