-
Notifications
You must be signed in to change notification settings - Fork 49
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
Missing -fPIC leads to the build failure: ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC #1706
Comments
Could you use |
With
|
Uh, the output you first pasted had the |
Sorry, the first one was the patched up version to have -fPIC in the port in order to build it. |
I suspect |
The C compiler is conventionally passed to the Makefile as a CC variable. |
Different vendors use different flags, even for "standard" things like |
|
Is |
Yes. |
Then you are overriding our |
The supplied The port does add -fPIC to build successfully. |
We wanted libCEED to be usable with unusual toolchains and with more user control, but without needing to edit files. CMake requires platform/toolchain files for this purpose, and both it and autotools run lots of checks at configure time. You could set |
Even if you set your own CFLAGS, with the clang compiler they should always contain -fPIC when you are building a shared library. |
FreeBSD 14.1
The text was updated successfully, but these errors were encountered: