Dear sir:
I am very interested in the VTR project, so I want to build it from the source code in my deep for Linux system. I followed the instructions in README.md and followed the necessary components, and then used cmake and gnu make to build it. However, when using the make command to build to 83% progress, the following error message appeared:
/usr/bin/ld: /tmp/cccW0Vqy.ltrans0.ltrans.o: in function `std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::filesystem::__cxx11::path::format) [clone .constprop.11]':
<artificial>:(.text+0x3398): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /tmp/cccW0Vqy.ltrans0.ltrans.o: in function `vtr::check_file_name_extension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
...
make[2]: *** [libs/libarchfpga/CMakeFiles/read_arch.dir/build.make:105:libs/libarchfpga/read_arch] error 1
make[1]: *** [CMakeFiles/Makefile2:1850:libs/libarchfpga/CMakeFiles/read_arch.dir/all] error 2
make: *** [Makefile:146:all] error 2
The above error seems to suggest an issue with my c++library libstd++fs. Therefore, I checked my gcc and g++, version 8.3.0, which should support the C++17 language standard. In addition, I created a separate main.cpp file that called a function in the namespace "filesystem" and used the command "g++- stdc++=c++17 main.cpp - lstdc++fs" to build it, and the result was successful. This indicates that my system should meet the conditions for the successful construction of the VTR project, but why did the above problem occur? How to solve it?