20 April 2020 at 2 h 12 min #15821
I was trying to install Sofa due to:
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 h 12 min #15864
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?
Hugo20 April 2020 at 15 h 21 min #15867
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?
Amir20 April 2020 at 16 h 30 min #15870
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
Hugo20 April 2020 at 17 h 29 min #15873
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
Amir20 April 2020 at 17 h 39 min #1587420 April 2020 at 17 h 41 min #15875
Thanks @ Hugo
g++ (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0
gcc (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0
Python 2.7.12 (default, Oct 8 2019, 14:14:10)20 April 2020 at 17 h 45 min #15876
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 h 50 min #15877
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?
Hugo20 April 2020 at 17 h 55 min #15878
it 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
$ sudo make install20 April 2020 at 18 h 04 min #15879
could you try:
– sudo apt list cmake (to see if any other cmake is installed)
– and try to locate where is your cmake-3.13 installed
Once you could just run cmake-3.13 with its full path to see if it solves the pb.
Hugo20 April 2020 at 18 h 20 min #15882
cmake 3.13 is located in the home directory
and the others are:
$ sudo apt list cmake -a
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 h 04 min #15886
Can you try running the cmake (3.13) you installed in your home, inside your build/ repository of SOFA ?
Hugo21 April 2020 at 12 h 20 min #15895
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 h 42 min #15898GuillaumeKeymaster
- SOFA Consortium
If I understand correctly, you have 2 version of CMake installed:
– CMake 3.13 in your home with executable at
– CMake 3.5.2 in your system
To 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 cmake21 April 2020 at 16 h 11 min #15900
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
tar -xzf cmake-3.17.0.tar.gz
I 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 h 12 min #15901
- You must be logged in to reply to this topic.