Hi there!
I'm trying to install an library. After the "make" command, there are a lot of errors regarding std::chrono. As I see it, it is related to the c++20 standard. To a file CMakeCache.txt - there is no mention of the "-std=gnu++2a" flag, but it still tries to compile with it. Additional flag instructions like "-std=c++2a" or 20 do not eliminate the error. How can this be fixed? Why doesn't the compiler see "std::chrono"? The file "types.hpp" itself contains the <chrono> header.
[ 84%] Building CXX object CMakeFiles/fastcgipp.dir/src/parameters.cpp.o
/usr/bin/c++ -Dfastcgipp_EXPORTS -I/root/fastcgipp/include -I/root/fastcgi++/include -I/usr/include/postgresql -I/usr/include/postgresql/13/server -O3 -DNDEBUG -fPIC -Wall -Werror -fno-omit-frame-pointer -std=gnu++2a -o CMakeFiles/fastcgipp.dir/src/parameters.cpp.o -c /root/fastcgi++/src/parameters.cpp
In file included from /root/fastcgi++/include/sqlTraits.hpp:41,
from /root/fastcgi++/src/parameters.cpp:29:
/root/fastcgi++/include/fastcgi++/sql/types.hpp:54:30: error: ‘year_month_day’ in namespace ‘std::chrono’ does not name a type
54 | typedef std::chrono::year_month_day DATE;
| ^~~~~~~~~~~~~~
In file included from /root/fastcgi++/src/parameters.cpp:29:
/root/fastcgi++/include/sqlTraits.hpp:170:34: error: ‘DATE’ was not declared in this scope
170 | template<> struct Traits<DATE>
| ^~~~
/root/fastcgi++/include/sqlTraits.hpp:170:38: error: template argument 1 is invalid
170 | template<> struct Traits<DATE>
| ^
etc...
g++ (Debian 10.2.1-6) 10.2.1 20210110
GNU Make 4.3
Built for x86_64-pc-linux-gnu
from CMakeCache.txt:
//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-10
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-10
//Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
GCC 10 doesn't seem to have support "Calendar and timezone" utilities
Probably you are right, but what about version date - 20210110. It looks like 2021/01/10. And what can I do now if this is the newest stable version for Debian 11?
sudo apt install g++
g++ is already the newest version (4:10.2.1-1).