Error when installing OpenSim in Linux system

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Xijin Hua
Posts: 29
Joined: Tue Feb 12, 2019 4:45 pm

Error when installing OpenSim in Linux system

Post by Xijin Hua » Wed May 25, 2022 4:37 am

Dear OpenSim experts

I would like to use the HPC system in our University to run OpenSim simulation. The HPC uses Linux system and I would like to install the OpenSim in the HPC, using the instructions from the OpenSim repository: https://github.com/opensim-org/opensim- ... -makefiles.
However, When I tried to Configure and generate project files, I got an error about the CasADi.
I used the following command recommended by the repository:

Code: Select all

cmake ../opensim-core \
      -DCMAKE_INSTALL_PREFIX="~/opensim_install" \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DOPENSIM_DEPENDENCIES_DIR="~/opensim_dependencies_install" \
      -DBUILD_PYTHON_WRAPPING=ON \
      -DBUILD_JAVA_WRAPPING=ON \
      -DWITH_BTK=ON
The I got the following error about the casadi:
CMake Error at CMakeLists.txt:836 (find_package):
By not providing "Findcasadi.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "casadi", but CMake did not find one.
Could not find a package configuration file provided by "casadi" (requested version 3.4.4) with any of the following names:
casadiConfig.cmake
casadi-config.cmake
Add the installation prefix of "casadi" to CMAKE_PREFIX_PATH or set "casadi_DIR" to a directory containing one of the above files. If "casadi" provides a separate development package or SDK, be sure it has been installed.
Then I tried to install CasADi from the CasADi repository: https://github.com/casadi/casadi.git, using the following command:

Code: Select all

git clone https://github.com/casadi/casadi.git -b master casadi
cd casadi
mkdir build
cd build
cmake -DWITH_PYTHON=ON ..
make
make install
I got the following error:
Error: make[2]: *** [swig/casadiPYTHON_wrap.cxx] Error 1make[1]: *** [swig/python/CMakeFiles/_casadi.dir/all] Error 2make: *** [all] Error 2[xh308@login-e-10 build]$ make docmake: *** No rule to make target `doc'. Stop.

My questions are that do I need to install the CasADi to apply OpenSim normally? Can I ignore the "CasADi" related error during the OpenSim installation?

Could any one tell me how to fix the problems or provide suggestions? Thanks in advance.

Xijin

Tags:

User avatar
Carmichael Ong
Posts: 387
Joined: Fri Feb 24, 2012 11:50 am

Re: Error when installing OpenSim in Linux system

Post by Carmichael Ong » Wed May 25, 2022 11:54 am

Instead of building CasADi separately, you could use the Superbuild instructions for the dependencies instead. Instructions can be found in the github README: https://github.com/opensim-org/opensim- ... ndencies-2

User avatar
Sepehr Ramezani
Posts: 35
Joined: Tue Nov 05, 2019 2:02 pm

Re: Error when installing OpenSim in Linux system

Post by Sepehr Ramezani » Fri May 27, 2022 1:30 pm

Hi
I have a same problem. I followed the Superbuild instructors. In the section of "Configure and generate project files" when I want to configure Cmake I get this error

Code: Select all

CMake Error at CMakeLists.txt:836 (find_package):
  By not providing "Findcasadi.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "casadi", but
  CMake did not find one.

  Could not find a package configuration file provided by "casadi" (requested
  version 3.4.4) with any of the following names:

    casadiConfig.cmake
    casadi-config.cmake

  Add the installation prefix of "casadi" to CMAKE_PREFIX_PATH or set
  "casadi_DIR" to a directory containing one of the above files.  If "casadi"
  provides a separate development package or SDK, be sure it has been
  installed.
My OS is Ubuntu 18.04. Anyone knows the problem?

User avatar
Ayman Habib
Posts: 2242
Joined: Fri Apr 01, 2005 12:24 pm

Re: Error when installing OpenSim in Linux system

Post by Ayman Habib » Fri May 27, 2022 2:18 pm

Hello,

The build script that builds the latest code base is available at
https://github.com/opensim-org/opensim- ... ration.yml

If you're not planning to use Moco and you're using the latest code base you can turn off the options for it and Casadi will not be required by the build system.

Hope this helps,
-Ayman

POST REPLY