sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
878 stars 297 forks source link

CMake Fail: filesystem: No such file or directory #4527

Closed KantaphatLeelakunwet closed 3 months ago

KantaphatLeelakunwet commented 3 months ago

Problem

Description When I run cmake --build $FOLDER_TARGET -j --target install, it failed due to compiler is unable to find filesystem.

Steps to reproduce I was installing SOFA following instruction from here https://github.com/ScheiklP/sofa_env/blob/main/docs/source/setting_up_sofa.rst Follow everything from top to "Compile SOFA" part at cmake --build $FOLDER_TARGET -j --target install.

Expected behavior No idea, as it is my first time trying to install it.


Environment

Context

Command called

FOLDER_TARGET=$HOME/sofa/build
cmake --build $FOLDER_TARGET -j --target install

Env vars

python -c "exec( \"import os, sys\nprint('#################')\nprint('--- sys.version ---')\nprint(sys.version)\nprint('--- PATH ---')\ntry:\n  print(os.environ['PATH'])\nexcept Exception:\n  pass\nprint('--- SOFA_ROOT ---')\ntry:\n  print(os.environ['SOFA_ROOT'])\nexcept Exception:\n  pass\nprint('--- PYTHONPATH ---')\ntry:\n  print(os.environ['PYTHONPATH'])\nexcept Exception:\n  pass\nprint('--- sys.path ---')\ntry:\n   print(str(sys.path))\nexcept Exception:\n   pass\nprint('#################')\" )"

#################
--- sys.version ---
3.9.18 (main, Sep 11 2023, 13:41:44) 
[GCC 11.2.0]
--- PATH ---
/bd_targaryen/users/kleelakunwet/miniconda3/envs/sofa/bin:/bd_targaryen/users/kleelakunwet/miniconda3/condabin:/usr/lib/oar/oardodo:/usr/lib/oar/oardodo:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/snap/bin
--- SOFA_ROOT ---
--- PYTHONPATH ---
--- sys.path ---
['', '/bd_targaryen/users/kleelakunwet/miniconda3/envs/sofa/lib/python39.zip', '/bd_targaryen/users/kleelakunwet/miniconda3/envs/sofa/lib/python3.9', '/bd_targaryen/users/kleelakunwet/miniconda3/envs/sofa/lib/python3.9/lib-dynload', '/bd_targaryen/users/kleelakunwet/.local/lib/python3.9/site-packages', '/bd_targaryen/users/kleelakunwet/miniconda3/envs/sofa/lib/python3.9/site-packages']
#################

Logs

Full output


[ 12%] Building CXX object Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileSystem.cpp.o
[ 12%] Building CXX object Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/PluginManager.cpp.o
[ 12%] Building CXX object Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileRepository.cpp.o
[ 12%] Building CXX object Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileMonitor_linux.cpp.o
/bd_targaryen/users/kleelakunwet/sofa/src/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.cpp:34:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/build.make:733: recipe for target 'Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileRepository.cpp.o' failed
make[2]: *** [Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileRepository.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/bd_targaryen/users/kleelakunwet/sofa/src/Sofa/framework/Helper/src/sofa/helper/system/PluginManager.cpp:30:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
/bd_targaryen/users/kleelakunwet/sofa/src/Sofa/framework/Helper/src/sofa/helper/system/FileMonitor_linux.cpp:48:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/build.make:1013: recipe for target 'Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileMonitor_linux.cpp.o' failed
make[2]: *** [Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileMonitor_linux.cpp.o] Error 1
Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/build.make:649: recipe for target 'Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/PluginManager.cpp.o' failed
make[2]: *** [Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/PluginManager.cpp.o] Error 1
/bd_targaryen/users/kleelakunwet/sofa/src/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp:26:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/build.make:607: recipe for target 'Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileSystem.cpp.o' failed
make[2]: *** [Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/src/sofa/helper/system/FileSystem.cpp.o] Error 1
CMakeFiles/Makefile2:3837: recipe for target 'Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/all' failed
make[1]: *** [Sofa/framework/Helper/CMakeFiles/Sofa.Helper.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

Content of build_dir/CMakeCache.txt

CMakeCache.txt


Thank you in advance!

hugtalbot commented 3 months ago

Hey @KantaphatLeelakunwet

Thanks for opening an issue. Have you checked this discussion topic : https://github.com/sofa-framework/sofa/discussions/2775#discussioncomment-2330094 ?

KantaphatLeelakunwet commented 3 months ago

Thanks for the fast response! I will take a look at it.

KantaphatLeelakunwet commented 3 months ago

The filesystem error was fixed by upgrading my Ubuntu version. Thanks!

hugtalbot commented 3 months ago

Great! Thanks for the feedback @KantaphatLeelakunwet