Home › Forum › SOFA › Building SOFA › [SOLVED] Error at building SoftRobots with ninja
Tagged: 64_bits, GCC, Linux_ubuntu, Plugin_SoftRobots, SOFA_2006
- This topic has 13 replies, 3 voices, and was last updated 4 years, 1 month ago by jnbrunet.
-
AuthorPosts
-
8 October 2020 at 05:50 #17325antonio.8196Blocked
Hi guys, i’m trying to install the SoftRobots plugin.
The Cmake step was already done and the configuration was correct (I selected the SoftRobot Ignore Errors since i haven’t installed the STLIB plugin), but when i’m trying to build it with ninja this appears[13/43] Building CXX object external_direc...constraint/SurfacePressureConstraint.cpp.o FAILED: external_directories/ext_plugin_repo/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o
I have to say that I haven’t installed any Python plugin (neither SofaPython nor SofaPython3) Would that be the reason of the error?)
I’ve searched in the forum topics about the problem between SoftRobots, SofaPython3 and STLIB but i don’t have a clearly understanding of the problems. I mean, i know i have to install SofaPython3 in order to use the SoftRobots plugin but i tough that the installation could be done even though i didn’t install SofaPython3.
Could you give me a better explanation of what should i do in order to install the SoftRobots plugin and start to create the models?
8 October 2020 at 07:08 #17326antonio.8196BlockedHi, a little update of my situation. I’m trying to install the SofaPython3 plugin and Cmake gives this error
SofaPython3 is compiled as a subproject to the external project 'Sofa'. CMake Error at /home/einklugerjaeger/ext_plugin_repo/SofaPython3/CMakeLists.txt:71 (find_package): Could not find a package configuration file provided by "pybind11" (requested version 2.3) with any of the following names: pybind11Config.cmake pybind11-config.cmake Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set "pybind11_DIR" to a directory containing one of the above files. If "pybind11" provides a separate development package or SDK, be sure it has been installed.
Idk what to do, I installed pybind11 using pip3 install and the directory of the file is /home/einklugerjaeger/.local/lib/python3.8/site-packages/pybind11/
Oh, and inside of this folder there’s not any pybind11Config.cmake or pybind11-config.cmake name. There are just .h files and 3 .py files
8 October 2020 at 07:48 #17327antonio.8196BlockedI managed to do the Cmake config of the SofaPython3 plugin (pybind11 wasn’t installed properly).
Sooooo…when i tried to change the python path using
cmake -DPython_EXECUTABLE=/usr/local/bin/python3 ..
orcmake -DPython_ROOT_DIR=/usr/local ..
There’s an errorMy-SOFA/build$ cmake -DPython_ROOT_DIR=/bin/ .. CMake Error: The source directory "/home/einklugerjaeger/My-SOFA" does not appear to contain CMakeLists.txt.
10 October 2020 at 00:10 #17345HugoKeymasterHey @antonio-8196
Let me poke you for you an expert: @jnbrunet could you please take a look to help Antonio in its use of SofaPython3 ? Thanks +++Best
Hugo
10 October 2020 at 13:25 #17350jnbrunetModeratorHey @antonio-8196,
CMake seems to indicate that you are giving him a path which is not the one of SOFA’s source code, it can’t find the file CMakeLists.txt (which should be at the root of the SOFA’s source).
If your directories looks like :
My-SOFA ├── src │ ├── (...) | └── CMakeLists.txt └── build
Then you should go into My-SOFA/build and launch cmake with
My-SOFA/build $ cmake [OPTIONS] ../src
JN
11 October 2020 at 04:40 #17356antonio.8196BlockedThanks you for the fast response @jnbrunet, as you said, i wasn’t pointing the ..src/ folder, i needed to
cmake -DPython_EXECUTABLE=/usr/local/bin/python3 ../src
and i was just doingcmake -DPython_EXECUTABLE=/usr/local/bin/python3
So i managed to do this step, next step according to the Github page is to install the python3 bindings. This is done by going into the build directory of SofaPython3 but i can’t find any build directory, neither in my ext_plugin_repo (where i have downloaded all the external plugins) nor in My-SOFA directory, (external directories or src).
Or should i create the build directory? Either way, i have created the build directory in both directories (ext_plugin_repo-outside My-SOFA folder- and in external_directory-inside My-SOFA/build) and ran the code but this appears
CMake Error: Error processing file: /home/einklugerjaeger/ext_plugin_repo/SofaPython3/build/cmake_install.cmake
in both cases.11 October 2020 at 05:25 #17357antonio.8196BlockedOk, i ran cmake –install . into My-SOFA/build repository by accident and idk what happened hahaha i hope that this doesn’t mess up with installation D:
11 October 2020 at 13:58 #17359jnbrunetModeratorHey @antonio-8196,
Indeed it can be confusing. When you are building SofaPython3 within SOFA (using the
SOFA_EXTERNAL_DIRECTORIES
CMake option), they share the same build folder and the install command has to be executed there, so you did good here.The alternative would be to do an “out-of-tree” build where SofaPython3 has its own build folder and compilation process. In this case you would have something like
. ├── SOFA │ ├── src | └── build └── SofaPython3 ├── src └── build
Jean-Nicolas
11 October 2020 at 19:46 #17362antonio.8196Blocked@jnbrunet thanks for your help but i gave up, i wasn’t able to install anything
@Hugo, I’m trying now to just install the binaries in my Windows 10, i’m using Anaconda to manage my virtual enviroments, i installed a virtual env called python27 in which python2.7 and numpy is installed, i try to runSofa.exe from this enviroment activated but Sofa never launches, this is what appears[INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/SofaPreconditioner.dll ImportError: No module named site [WARNING] [SofaSimulationTree] the library has not been cleaned up (sofa::simulation::tree::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationCore] the library has not been cleaned up (sofa::simulation::core::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaCore] the library has not been cleaned up (sofa::core::cleanup() has never been called, see sofa/helper/init.h) ########## SIG 22 - SIGABRT: usually caused by an abort() or assert() ########## 29: sofa::helper::BackTrace::dump - 0x7ffd014c22e028: sofa::helper::BackTrace::sig - 0x7ffd014c244027: raise - 0x7ffd348dc9a026: abort - 0x7ffd348ddb5025: purecall - 0x7ffd2281698024: sofa::helper::logging::MessageDispatcher::process - 0x7ffd0156d47023: sofa::helper::logging::MessageDispatcher::LoggerStream::~LoggerStream - 0x7ffd0156cc8022: sofa::helper::printLibraryNotCleanedUpWarning - 0x7ffd01534ed021: sofa::core::collision::Pipeline::removeInNode - 0x7ffd00a6d46020: execute_onexit_table - 0x7ffd34889bb019: execute_onexit_table - 0x7ffd34889bb018: execute_onexit_table - 0x7ffd34889bb017: sofa::core::visual::DrawToolGL::writeOverlayText - 0x7ffd00aef1c016: sofa::core::visual::DrawToolGL::writeOverlayText - 0x7ffd00aef1c015: RtlActivateActivationContextUnsafeFast - 0x7ffd36ae4f0014: LdrShutdownProcess - 0x7ffd36b2a95013: RtlExitUserProcess - 0x7ffd36b2a88012: ExitProcess - 0x7ffd366ecd8011: get_pgmptr - 0x75fd193410: Py_GetPythonHome - 0x734ecf309: Py_InitializeEx - 0x734ec4608: sofa::simulation::PythonEnvironment::Init - 0x7ffcfa9ce0907: initExternalModule - 0x7ffcfa9e1c506: sofa::helper::system::PluginManager::loadPluginByPath - 0x7ffd015612005: sofa::helper::system::PluginManager::loadPluginByName - 0x7ffd01560d204: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd015623303: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd015623302: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd015623301: BaseThreadInitThunk - 0x7ffd366e7bc00: RtlUserThreadStart - 0x7ffd36b2ce30
There’s another discussion in which i tried to use the binaries files in my Xubuntu virutalBox but there’s another problem, i’m lost and i’m really frustated, i don’t know what i’m doing wrong if it’s just the binaries files
On the other hand, When i try to runSofa without my conda envs (WINDOWS10) i get these errors
[ERROR] [PluginManager] Plugin loading failed (C:/Users/Sandoval/Downloads/SOFA/bin/SofaPython.dll): No se puede encontrar el m¾dulo especificado. [INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/SofaDistanceGrid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/SofaImplicitField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/SofaAllCommonComponents.dll [ERROR] [PluginManager] Plugin loading failed (C:/Users/Sandoval/Downloads/SOFA/plugins/STLIB/bin/STLIB.dll): No se puede encontrar el m¾dulo especificado. [ERROR] [PluginManager] Plugin loading failed (C:/Users/Sandoval/Downloads/SOFA/plugins/SoftRobots/bin/SoftRobots.dll): No se puede encontrar el m¾dulo especificado. [ERROR] [PluginManager] Plugin loading failed (C:/Users/Sandoval/Downloads/SOFA/plugins/SoftRobots.Inverse/bin/SoftRobots.Inverse.dll): No se puede encontrar el m¾dulo especificado. [ERROR] [PluginManager] Plugin loading failed (C:/Users/Sandoval/Downloads/SOFA/plugins/ModelOrderReduction/bin/ModelOrderReduction.dll): No se puede encontrar el m¾dulo especificado.
I’m assuming that it’s because there’s not 2.7 python installed, either way, i can’t runSofa as i’ve already said within my python27 virtual env
11 October 2020 at 22:53 #17367antonio.8196Blockeddear @Hugo, I’m trying to use the binaries for SofaRobot i’m using Xubuntu 20.04, and i have 3 python packages installed (as you know, python3 comes with Xubuntu already) but as you can see here
einklugerjaeger@einklugerjaeger-VirtualBox:~$ python Python 2.7.18 (default, Aug 4 2020, 11:16:42) [GCC 9.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
I have python2 as the default interpreter, when i go into my bin directory, i see python2 which is a link to python2.7 and the python2.7 file is a shared library.
As you mentioned in the post where i come from here i tried what you said to me but anyway, this error appearsPlugin loading failed (/home/einklugerjaeger/SOFA/plugins/SoftRobots/lib/libSoftRobots.so): libpython2.7.so.1.0: cannot open shared object file: No such file or directory
(i’ve done it from Sofa plug in manager) and the same occurs with the other plugins,In windows, as i mentioned, when in Windows10 i don’t use any interpreter i have the same error as i get in Xubuntu, but when i runSofa.exe within my python2.7 anaconda environment i get the message that i’m showing above
In the end, i can run it neither in Windows10 nor Xubuntu….
12 October 2020 at 09:15 #17371jnbrunetModeratorHey @antonio-8196,
Compiling SOFA and its plugins can be difficult, especially when some of the plugins depend on external libraries such as libpython, and I know it can be sometime quite frustrating.
Note that there are two different plugins for SOFA:
1. SofaPython which comes with SOFA by default and is only compatible with Python. 2.X
2. SofaPython3 which comes from another repository and is only compatible with Python 3.xMake sure you do not mix them as they cannot be compiled or loaded at the same time in SOFA.
From your last output, it looks like you are loading the SofaRobots plugin. Did you compiled it or downloaded it? If you successfully compiled it, it means you have everything needed to also run it. Can you go in your build directory and give us the output of
grep -i libpython CMakeCache.txt
J-N
12 October 2020 at 16:54 #17375antonio.8196Blocked@jnbrunet Thanks for your help
12 October 2020 at 16:55 #17372antonio.8196Blocked@jnbrunet Thanks for your help, i was following all the steps of the SofaPython3 Github page, but when i wanted to import Sofa or import SofaRunTime into python 3, there was a message that said that the modules couldn’t be imported, python3 wasn’t able to recognize it. I’m now seeing this documentation here and maybe the error was that i didn’t add to the variable PYTHONPATH the string <SOFA_build>/lib/site-packages and because of that python wasn’t recognizing Sofa. I haven’t realized that until now, either way, i kind of gave up and deleted all the files from Xubuntu (even the already compiled Sofa) and tried to just download the SofaRobot binaries from here but that hasn’t worked either. It looks like sofa doesn’t recognize my python2 even though the system shows that python 2 is my default interpreter and it looks like it’s in the path like i showed here
einklugerjaeger@einklugerjaeger-VirtualBox:~$ python Python 2.7.18 (default, Aug 4 2020, 11:16:42) [GCC 9.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
(or at least that’s what i think, i’m really an amateur with Linux, at least in Windows, when python is in my path, i cand enter the python command from the console, as i’m showing above with linux) But when i try to runSofa, these errors appear
[ERROR] [PluginManager] Plugin loading failed (/home/einklugerjaeger/SOFA/lib/libSofaPython.so): libpython2.7.so.1.0: cannot open shared object file: No such file or directory [ERROR] [PluginManager] Plugin loading failed (/home/einklugerjaeger/SOFA/plugins/STLIB/lib/libSTLIB.so): libpython2.7.so.1.0: cannot open shared object file: No such file or directory [ERROR] [PluginManager] Plugin loading failed (/home/einklugerjaeger/SOFA/plugins/SoftRobots/lib/libSoftRobots.so): libpython2.7.so.1.0: cannot open shared object file: No such file or directory [ERROR] [PluginManager] Plugin loading failed (/home/einklugerjaeger/SOFA/plugins/SoftRobots.Inverse/lib/libSoftRobots.Inverse.so): libSoftRobots.so: cannot open shared object file: No such file or directory [ERROR] [PluginManager] Plugin loading failed (/home/einklugerjaeger/SOFA/plugins /ModelOrderReduction/lib/libModelOrderReduction.so): libpython2.7.so.1.0: cannot open shared object file: No such file or directory
The funny thing is that these are the errors that i get when in Windows10 i try to runSofa.exe without a python environment, but when i runSofa.exe within my python2.7 environment (as i’m showing in my previous answers) runSofa just crushes and it closes.
There are a lot of things going on, in summary, in Xubuntu 20.04 i have deleted my previous Sofa compiled and tried to install SofaRobot from binaries and i couldn’t. The message errors i get are the same errors i get when i try to runSofa.exe (from the binaries of SofaRobot toolkit) from Windows10 without a python2.7 environment. And when i try to runSofa.exe within an anaconda python 2.7 environment in Windows10 there are no errors, but sofa crushes at lauching and these are the messages i get
[INFO] [PluginManager] Loaded plugin: C:/Users/Sandoval/Downloads/SOFA/bin/SofaPreconditioner.dll ImportError: No module named site [WARNING] [SofaSimulationTree] the library has not been cleaned up (sofa::simulation::tree::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationCore] the library has not been cleaned up (sofa::simulation::core::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaCore] the library has not been cleaned up (sofa::core::cleanup() has never been called, see sofa/helper/init.h) ########## SIG 22 - SIGABRT: usually caused by an abort() or assert() ########## 29: sofa::helper::BackTrace::dump - 0x7ffd014c22e028: sofa::helper::BackTrace::sig - 0x7ffd014c244027: raise - 0x7ffd348dc9a026: abort - 0x7ffd348ddb5025: purecall - 0x7ffd2281698024: sofa::helper::logging::MessageDispatcher::process - 0x7ffd0156d47023: sofa::helper::logging::MessageDispatcher::LoggerStream::~LoggerStream - 0x7ffd0156cc8022: sofa::helper::printLibraryNotCleanedUpWarning - 0x7ffd01534ed021: sofa::core::collision::Pipeline::removeInNode - 0x7ffd00a6d46020: execute_onexit_table - 0x7ffd34889bb019: execute_onexit_table - 0x7ffd34889bb018: execute_onexit_table - 0x7ffd34889bb017: sofa::core::visual::DrawToolGL::writeOverlayText - 0x7ffd00aef1c016: sofa::core::visual::DrawToolGL::writeOverlayText - 0x7ffd00aef1c015: RtlActivateActivationContextUnsafeFast - 0x7ffd36ae4f0014: LdrShutdownProcess - 0x7ffd36b2a95013: RtlExitUserProcess - 0x7ffd36b2a88012: ExitProcess - 0x7ffd366ecd8011: get_pgmptr - 0x75fd193410: Py_GetPythonHome - 0x734ecf309: Py_InitializeEx - 0x734ec4608: sofa::simulation::PythonEnvironment::Init - 0x7ffcfa9ce0907: initExternalModule - 0x7ffcfa9e1c506: sofa::helper::system::PluginManager::loadPluginByPath - 0x7ffd015612005: sofa::helper::system::PluginManager::loadPluginByName - 0x7ffd01560d204: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd015623303: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd015623302: sofa::helper::system::PluginManager::readFromIniFile - 0x7ffd015623301: BaseThreadInitThunk - 0x7ffd366e7bc00: RtlUserThreadStart - 0x7ffd36b2ce30
I know this is a long message and i’m sorry having so many questions but i’ve tried many ways to install SofaRobot because that’s what i need and nothing seems to workout…
30 October 2020 at 14:01 #17486jnbrunetModeratorHey @antonio-8196,
Sorry for the delay. Have you solved your problem yet?
I cannot really help you for your problem on Windows.
For Linux, it seems you are missing the
libpython2.7.so.1.0
file. I’m not sure why as you seems to have python 2.7 installed. Can you give me the output of:$ sudo updatedb $ locate libpython2.7.so
-
AuthorPosts
- You must be logged in to reply to this topic.