Closed npisanti closed 4 years ago
This is due to two now using C++17 features, so it wouldn't compile if your compiler isn't fully C++17 compliant I think (which is probably what's happening here).
yes you are right, gcc
in debian is version 6 and version 7 is needed for c++17. I've also got clang
and clang-6.0
repo installed, the latter should be able to compile c++17, how can i use it to build two?
You need to call genie with different parameters to use clang:
bin/linux/genie --gcc=linux-clang gmake
this will generate the makefiles in the folder build/projects/linux-clang
IIRC
that won't works as it will use the default clang version, that is 3.8, and bin/linyx/genie --gcc=linux-clang-6.0
gives an error as output, i should try to find a way to change the default clang version, maybe using debian alternatives
In the future we could add an option tool-suffix
or compiler-suffix
to make this more flexible so you don't have to mess with the toolchain file.
i was able to compile the file for this issue with your adviced changes, but now i get an error on a different file
../../../src/stl/type_traits.h:15:50: error: no template named
'is_trivially_destructible_v' in namespace 'std'; did you mean
'is_trivially_destructible'?
...bool is_trivially_destructible = std::is_trivially_destructible_v<T>;
should i open another issue and close this? i can fix that by changing std::is_trivially_destructible_v<T>
to std::is_trivially_destructible<T>()
but then i got other compile errors
This is most likely a problem of C++ STL version associated to your compiler. Those helpers have been added in C++17.
Your compiler is probably using an anterior version of the STL here because of the magic ways through which gcc
(and clang) decides what STL location it's using to compile
I tried to compile two as described in
README.md
but i got those compiler errors, i'm on Debian 9: