loot/libloot

fatal error: filesystem: No such file or directory

alan-cugler opened this issue · 5 comments

Hi I am trying to build libloot (and eventually loot) natively on ubuntu 18.04.
I am primarily following this guys guide and have gotten all the dependencies installed.

I ran these commands to get it compiling and I make it past several dependencies before choking.

$ mkdir build; cd build/
$ cmake .. && make all

The Error is as follows:

Scanning dependencies of target libloot_internals_tests
[ 55%] Building CXX object CMakeFiles/libloot_internals_tests.dir/generated/loot_version.cpp.o
[ 56%] Building CXX object CMakeFiles/libloot_internals_tests.dir/src/api/api.cpp.o
In file included from /home/alan-cugler/testing/libloot/src/api/api.cpp:25:0:
/home/alan-cugler/testing/libloot/include/loot/api.h:28:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
CMakeFiles/libloot_internals_tests.dir/build.make:86: recipe for target 'CMakeFiles/libloot_internals_tests.dir/src/api/api.cpp.o' failed
make[2]: *** [CMakeFiles/libloot_internals_tests.dir/src/api/api.cpp.o] Error 1
CMakeFiles/Makefile2:223: recipe for target 'CMakeFiles/libloot_internals_tests.dir/all' failed
make[1]: *** [CMakeFiles/libloot_internals_tests.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I did attempt to run through the entire repo and replace #include <filesystem> with #include <experimental/filesystem>. This did get past the half a dozen identical errors but eventually culminated in a final scroll fest of errors.

So is there a dependency or modification I need to make? Its been a couple years since I've done C++ code, but I don't mind having to brush up for this to run native.

My System

  • ubuntu 18.04
  • i5 cpu/ 24 Gb RAM
  • no errors from listed dependencies

Do you have https://packages.ubuntu.com/search?keywords=libboost-filesystem-dev installed? I'm guessing that's probably what you need...

@apocalyptech I checked and have this library installed.

@Ortham What would explicitly be the command to do so?

I tried to search for commands to explicitly state c++17 but I am falling short.
Currently, I found this post kind of wrestling with a similar problem,
but adding -lstdc++ to cmake .. && make all made no difference.

I also found this talking about stating in the files what version to use,
but I am assuming I shouldnt have to do that since this code is meant to be in c++17.

Did you export CXX="g++-8" CC="gcc-8" before running cmake?

Ortham commented

Closing due to lack of response.