[FIX proposal] Build error of host mklibs pkg of openwrt-19.07 branch on Fedora 34
Bas Mevissen
abuse at basmevissen.nl
Tue May 11 00:16:10 PDT 2021
(resent as previous attempt didn't seem to get through)
Hi all,
The g++ version 11.1.1 of Fedora 34 defaults to g++17 and making the
build of host package mklibs fail. See build error below.
Obviously, least intrusive fix is to set the C++ standard to g++14 or
lower. However, on master the problem is not there due to an upgrade of
mklibs to version 0.1.44 (among some other changes). This is done in
commit 9437012b9ee4dc550e42665b71902cf885169100.
Guess we best cherry-pick that commit from master to upgrade mklibs to
0.1.44 as well. This commit was cleanly applied on top of openwrt-19.07
and the build went fine afterwards.
(build was for TP-Link Archer C7 v5 default config with ccache enabled
if that matters)
Regards,
Bas.
make[3]: Entering directory
'/home/bas/Workspace/openwrt-19.07/tools/mklibs'
CFLAGS="-O2 -I/home/bas/Workspace/openwrt-19.07/staging_dir/host/include
-I/home/bas/Workspace/openwrt-19.07/tools/mklibs/include"
CPPFLAGS="-I/home/bas/Workspace/openwrt-19.07/staging_dir/host/include "
CXXFLAGS=""
LDFLAGS="-L/home/bas/Workspace/openwrt-19.07/staging_dir/host/lib " make
-j1 -C /home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35
make[4]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35'
make all-recursive
make[5]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35'
Making all in lib
make[6]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib'
Making all in mklibs
make[7]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib/mklibs'
Making all in utils
make[8]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib/mklibs/utils'
make[8]: Nothing to be done for 'all'.
make[8]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib/mklibs/utils'
make[8]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib/mklibs'
make[8]: Nothing to be done for 'all-am'.
make[8]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib/mklibs'
make[7]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib/mklibs'
make[7]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib'
make[7]: Nothing to be done for 'all-am'.
make[7]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib'
make[6]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/lib'
Making all in src
make[6]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/src'
Making all in mklibs-readelf
make[7]: Entering directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/src/mklibs-readelf'
ccache g++ -DHAVE_CONFIG_H -I. -I../..
-I/home/bas/Workspace/openwrt-19.07/staging_dir/host/include -g -O2
-MT elf.o -MD -MP -MF .deps/elf.Tpo -c -o elf.o elf.cpp
In file included from elf_data.hpp:24,
from elf.cpp:21:
elf.hpp:52:56: error: ISO C++17 does not allow dynamic exception
specifications
52 | const section &get_section(unsigned int i) const throw
(std::out_of_range) { return *sections.at(i); };
| ^~~~~
elf.hpp:62:47: error: ISO C++17 does not allow dynamic exception
specifications
62 | static file *open(const char *filename) throw
(std::bad_alloc, std::runtime_error);
| ^~~~~
elf.hpp:65:38: error: ISO C++17 does not allow dynamic exception
specifications
65 | file(uint8_t *mem, size_t len) throw (std::bad_alloc) :
mem(mem), len(len) { }
| ^~~~~
elf.hpp:68:52: error: ISO C++17 does not allow dynamic exception
specifications
68 | static file *open_class(uint8_t *, size_t) throw
(std::bad_alloc, std::runtime_error);
| ^~~~~
elf.hpp:131:55: error: ISO C++17 does not allow dynamic exception
specifications
131 | std::string get_string(uint32_t offset) const throw
(std::bad_alloc)
| ^~~~~
elf.hpp:266:39: error: ISO C++17 does not allow dynamic exception
specifications
266 | std::string get_version() const throw (std::bad_alloc);
| ^~~~~
elf.hpp:267:44: error: ISO C++17 does not allow dynamic exception
specifications
267 | std::string get_version_file() const throw
(std::bad_alloc);
| ^~~~~
elf.hpp:269:44: error: ISO C++17 does not allow dynamic exception
specifications
269 | std::string get_name_version() const throw
(std::bad_alloc);
| ^~~~~
elf.hpp:308:29: error: ISO C++17 does not allow dynamic exception
specifications
308 | version_requirement() throw (std::bad_alloc);
| ^~~~~
In file included from elf.cpp:21:
elf_data.hpp:97:42: error: ISO C++17 does not allow dynamic exception
specifications
97 | file_data(uint8_t *, size_t len) throw (std::bad_alloc,
std::runtime_error);
| ^~~~~
elf_data.hpp:112:43: error: ISO C++17 does not allow dynamic exception
specifications
112 | virtual void update(const file &) throw
(std::bad_alloc);
| ^~~~~
elf_data.hpp:136:41: error: ISO C++17 does not allow dynamic exception
specifications
136 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:138:35: error: ISO C++17 does not allow dynamic exception
specifications
138 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:150:41: error: ISO C++17 does not allow dynamic exception
specifications
150 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:152:35: error: ISO C++17 does not allow dynamic exception
specifications
152 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:164:41: error: ISO C++17 does not allow dynamic exception
specifications
164 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:166:35: error: ISO C++17 does not allow dynamic exception
specifications
166 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:178:41: error: ISO C++17 does not allow dynamic exception
specifications
178 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:180:35: error: ISO C++17 does not allow dynamic exception
specifications
180 | void update(const file &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:192:41: error: ISO C++17 does not allow dynamic exception
specifications
192 | section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:223:42: error: ISO C++17 does not allow dynamic exception
specifications
223 | segment_real (Phdr *, uint8_t *) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:235:71: error: ISO C++17 does not allow dynamic exception
specifications
235 | void update_string(const
section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:247:71: error: ISO C++17 does not allow dynamic exception
specifications
247 | void update_string(const
section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:248:62: error: ISO C++17 does not allow dynamic exception
specifications
248 | virtual void update_version (const file &, uint16_t)
throw (std::bad_alloc);
|
^~~~~
elf_data.hpp:260:71: error: ISO C++17 does not allow dynamic exception
specifications
260 | void update_string(const
section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:272:71: error: ISO C++17 does not allow dynamic exception
specifications
272 | void update_string(const
section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf_data.hpp:283:71: error: ISO C++17 does not allow dynamic exception
specifications
283 | void update_string(const
section_type<section_type_STRTAB> &) throw (std::bad_alloc);
| ^~~~~
elf.cpp:39:41: error: ISO C++17 does not allow dynamic exception
specifications
39 | file *file::open (const char *filename) throw (std::bad_alloc,
std::runtime_error)
| ^~~~~
elf.cpp:75:50: error: ISO C++17 does not allow dynamic exception
specifications
75 | file *file::open_class(uint8_t *mem, size_t len) throw
(std::bad_alloc, std::runtime_error)
| ^~~~~
elf.cpp:89:63: error: ISO C++17 does not allow dynamic exception
specifications
89 | file_data<_class, _data>::file_data(uint8_t *mem, size_t len)
throw (std::bad_alloc, std::runtime_error)
|
^~~~~
elf.cpp:191:60: error: ISO C++17 does not allow dynamic exception
specifications
191 | void section_data<_class, _data>::update(const file &file) throw
(std::bad_alloc)
| ^~~~~
elf.cpp:205:93: error: ISO C++17 does not allow dynamic exception
specifications
205 | section_real<_class, _data,
section_type_DYNAMIC>::section_real(Shdr *header, uint8_t *mem) throw
(std::bad_alloc)
| ^~~~~
elf.cpp:222:82: error: ISO C++17 does not allow dynamic exception
specifications
222 | void section_real<_class, _data,
section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:244:92: error: ISO C++17 does not allow dynamic exception
specifications
244 | section_real<_class, _data,
section_type_DYNSYM>::section_real(Shdr *header, uint8_t *mem) throw
(std::bad_alloc)
| ^~~~~
elf.cpp:261:81: error: ISO C++17 does not allow dynamic exception
specifications
261 | void section_real<_class, _data,
section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc)
| ^~~~~
elf.cpp:286:96: error: ISO C++17 does not allow dynamic exception
specifications
286 | section_real<_class, _data,
section_type_GNU_VERDEF>::section_real(Shdr *header, uint8_t *mem) throw
(std::bad_alloc)
| ^~~~~
elf.cpp:308:85: error: ISO C++17 does not allow dynamic exception
specifications
308 | void section_real<_class, _data,
section_type_GNU_VERDEF>::update(const file &file) throw
(std::bad_alloc)
| ^~~~~
elf.cpp:334:42: error: ISO C++17 does not allow dynamic exception
specifications
334 | section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:356:86: error: ISO C++17 does not allow dynamic exception
specifications
356 | void section_real<_class, _data,
section_type_GNU_VERNEED>::update(const file &file) throw
(std::bad_alloc)
| ^~~~~
elf.cpp:373:43: error: ISO C++17 does not allow dynamic exception
specifications
373 | section_real (Shdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:400:93: error: ISO C++17 does not allow dynamic exception
specifications
400 | segment_real<_class, _data, segment_type_INTERP>::segment_real
(Phdr *header, uint8_t *mem) throw (std::bad_alloc)
| ^~~~~
elf.cpp:429:99: error: ISO C++17 does not allow dynamic exception
specifications
429 | void dynamic_data<_class, _data>::update_string(const
section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:435:42: error: ISO C++17 does not allow dynamic exception
specifications
435 | std::string symbol::get_version () const throw (std::bad_alloc)
| ^~~~~
elf.cpp:445:47: error: ISO C++17 does not allow dynamic exception
specifications
445 | std::string symbol::get_version_file () const throw
(std::bad_alloc)
| ^~~~~
elf.cpp:453:47: error: ISO C++17 does not allow dynamic exception
specifications
453 | std::string symbol::get_name_version () const throw
(std::bad_alloc)
| ^~~~~
elf.cpp:478:98: error: ISO C++17 does not allow dynamic exception
specifications
478 | void symbol_data<_class, _data>::update_string(const
section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:484:83: error: ISO C++17 does not allow dynamic exception
specifications
484 | void symbol_data<_class, _data>::update_version(const file
&file, uint16_t index) throw (std::bad_alloc)
| ^~~~~
elf.cpp:531:110: error: ISO C++17 does not allow dynamic exception
specifications
531 | void version_definition_data<_class, _data>::update_string(const
section_type<section_type_STRTAB> §ion) throw (std::bad_alloc)
| ^~~~~
elf.cpp:537:44: error: ISO C++17 does not allow dynamic exception
specifications
537 | version_requirement::version_requirement() throw
(std::bad_alloc)
| ^~~~~
elf.cpp:561:65: error: ISO C++17 does not allow dynamic exception
specifications
561 | update_string(const section_type<section_type_STRTAB> §ion)
throw (std::bad_alloc)
| ^~~~~
elf.cpp:596:65: error: ISO C++17 does not allow dynamic exception
specifications
596 | update_string(const section_type<section_type_STRTAB> §ion)
throw (std::bad_alloc)
| ^~~~~
make[7]: *** [Makefile:387: elf.o] Error 1
make[7]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/src/mklibs-readelf'
make[6]: *** [Makefile:440: all-recursive] Error 1
make[6]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/src'
make[5]: *** [Makefile:364: all-recursive] Error 1
make[5]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35'
make[4]: *** [Makefile:305: all] Error 2
make[4]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35'
make[3]: *** [Makefile:35:
/home/bas/Workspace/openwrt-19.07/build_dir/host/mklibs-0.1.35/.built]
Error 2
make[3]: Leaving directory
'/home/bas/Workspace/openwrt-19.07/tools/mklibs'
time: tools/mklibs/compile#0.41#0.12#0.00
make[2]: *** [tools/Makefile:159: tools/mklibs/compile] Error 2
make[2]: Leaving directory '/home/bas/Workspace/openwrt-19.07'
make[1]: *** [tools/Makefile:155:
/home/bas/Workspace/openwrt-19.07/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynyyyynnyyy]
Error 2
make[1]: Leaving directory '/home/bas/Workspace/openwrt-19.07'
make: *** [/home/bas/Workspace/openwrt-19.07/include/toplevel.mk:227:
world] Error 2
More information about the openwrt-devel
mailing list