You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've been trying to build GEOS with the latest FMS and after not being able to do it with Autotools (see #805), I went back to CMake build and I got close. So close except I got a message like:
relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
It wasn't exactly this, but my terminal lost the real error as I stupidly had only like 100 lines of playback. ☹️
The main issue is that we build MOM6 as a shared object library, but as far as I can tell, FMS builds as a static library (libfms_r4.a). Or it least, as I have it set up, that's how it built for me.
We've encountered this before with some of our Baselibs and the usual solution is to "add -fPIC" or in CMake terms...
Describe the solution you'd like
Add:
set(CMAKE_POSITION_INDEPENDENT_CODEON)
to CMakeLists.txt
I did this in my 2021.03 checkout at line 51 and...it worked.
Describe alternatives you've considered
I guess I could try building FMS as a shared object library, but I'm not sure how. My scan of its CMake and instructions didn't seem to show how.
Now, the question is: does setting this hurt you? I don't think it should as it just adds -fPIC everywhere and that's nigh-standard nowadays.
The text was updated successfully, but these errors were encountered:
mathomp4
added
the
enhancement
Issue/PR for a modification that increases performance, improves syntax, or adds functionality.
label
Sep 1, 2021
@mathomp4
We should be able to choose at build time to build a shared or static FMS library (or both).
It will need minimal modifications to CMakeLists.txt and I know what needs to be done to enable this.
If you want, I can provide a patch/branch for you to test with GEOS in the next few weeks.
Is your feature request related to a problem? Please describe.
I've been trying to build GEOS with the latest FMS and after not being able to do it with Autotools (see #805), I went back to CMake build and I got close. So close except I got a message like:
It wasn't exactly this, but my terminal lost the real error as I stupidly had only like 100 lines of playback.☹️
The main issue is that we build MOM6 as a shared object library, but as far as I can tell, FMS builds as a static library (
libfms_r4.a
). Or it least, as I have it set up, that's how it built for me.We've encountered this before with some of our Baselibs and the usual solution is to "add -fPIC" or in CMake terms...
Describe the solution you'd like
Add:
to
CMakeLists.txt
I did this in my 2021.03 checkout at line 51 and...it worked.
Describe alternatives you've considered
I guess I could try building FMS as a shared object library, but I'm not sure how. My scan of its CMake and instructions didn't seem to show how.
Now, the question is: does setting this hurt you? I don't think it should as it just adds
-fPIC
everywhere and that's nigh-standard nowadays.The text was updated successfully, but these errors were encountered: