6 July 2020 at 10 h 13 min #16802
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!
Jonny7 July 2020 at 23 h 12 min #16828
Welcome on the SOFA forum!
What is you version of the SoftRobot plugin? (what gives the
What is you CMake version?
Sorry for bringing questions (before providing you a suitable answer!).
Hugo8 July 2020 at 8 h 11 min #16832
thanks for getting back at me.
I am using CMake 3.17.0 and getting the following result for the
commit 5d9abaa63f0bd2cd620cf9da002248944f1539ce (HEAD -> master, origin/master, origin/HEAD) Merge: a2b129c e646348 Author: Damien Marchal <email@example.com> 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 <firstname.lastname@example.org> Date: Tue May 5 16:25:30 2020 +0200 Fix CMake in test commit a2b129c4bf235a9d5ba9329caf32b0e6863dcd79 Merge: b2b3639 305ad16 Author: Damien Marchal <email@example.com> Date: Mon May 4 16:19:23 2020 +0200 Merge pull request #51 from guparan/improve_packaging
Jonny8 July 2020 at 21 h 34 min #168419 July 2020 at 14 h 11 min #16847
There is indeed an issue in SOFA v19.12 with PARSE_LIBRARY_LIST (in SofaMacros.cmake).
It has been fixed in SOFA v20.06
Could you try with this version of SOFA?9 July 2020 at 20 h 01 min #16853
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 h 12 min #16874
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 h 20 min #16879
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.
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 Sofaand have the
createScene(rootNode)function (as an entry point).
I’m far from expert in SofaPython but I would suggest as examples of Python2 scenes
SofaPython/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 h 23 min #16880
Thank 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 available16 July 2020 at 14 h 39 min #16885
To verify if Qt5WebEngine has been correctly detected and is used by runSofa:
– Check that
SOFAGUIQT_ENABLE_QDOCBROWSERis ON in CMake-GUI
– Check that <build-dir>/include/SofaGui/sofa/gui/qt/config.h contains
#define SOFAGUIQT_HAVE_QT5_CHARTS 1and
#define SOFAGUIQT_HAVE_QT5_WEBENGINE 1
– Check what is returned by
otool -L <build-dir>/bin/runSofa | grep -i webengine16 July 2020 at 18 h 12 min #16890
I 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 h 45 min #1691129 July 2020 at 10 h 07 min #16975
Yes, I think so! Thanks again for your help.
- You must be logged in to reply to this topic.