GCC 10 regression?
tim77 opened this issue · comments
Hello. Error during build process with GCC 10 and latest commit fdcc040:
FAILED: wf-config@sha/src_section.cpp.o
c++ -Iwf-config@sha -I. -I.. -Iinclude -I../include -I/usr/include/libevdev-1.0/ -I/usr/include/libxml2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c++17 -Wno-deprecated-declarations -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -MD -MQ 'wf-config@sha/src_section.cpp.o' -MF 'wf-config@sha/src_section.cpp.o.d' -o 'wf-config@sha/src_section.cpp.o' -c ../src/section.cpp
../src/section.cpp: In member function 'std::shared_ptr<wf::config::option_base_t> wf::config::section_t::get_option(const string&)':
../src/section.cpp:38:20: error: 'invalid_argument' is not a member of 'std'
38 | throw std::invalid_argument("Non-existing option " + name
| ^~~~~~~~~~~~~~~~
../src/section.cpp: In member function 'void wf::config::section_t::register_new_option(std::shared_ptr<wf::config::option_base_t>)':
../src/section.cpp:60:20: error: 'invalid_argument' is not a member of 'std'
60 | throw std::invalid_argument(
| ^~~~~~~~~~~~~~~~
- Full build log
- OS:
Fedora Rawdhie (33)
- GCC:
10.0.1-0.9.fc33
- libevdev:
1.9.0
Or this is new libevdev
regression?
Here is common GCC 10 issues:
https://gcc.gnu.org/gcc-10/porting_to.html#common
This is Header dependency changes in GCC 10.
Some C++ Standard Library headers have been changed to no longer include the header. As such, C++ programs that used components defined in or without explicitly including the right headers will no longer compile.
Previously components such as std::runtime_error, std::string and std::allocator were implicitly defined after including unrelated headers such as and . Correct code should include the appropriate headers for the classes being used.
Oops, sorry, I didn't see you were preparing a pull request :)
Anyway, thanks for bringing this up, it should be fixed. If you package Wayfire, then use the 0.4.0
branch, it will contain bug fixes on top of the release.
Thanks a lot.