Hi,
I was trying to build Zeek-8.1 RPM for Rocky 8 and 9 but it is failing at compile stage.
For context, we build Zeek RPMs for Rocky8/9 using a spec file and rpmbuildtool.
Zeek-8.0.3 was built with GCC-10 (toolset-gcc-10) on Rocky8 and standard GCC-11 on Rocky9.
With Zeek-8.1, GCC-10 gives an error on Rocky8 (parameter packs not expanded with ‘…’) so I am using GCC-11 (toolset-gcc-11).
However, both Rocky8 and 9 builds are failing
[ 3%] Building CXX object auxil/spicy/hilti/toolchain/CMakeFiles/hilti-objects.dir/src/ast/operator.cc.o
/home/admin/rpmbuild/BUILD/zeek-8.1.0/auxil/spicy/hilti/toolchain/src/ast/operator.cc: In function 'std::string {anonymous}::printOperator(hilti::operator_::Kind, const Expressions&, bool, const hilti::Meta&)':
/home/admin/rpmbuild/BUILD/zeek-8.1.0/auxil/spicy/hilti/toolchain/src/ast/operator.cc:96:53: error: no match for 'operator|' (operand types are 'hilti::node::Range<hilti::type::tuple::Element>' and 'std::ranges::views::__adaptor::_Partial<std::ranges::views::_Transform, {anonymous}::printOperator(hilti::operator_::Kind, const Expressions&, bool, const hilti::Meta&)::<lambda(const auto:52&)> >')
96 | args = util::join(ttype->elements() | std::views::transform([&render_one](const auto& x) {
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | std::ranges::views::__adaptor::_Partial<std::ranges::views::_Transform, {anonymous}::printOperator(hilti::operator_::Kind, const Expressions&, bool, const hilti::Meta&)::<lambda(const auto:52&)> >
| hilti::node::Range<hilti::type::tuple::Element>
97 | return render_one(x->type());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 | }),
| ~~
.... long error chain .....
8.1.0/auxil/spicy/hilti/toolchain/src/ast/operator.cc:158:117: required from here
/opt/rh/gcc-toolset-11/root/usr/include/c++/11/ranges:747:13: required for the satisfaction of '__adaptor_invocable<_Self, _Range>' [with _Self = std::ranges::views::__adaptor::_Partial<std::ranges::views::_Transform, <unnamed>::printOperator::._anon_207>; _Range = hilti::node::Range<hilti::type::operand_list::Operand>]
/opt/rh/gcc-toolset-11/root/usr/include/c++/11/ranges:748:9: in requirements [with _Args = {hilti::node::Range<hilti::type::operand_list::Operand>}; _Adaptor = std::ranges::views::__adaptor::_Partial<std::ranges::views::_Transform, <unnamed>::printOperator::._anon_207>]
/opt/rh/gcc-toolset-11/root/usr/include/c++/11/ranges:748:44: note: the required expression 'declval<_Adaptor>()((declval<_Args>)()...)' is invalid
748 | = requires { std::declval<_Adaptor>()(declval<_Args>()...); };
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-changes-meaning' may have been intended to silence earlier diagnostics
make[3]: *** [auxil/spicy/hilti/toolchain/CMakeFiles/hilti-objects.dir/build.make:360: auxil/spicy/hilti/toolchain/CMakeFiles/hilti-objects.dir/src/ast/operator.cc.o] Error 1
make[3]: Leaving directory '/home/admin/rpmbuild/BUILD/zeek-8.1.0/build'
make[2]: *** [CMakeFiles/Makefile2:5381: auxil/spicy/hilti/toolchain/CMakeFiles/hilti-objects.dir/all] Error 2
The build section of spec file is
%build
./configure --prefix=%{_prefix} --binary-package --enable-static-broker --disable-broker-tests --disable-btest --disable-btest-pcaps --with-python=/usr/bin/python3.11 --enable-jemalloc --disable-cpp-tests --build-type=Release
make
Any ideas on how to proceed with build?
Thanks