Home › Forum › SofaPython3 › Getting Started › CMake Error while configuring SofaPyhon3 build script
Tagged: SofaPython3 CMake Error
- This topic has 5 replies, 3 voices, and was last updated 3 years, 9 months ago by Hugo.
-
AuthorPosts
-
29 January 2021 at 16:11 #18419MikePBlocked
Good day,
I have successfully built Sofa using the documentation provided for Linux in Ubuntu 20.04. I was able to run runSofa. I did not activate the SofaPython plugin during the build process and I proceeded to perform an out-of-tree build of SofaPython3 using the documentation and this thread to help. When I used cmake to configure using the line:
$ cmake -DCMAKE_PREFIX_PATH=$SOFA_BLD/install/lib/cmake $SP3_SRCI was given this CMake Error:
CMake Error at CMakeLists.txt:5 (find_package): Found package configuration file: /home/mike/sofa/build/install/lib/cmake/SofaFramework/SofaFrameworkConfig.cmake but it set SofaFramework_FOUND to FALSE so package "SofaFramework" is considered to be NOT FOUND. Reason given by package: The following imported targets are referenced, but are missing: Sofa.GL -- Configuring incomplete, errors occurred!
Please could you help if possible, as I would love to get started as soon as possible. Thank you so much for all your great work!
Kind regards,
Mike29 January 2021 at 16:49 #18420jnbrunetModeratorHey @quantanovo,
There are some very recent changes in SOFA that broke SofaPython3 and there is a patch coming up to fix theses errors. The patch should be merge this weekend or soon next week.
Note that these kind of error will probably happen often if you are closely following the master branches of both SOFA and SofaPython3.
There are now “v20.12” branches available on both SOFA and SofaPython3 which should remain stable and ensure compatibility between the two of them. I would suggest you checkout these if you want to avoid errors.
J-N
30 January 2021 at 12:09 #18447MikePBlockedHi @jnbrunet
Thank you so much for quick response. So I have used the v20.12 branches as you suggested and was able to configure SofaPython3 in CMake with no issues. I then typed make to build it but was given this error causing the build to stop:
[ 12%] Built target Plugin [ 42%] Built target Bindings.Sofa.Core [ 44%] Built target Bindings.Sofa.Components [ 52%] Built target Bindings.Sofa.Helper [ 55%] Built target Bindings.Sofa.Simulation [ 58%] Built target Bindings.Sofa.Types [ 60%] Linking CXX executable ../../../bin/Bindings.Sofa.Tests /usr/bin/ld: /home/mike/sofa/build/install/lib/libSofaGTestMain.a(SofaGTestMain.cpp.o): relocation R_X86_64_32 against '.bss' can not be used when making a PIE object; recompile with -fPIE collect2: error: ld returned 1 exit status make[2]: *** [bindings/Sofa/tests/CMakeFiles/Bindings.Sofa.Tests.dir/build.make:138: bin/Bindings.Sofa.Tests] Error 1 make[1]: *** [CMakeFiles/Makefile2:685: bindings/Sofa/tests/CMakeFiles/Bindings.Sofa.Tests.dir/all] Error 2 make: *** [Makefile:149: all] Error 2
I think it might be similar to this issue in the forum, but I am not sure.
Kind regards,
Mike1 February 2021 at 10:17 #18453jnbrunetModeratorHey Mike,
Hum, I’m not sure why you are having PIC errors here… Did you try to wipe your SofaPython3 build directory after the update to v20.12 branches?
If yes, which compiler and compiler version are you using?
You can always disable the compilation of the unittest with
cmake -DSP3_BUILD_TEST=OFF ..
inside your build directory. This might get you a little bit further in the compilation.1 February 2021 at 16:00 #18465MikePBlockedHi @jnbrunet
So I think you were right. I don’t think I completely wiped the previous build. I have redone it and it has built without any issues and seems to be running fine.
Thank you so much for your assistance!
Kind regards,
Mike5 February 2021 at 12:40 #18537HugoKeymasterCongrats to both of you @jnbrunet @quantanovo
I therefore close the topic. Do not hesitate to open a new one for any other topic.
Best wishes,Hugo
-
AuthorPosts
- The topic ‘CMake Error while configuring SofaPyhon3 build script’ is closed to new replies.