Home › Forum › SOFA › Getting Started › [SOLVED] Problem in installing Cmake
Tagged: 64_bits, cmake, Linux_ubuntu, Plugin_SoftRobots, SOFA_1906
- This topic has 16 replies, 3 voices, and was last updated 4 years, 6 months ago by Hugo.
-
AuthorPosts
-
20 April 2020 at 02:12 #15821AmirBlocked
Hello
I was trying to install Sofa due to:
http://www.sofa framework.org/community/doc/getting-started/build/linux/
but when I installed Cmake and configure the CMake I got this error:
”Error in the configuration process, project file maybe invalid”
the generation didn’t complete and so I can not go further.
I followed the steps according to the tutorial and I also thought it’s because it couldn’t recognize the compiler, but the last version of c and c++ was already installed. also in Cmake lines the address of some entries is mentioned as not found.
Please help me, I tried to uninstall many times and do these steps but it didn’t work.
Thanks20 April 2020 at 14:12 #15864HugoKeymasterHi @amir
This is the message given by the pop-up window.
But the console of CMake should provide you a more detailed explanation of the error (and its reason).Could you share it with us?
Hugo
20 April 2020 at 15:21 #15867AmirBlockedHi @Hugo
I installed it in Linux ubuntu 16.04, I had Ros before, so it had Cmake 3.5.2, So I uninstalled the older Cmake first by (sudo apt-get remove Cmake and sudo apt-get autoremove –purge cmake). then start to install the Cmake 3.16.6.
Cmake it seems working well when I run CMake-GUI in the build directory of SOFA.
Cmakes open and after clicking the configuration button. this error appeared then generation didn’t complete, So I can not use make or ninja in the next step. I tried Ninja and Unix Makefile and none of them worked.
I uninstalled the Cmake and installed another version(3.13.4) and try it again, but I received the same error. then I tried to deselect some items in Cmake entries to find the problem, I don’t know I have the right to do it or not, Maybe I shouldn’t do that. is it possible to roll back to before changes?
every time Cmake keeps the caches even after uninstalling it completely. is there any way to remove it completely? Should I reinstall Linux?
Many Thanks
Amir20 April 2020 at 16:30 #15870HugoKeymasterHi @amir
Wait, installing an up-to-date version of cmake was a good step.
To help you, I need the error output given by the CMake gui (see the bottom area, below the configure button)
Could you copy paste what appears in this text area when configuring fails?
To start fresh with CMake, you can click on File –> Delete Cache
Best,Hugo
20 April 2020 at 17:29 #15873AmirBlockedDear @Hugo
this is the log message as you requested:
Install prefix: /home/amir/sofa/build/install Boost version: 1.58.0 Found the following Boost libraries: system filesystem program_options thread chrono date_time atomic Adding collection SofaComponentAll SofaTest: optional dependency SofaPython NOT found, Python_test won't be built Adding module SofaExporter SofaPython disabled, will not compile python bindings. Adding module SofaSparseSolver -- metis was not found, SparseLDLSolver won't be built -- csparse was found, SparseLUSolver and SparseCholeskySolver will be built Adding module SofaPreconditioner Adding module SofaHaptics Adding module SofaOpenglVisual Adding plugin CImgPlugin CImgPlugin: TIFF Image Format enabled CImgPlugin: JPEG Image Format enabled CImgPlugin: PNG Image Format enabled Adding plugin SofaMiscCollision SofaMiscModule: build all maintained sofa components. SofaMiscCollision: optional dependency SofaSphFluid not found de-activing: <SpatialGridPointModel> -- PSL is an experimental feature, use it at your own risk. Adding application runSofa Write Plugin list at /home/amir/sofa/build/lib/plugin_list.conf.default Configuring done CMake Error in extlibs/gtest/CMakeLists.txt: Target "gtest" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. CMake Error in SofaKernel/extlibs/newmat/CMakeLists.txt: Target "newmat" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. CMake Error in SofaKernel/extlibs/tinyxml/CMakeLists.txt: Target "tinyxml" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. CMake Error in SofaKernel/modules/SofaHelper/CMakeLists.txt: Target "SofaHelper" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. CMake Error in SofaKernel/modules/SofaHelper/SofaHelper_test/CMakeLists.txt: Target "SofaHelper_test" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. CMake Error in SofaKernel/modules/SofaHelper/SofaHelper_test/system/TestPlugin/CMakeLists.txt: Target "TestPlugin" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. .... CMake Error in applications/plugins/SofaMiscCollision/CMakeLists.txt: Target "SofaMiscCollision" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. CMake Error in applications/projects/runSofa/CMakeLists.txt: The CXX_STANDARD property on target "runSofa" contained an invalid value: "17". CMake Error in applications/projects/runSofa/runSofa_test/CMakeLists.txt: Target "runSofa_test" requires the language dialect "CXX17" (with compiler extensions), but CMake does not know the compile flags to use to enable it. Generating done
Many Thanks
Amir20 April 2020 at 17:39 #1587420 April 2020 at 17:41 #15875AmirBlockedThanks @ Hugo
g++ –version
g++ (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0gcc –version
gcc (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0python
Python 2.7.12 (default, Oct 8 2019, 14:14:10)20 April 2020 at 17:45 #15876AmirBlockedDear @Hugo
I’ve noticed one thing I don’t know it is related or not:
I install Cmake 3.16.6 but when I open it with GUI at the top of the bar it mentioned
3.5.2. I don’t know I uninstall it completely. it is the version of GUI I think when I checked its version.20 April 2020 at 17:50 #15877HugoKeymasterHi @amir
Yes you might have two versions of cmake installed. What tells your the window appearing when you click on “About” in the GUI?
How did you install the newer version of cmake?Hugo
20 April 2020 at 17:55 #15878AmirBlockedit says the version is 3.5.2
I installed from source code as fallow:
$ sudo apt purge cmake
$ wget https://github.com/Kitware/CMake/releases/download/v3.16.6/cmake-3.13.6.tar.gz
$ tar -zxvf cmake-3.13.4.tar.gz
$ cd cmake-3.13.4
$ ./bootstrap
$ make
$ sudo make install20 April 2020 at 18:04 #15879HugoKeymastercould you try:
– sudo apt list cmake (to see if any other cmake is installed)
– and try to locate where is your cmake-3.13 installedOnce you could just run cmake-3.13 with its full path to see if it solves the pb.
Hugo
20 April 2020 at 18:20 #15882AmirBlockeddear @Hugo
cmake 3.13 is located in the home directory
/home/cmake3.13
and the others are:
$ sudo apt list cmake -aListing… Done
cmake/xenial,now 3.5.2-2ubuntu1~ubuntu16.04.1~ppa1 amd64 [installed,automatic]
cmake/xenial-updates 3.5.1-1ubuntu3 amd64
cmake/xenial 3.5.1-1ubuntu1 amd64
but here it dosnt show the 3.13.Should I change the home directory?
20 April 2020 at 23:04 #15886HugoKeymasterCan you try running the cmake (3.13) you installed in your home, inside your build/ repository of SOFA ?
Hugo
21 April 2020 at 12:20 #15895AmirBlockedDear @Hugo
I don’t know how to specify Cmake to run the latest version(3.13).
I try to change the default version to the new one, but after running the older one always run.21 April 2020 at 12:42 #15898GuillaumeKeymasterHi Amir,
If I understand correctly, you have 2 version of CMake installed:
– CMake 3.13 in your home with executable at/home/amir/cmake3.13/bin/cmake
– CMake 3.5.2 in your systemTo switch which CMake is used by default, you must use update-alternatives (paths may differ upon your installation):
sudo update-alternatives \ --install /home/amir/cmake3.13/bin/cmake cmake /home/amir/cmake3.13/bin/cmake 20 \ --slave /home/amir/cmake3.13/bin/ctest ctest /home/amir/cmake3.13/ctest3 \ --slave /home/amir/cmake3.13/bin/cpack cpack /home/amir/cmake3.13/cpack3 \ --slave /home/amir/cmake3.13/bin/ccmake ccmake /home/amir/cmake3.13/ccmake3 \ --family cmake
21 April 2020 at 16:11 #15900AmirBlockedDear @Guillaume
Dear @Hugo
Thanks for your support. I did the following and the problem is solved.sudo apt purge cmake
sudo apt-get update
sudo apt-get build-dep cmake-qt-gui
wget https://cmake.org/files/v3.17/cmake-3.17.0.tar.gz
tar -xzf cmake-3.17.0.tar.gz
cd cmake-3.17.0/
./configure –qt-gui
make -j5
bin/cmake-guiI checked the sudo update-alternatives before but it’s didn’t work for me, I don’t know why.
Many thanks for your fast and supportive response. Let’s learn the SOFA!!:-)21 April 2020 at 16:12 #15901HugoKeymaster -
AuthorPosts
- You must be logged in to reply to this topic.