#Link Standard Headers to GCC

16 messages · Page 1 of 1 (latest)

lyric yacht
#

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.

GitHub

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows - drogonframework/drogon

slender raptorBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

exotic lion
#

oh its debian, welcome to 2014

#

well normally this should all work perfectly by getting cmake, g++, and libstdc++, even on debian. its probably a docker issue

lyric yacht
#

Well it's mostly to reduce size of container, will try with Ubuntu

#

Hm alright will check Docker forums about this too then

vast oasis
#

What does g++ --version give

lyric yacht
lyric yacht
lyric yacht
#
GitHub

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows - drogonframework/drogon

GitHub

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows - drogonframework/drogon

vast oasis
lyric yacht
lyric yacht
vast oasis
lyric yacht
#

Turns out it was a toolchain issue, still not sure where exactly the problem was though