Home › Forum › SOFA › Building SOFA › [SOLVED] Soft Robots plugin build error
Tagged: 64_bits, GCC, MacOS, Plugin_SoftRobots, SOFA_1912
- This topic has 14 replies, 4 voices, and was last updated 4 years, 3 months ago by Cai.
-
AuthorPosts
-
6 July 2020 at 10:13 #16802JonnyBlocked
Hi,
I am currently trying to solve the following issue: I try to build Sofa (using 19.12) with the Soft Robots Plugin (from Defrost repo) on MacOS and so far I cloned both repositories and wrote a CMakeLists.txt file to build out of tree. When I try to configure with flag PLUGIN_SOFTROBOTS activated I get the following error from CMake:
CMake Error at /Users/jona/sofa/src/SofaKernel/SofaFramework/CMakeParseLibraryList.cmake:41 (message): Invalid arguments Call Stack (most recent call first): /Users/jona/sofa/src/SofaKernel/SofaFramework/SofaMacros.cmake:840 (PARSE_LIBRARY_LIST) /Users/jona/sofa/plugins/SoftRobots/CMakeLists.txt:42 (sofa_install_libraries)
I didn’t change anything in the CMakeLists.txt file (of the plugin) and don’t really know how to solve this issue, so any help would be appreciated!
Thank you
Jonny7 July 2020 at 23:12 #16828HugoKeymasterHi @jonny
Welcome on the SOFA forum!
What is you version of the SoftRobot plugin? (what gives the
git log
command?)
What is you CMake version?
Sorry for bringing questions (before providing you a suitable answer!).Best,
Hugo
8 July 2020 at 08:11 #16832JonnyBlockedHi Hugo,
thanks for getting back at me.
I am using CMake 3.17.0 and getting the following result for thegit log
command:commit 5d9abaa63f0bd2cd620cf9da002248944f1539ce (HEAD -> master, origin/master, origin/HEAD) Merge: a2b129c e646348 Author: Damien Marchal <damien.marchal@univ-lille1.fr> Date: Tue May 5 16:29:08 2020 +0200 Merge pull request #52 from hugtalbot/fix_test_cmake_202005 Fix CMake in test commit e646348e97521e2ace4ca07904344af21837aa0e Author: htalbot <hugo.talbot@sofa-framework.org> Date: Tue May 5 16:25:30 2020 +0200 Fix CMake in test commit a2b129c4bf235a9d5ba9329caf32b0e6863dcd79 Merge: b2b3639 305ad16 Author: Damien Marchal <damien.marchal@univ-lille1.fr> Date: Mon May 4 16:19:23 2020 +0200 Merge pull request #51 from guparan/improve_packaging
Jonny
8 July 2020 at 21:34 #16841HugoKeymaster9 July 2020 at 14:11 #16847GuillaumeKeymasterHi,
There is indeed an issue in SOFA v19.12 with PARSE_LIBRARY_LIST (in SofaMacros.cmake).
It has been fixed in SOFA v20.06Could you try with this version of SOFA?
9 July 2020 at 20:01 #16853JonnyBlockedHi,
thanks for your advice. Firstly, I realized I am actually trying to build in tree.
Status quo: I switched to Sofa v20.06, cloned STLIB (which I forgot for some reason) und also changed from QT 5.14.2 to 5.15.0. I added STLIB to plugins/CMakeLists.txt and added
set(SOFA_BUILD_METIS ON)
in CMakeLists.txt of src since the flag didn’t show up in CMake GUI.
So now when I configure there are no errors but the following warnings:CMake Deprecation Warning at SofaAdvanced/CMakeLists.txt:15 (message): SofaAdvanced is deprecated. You should now explicitely find (find_package) and link (target_link_library) each module you need within: SofaNonUniformFem
after adding module SofaExporter and
CMake Warning at /Users/jona/sofa/src/SofaKernel/SofaFramework/SofaMacros.cmake:958 (message): sofa_install_libraries: no lib found with TARGETS;Qt5::Network Call Stack (most recent call first): /Users/jona/sofa/plugins/SoftRobots/CMakeLists.txt:42 (sofa_install_libraries)
after adding plugin SoftRobots (same as before, just a warning now though).
Should I just compile from here and check if everything works or do you have any advice on how to get rid of these warnings first? Thanks for your help!
14 July 2020 at 17:12 #16874JonnyBlockedHi,
here is a quick update on my current status: after successfully configuring and generating with CMake (apart from the warnings), I tried to compile. It took a couple of attempts but in the end seemed to work. Now I can open the GUI in bin directory and the caduceus scene shows. Also, apart from CGAL (which I was giving me troubles while compiling so I removed it) all plugins seem to be properly loaded – the only warning I get is
[WARNING] [PythonEnvironment] No python dir found in /Users/jona/sofa/build
I am also able to load other scenes (e.g. Soft Robots tutorials) though there are a couple of issues here: Firstly, the “orientation vectors”/coordinate system are like a picture in front of the scene and I haven’t figured out how to move them up into the corner/ out of sight and for some of the tutorial scenes that I tested the whole view was very strange.
Secondly, because QT5WebEngine is missing Doc browser has been disabled. There seems so be some kind of problem with my QT as described in previous posts and haven’t found a solution yet. This leaves me without the tutorial description which makes it harder for me as a beginner.Do you have any more suggestions on how to fix the QT problems or other things I could/should try?
A little extra question: How can I load a scene (ideally .py) directly from the terminal or what kind of workflow would you recommend when programming a new scene in general?Any help would be greatly appreciated!
15 July 2020 at 17:20 #16879GuillaumeKeymasterHi,
Glad you achieved v20.06 compilation.
The 2 CMake warnings you showed are known, the first one is here to discourage users from using SofaAdvanced in their CMakeLists, the second one is an minor issue in SoftRobots.
The warning about PythonEnvironment appears because SofaPython tries by default to find a Python directory (site-packages) in the parent directory of SofaPython.so (hence your build directory). It should not prevent your from using SofaPython normally.
I can’t help you on the “orientation vectors”/coordinate system issue. Maybe @damien-marchaluniv-lille1-fr or @jnbrunet could help?
About Qt5WebEngine, it is very easy to activate if you installed Qt via their online installer as explained in our documentation.
Could you remind what the problem is?To load a .py in runSofa directly from the terminal, your script must
import Sofa
and have thecreateScene(rootNode)
function (as an entry point).
I’m far from expert in SofaPython but I would suggest as examples of Python2 scenesSofaPython/doc/SofaDays_oct2013/8_PythonScene/tuto8.py
andSofaPython/examples/houseOfCards.py
. These are pretty old scenes with deprecated behaviors but they do show how to build a simple simulation in Python2 with SofaPython.Hope that helps,
Guillaume.15 July 2020 at 18:23 #16880JonnyBlockedThank you so much for your help!
Here is a screenshot for the “orientation vectors”/coordinate system issue as reference
About QT: I don’t really know what the problem is. I am using QT 5.15.0 and installed QT Charts and WebEngine using the Maintenance Tool. I added the CMAKE_PREFIX_PATH and everything seemed to work. But when I try to open the Doc Browser in the Sofa GUI, the following Warning shows:
[WARNING] [RealGUI] Doc browser has been disabled because Qt5WebEngine is not available
16 July 2020 at 14:39 #16885GuillaumeKeymasterTo verify if Qt5WebEngine has been correctly detected and is used by runSofa:
– Check thatSOFAGUIQT_ENABLE_QDOCBROWSER
is ON in CMake-GUI
– Check that <build-dir>/include/SofaGui/sofa/gui/qt/config.h contains#define SOFAGUIQT_HAVE_QT5_CHARTS 1
and#define SOFAGUIQT_HAVE_QT5_WEBENGINE 1
– Check what is returned byotool -L <build-dir>/bin/runSofa | grep -i webengine
16 July 2020 at 18:12 #16890JonnyBlockedI didn’t have the flag you recommended activated but now, after recompiling, it works! Thank you so much. Also the few scenes I checked today did not have the issue with the coordinate system – though I am not sure whether that is because I tried different scenes or if the problem was fixed somehow.
21 July 2020 at 16:45 #1691129 July 2020 at 10:07 #16975JonnyBlockedYes, I think so! Thanks again for your help.
25 August 2020 at 18:23 #17065CaiBlockedgreat
-
AuthorPosts
- You must be logged in to reply to this topic.