2 changes to better support building with GCC 12, which out of the box, is currently broken if you want to build using depends.
Prevent -Warray-bounds
errors when building libxkbcommon. i.e:
0src/xkbcomp/ast-build.c:82:27: error: array subscript 'ExprDef[0]' is partly outside array bounds of 'unsigned char[32]' [-Werror=array-bounds]
1 82 | expr->expr.value_type = type;
2 | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
3src/xkbcomp/ast-build.c:75:21: note: object of size 32 allocated by 'malloc'
4 75 | ExprDef *expr = malloc(size);
5 | ^~~~~~~~~~~~
It might be the case that these would be fixed by updating the package, but that would also require installing new build tools (meson), as well as potentially more dependencies (wayland), and it’d need testing with Qt. For now, just turn the errors into wanrings.
Define BOOST_NO_CXX98_FUNCTION_BASE
to prevent GCC warning about the use of std::unary_function
. i.e:
0/bitcoin/depends/aarch64-unknown-linux-gnu/include/boost/container_hash/hash.hpp:131:33:
1warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
2 131 | struct hash_base : std::unary_function<T, std::size_t> {};
3 | ^~~~~~~~~~~~~~
4In file included from /usr/include/c++/12/bits/unique_ptr.h:37,
5 from /usr/include/c++/12/memory:76,
6 from ./init.h:10,
7 from init.cpp:10:
8/usr/include/c++/12/bits/stl_function.h:117:12: note: declared here
9 117 | struct unary_function
Boost container_hash
(included via functional -> multi_index) uses
std::unary_function
, which was deprecated in C++11, and “removed” in
C++17. It’s use causes warnings with newer compilers, i.e GCC 12.1.
Use the MACRO outlined in https://github.com/boostorg/container_hash/issues/22, and added to Boost Config for GCC 12 in https://github.com/boostorg/config/pull/430, to prevent it’s use.
The standard library no longer supports std::unary_function and std::binary_function. They were deprecated in C++11 and is removed from C++14.
Guix Build (x86_64):
Guix Build (arm64):