Open BradyAJohnston opened 3 years ago
The quickest way is to modify the lines 795, 818 and 1226 in /home/bjohnston/git/repulsive-curves/deps/geometry-central/src/../deps/happly/happly.h, respectively, to catch reference instead of value, i.e.: } catch (std::runtime_error& ...) { Alternatively, use more recent version of happly where this is fixed.
Thanks for the advice, adjusting to the reference instead of values worked (had to catch a couple more errors later as well) but now when it gets to 100% it has one final error.
[100%] Linking CXX executable bin/rcurves_app
/home/linuxbrew/.linuxbrew/bin/ld: lib/libglad.a(glad.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rcurves_app.dir/build.make:104: bin/rcurves_app] Error 1
make[1]: *** [CMakeFiles/Makefile2:322: CMakeFiles/rcurves_app.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I have tried conducting the original cmake as follows:
cmake -DCMAKE_C_COMPILER=clang -D CMAKE_CXX_FLAGS="-fPIE" ..
But I still get the same error. Would you have any more advice?
https://stackoverflow.com/questions/38296756/what-is-the-idiomatic-way-in-cmake-to-add-the-fpic-compiler-option This topic explains how to set position independent code property either on the specific library or all targets. I tried adding the set(CMAKE_POSITION_INDEPENDENT_CODE ON) to top level CMakeLists.txt and it worked without errors. There is also mention about the command line option in the answers but haven't tried out that one.
I'm excited to be able to try and use this software - but I am having trouble with the compilation step. Trying to compile on WSL on (Version
4.4.0-18362-Microsoft
) and Ubuntu:After tinkering around for a long time making sure I have sufficient packages install and ready to go, it was making good progress but now gets the series of errors below, which seem to be actual code related? Any help would be appreciated!
Using clang 10.0.0 :
cmake run:
Errors