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
[regression in 2020.11.02.00] can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment; recompile object files with -fPIC #399
Comments
I am running into this issue trying to build fbthrift, any ideas on what to do to solve it? |
The error message itself says what to do. |
Can be done by setting the |
No, this is a bug in thrift because it fails without special setting by the user. |
How do you build thrift? Could you provide repro command(s)? |
We build with When |
If you enable shared libraries then you should also enable PIC, the normal build configuration doesn't require any of that. That said, a PR to enable PIC if |
FYI: This isn't how cmake projects normally work. Setting BUILD_SHARED_LIBS=ON should automatically set -fPIC through cmake. This happens for virtually all projects. There's either a bug in the fbthrift project, or in cmake that is somehow triggered by fbthrift. |
Ah, you are right. We should enable |
Summary: Compile `compiler_generators` with `-fPIC` when building shared libraries. #399 https://cmake.org/cmake/help/latest/guide/tutorial/Selecting%20Static%20or%20Shared%20Libraries.html#mathfunctions-cmakelists-txt-position-independent-code Reviewed By: avalonalex Differential Revision: D53018308 fbshipit-source-id: f620a25dc72df60dd51f43fd832b455df4fefba4
Summary: Compile `compiler_generators` with `-fPIC` when building shared libraries. facebook/fbthrift#399 https://cmake.org/cmake/help/latest/guide/tutorial/Selecting%20Static%20or%20Shared%20Libraries.html#mathfunctions-cmakelists-txt-position-independent-code Reviewed By: avalonalex Differential Revision: D53018308 fbshipit-source-id: f620a25dc72df60dd51f43fd832b455df4fefba4
This particular error should be fixed in 8a08254. |
FreeBSD 12.2
The text was updated successfully, but these errors were encountered: