I am having this issue when running CMake in a Docker container:
10.60 CMake Error at /build/_deps/drogon-src/CMakeLists.txt:158 (message):
10.60 Not found std::filesystem, please use a newer compiler
Docker command: docker build . --platform linux/arm/v8
From the CMakeLists.txt on Drogon (https://github.com/drogonframework/drogon/blob/master/CMakeLists.txt#L158), it's caused by CXX_FILESYSTEM_HAVE_FS not being set. This flag is only set when CMake finds the filesystem header (see attached image).
Seems like it's an issue with g++ not seeing the header files:
#25 8.300 -- Looking for C++ include any
#25 8.466 -- Looking for C++ include any - not found
#25 8.467 -- Looking for C++ include string_view
#25 8.632 -- Looking for C++ include string_view - not found
#25 8.632 -- Looking for C++ include coroutine
#25 8.798 -- Looking for C++ include coroutine - not found
I checked and confirmed that all headers are in the /usr/include/c++/12 directory.
Versioning:
Base image: Debian - Bookworm
Cmake: 3.30.4
G++: g++ (Debian 12.2.0-14) 12.2.0
Installed: apt-get install libstdc++-12-dev gcc build-essential libtool wget libssl-dev pkg-config uuid-dev git
Seems like this issue is a Cmake/g++ linking to headers but if it's a Docker issue then I can transfer the question to another server.