Unable to build Zeek from source when spicy is enabled

Hi,

I am trying to build Zeek-5.0 RPM from source. The build process is erroring out with the following traceback

[ 82%] Building CXX object auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/tests/id-base.cc.o
[ 82%] Building CXX object auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/tests/visitor.cc.o
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_0()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:35:9: error: 'result_t' does not name a type
   35 |         result_t operator()(const hilti::Module& m) { return "(mo)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:35:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:36:9: error: 'result_t' does not name a type
   36 |         result_t operator()(const hilti::ID& id) { return "(id)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:36:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:37:9: error: 'result_t' does not name a type
   37 |         result_t operator()(const hilti::Type& t, const_position_t i) { return "(t)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:37:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:38:9: error: 'result_t' does not name a type
   38 |         result_t operator()(const hilti::type::String& s) { return "(ts)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:38:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:39:9: error: 'result_t' does not name a type
   39 |         result_t operator()(const hilti::type::SignedInteger& i) { return "(ti)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:39:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:40:9: error: 'result_t' does not name a type
   40 |         result_t operator()(const hilti::expression::Ctor& c, const_position_t i) { return "(e:c)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:40:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:41:9: error: 'result_t' does not name a type
   41 |         result_t operator()(const hilti::ctor::Bool& b) { return "(c:b)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:41:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_0()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:43:27: error: 'iterator_t' has not been declared
   43 |         void testDispatch(iterator_t::Position i) {
      |                           ^~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_0()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:44:27: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
   44 |             if ( auto s = dispatch(i) )
      |                           ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:44:27: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_1()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:74:15: error: 'base_t' has not been declared
   74 |         using base_t::base_t;
      |               ^~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:76:9: error: 'result_t' does not name a type
   76 |         result_t operator()(const hilti::Module& m) { x += "(mo)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:76:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:77:9: error: 'result_t' does not name a type
   77 |         result_t operator()(const hilti::ID& id) { x += "(id)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:77:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:78:9: error: 'result_t' does not name a type
   78 |         result_t operator()(const hilti::Type& t, const_position_t i) { x += "(t)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:78:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:79:9: error: 'result_t' does not name a type
   79 |         result_t operator()(const hilti::type::String& s) { x += "(ts)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:79:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:80:9: error: 'result_t' does not name a type
   80 |         result_t operator()(const hilti::type::SignedInteger& i) { x += "(ti)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:80:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:81:9: error: 'result_t' does not name a type
   81 |         result_t operator()(const hilti::expression::Ctor& c, const_position_t i) { x += "(e:c)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:81:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:82:9: error: 'result_t' does not name a type
   82 |         result_t operator()(const hilti::ctor::Bool& b) { x += "(c:b)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:82:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_1()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:84:27: error: 'iterator_t' has not been declared
   84 |         void testDispatch(iterator_t::Position i) {
      |                           ^~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:89:27: error: 'const_iterator_t' has not been declared
   89 |         void testDispatch(const_iterator_t::Position i) {
      |                           ^~~~~~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:89:14: error: 'void DOCTEST_ANON_FUNC_1()::Visitor::testDispatch(int)' cannot be overloaded with 'void DOCTEST_ANON_FUNC_1()::Visitor::testDispatch(int)'
   89 |         void testDispatch(const_iterator_t::Position i) {
      |              ^~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:84:14: note: previous declaration 'void DOCTEST_ANON_FUNC_1()::Visitor::testDispatch(int)'
   84 |         void testDispatch(iterator_t::Position i) {
      |              ^~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_1()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:85:20: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
   85 |             if ( ! dispatch(i) )
      |                    ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_1()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:90:20: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
   90 |             if ( ! dispatch(i) )
      |                    ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_2()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:136:15: error: 'base_t' has not been declared
  136 |         using base_t::base_t;
      |               ^~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:138:9: error: 'result_t' does not name a type
  138 |         result_t operator()(const hilti::Module& m) { return "(mo)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:138:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:139:9: error: 'result_t' does not name a type
  139 |         result_t operator()(const hilti::ID& id) { return "(id)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:139:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:140:9: error: 'result_t' does not name a type
  140 |         result_t operator()(const hilti::Type& t, const_position_t i) { return "(t)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:140:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:141:9: error: 'result_t' does not name a type
  141 |         result_t operator()(const hilti::type::String& s) { return "(ts)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:141:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:142:9: error: 'result_t' does not name a type
  142 |         result_t operator()(const hilti::type::SignedInteger& i) { return "(ti)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:142:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:143:9: error: 'result_t' does not name a type
  143 |         result_t operator()(const hilti::expression::Ctor& c, const_position_t i) { return "(e:c)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:143:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:144:9: error: 'result_t' does not name a type
  144 |         result_t operator()(const hilti::ctor::Bool& b) { return "(c:b)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:144:9: note: (perhaps 'typename hilti::visitor::PreOrder<std::basic_string<char>, DOCTEST_ANON_FUNC_2()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:146:27: error: 'iterator_t' has not been declared
  146 |         void testDispatch(iterator_t::Position i) {
      |                           ^~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:153:27: error: 'const_iterator_t' has not been declared
  153 |         void testDispatch(const_iterator_t::Position i) {
      |                           ^~~~~~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:153:14: error: 'void DOCTEST_ANON_FUNC_2()::Visitor::testDispatch(int)' cannot be overloaded with 'void DOCTEST_ANON_FUNC_2()::Visitor::testDispatch(int)'
  153 |         void testDispatch(const_iterator_t::Position i) {
      |              ^~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:146:14: note: previous declaration 'void DOCTEST_ANON_FUNC_2()::Visitor::testDispatch(int)'
  146 |         void testDispatch(iterator_t::Position i) {
      |              ^~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_2()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:147:27: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
  147 |             if ( auto s = dispatch(i) )
      |                           ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_2()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:154:27: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
  154 |             if ( auto s = dispatch(i) )
      |                           ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_3()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:177:15: error: 'base_t' has not been declared
  177 |         using base_t::base_t;
      |               ^~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:179:9: error: 'result_t' does not name a type
  179 |         result_t operator()(const hilti::Module& m) { x += "(mo)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:179:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:180:9: error: 'result_t' does not name a type
  180 |         result_t operator()(const hilti::ID& id) { x += "(id)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:180:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:181:9: error: 'result_t' does not name a type
  181 |         result_t operator()(const hilti::Type& t) { x += "(t)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:181:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:182:9: error: 'result_t' does not name a type
  182 |         result_t operator()(const hilti::type::String& s) { x += "(ts)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:182:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:183:9: error: 'result_t' does not name a type
  183 |         result_t operator()(const hilti::type::SignedInteger& i) { x += "(ti)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:183:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:184:9: error: 'result_t' does not name a type
  184 |         result_t operator()(const hilti::expression::Ctor& c) { x += "(e:c)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:184:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:185:9: error: 'result_t' does not name a type
  185 |         result_t operator()(const hilti::ctor::Bool& b) { x += "(c:b)"; }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:185:9: note: (perhaps 'typename hilti::visitor::PostOrder<void, DOCTEST_ANON_FUNC_3()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:187:27: error: 'iterator_t' has not been declared
  187 |         void testDispatch(iterator_t::Position i) {
      |                           ^~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:192:27: error: 'const_iterator_t' has not been declared
  192 |         void testDispatch(const_iterator_t::Position i) {
      |                           ^~~~~~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:192:14: error: 'void DOCTEST_ANON_FUNC_3()::Visitor::testDispatch(int)' cannot be overloaded with 'void DOCTEST_ANON_FUNC_3()::Visitor::testDispatch(int)'
  192 |         void testDispatch(const_iterator_t::Position i) {
      |              ^~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:187:14: note: previous declaration 'void DOCTEST_ANON_FUNC_3()::Visitor::testDispatch(int)'
  187 |         void testDispatch(iterator_t::Position i) {
      |              ^~~~~~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_3()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:188:20: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
  188 |             if ( ! dispatch(i) )
      |                    ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In member function 'void DOCTEST_ANON_FUNC_3()::Visitor::testDispatch(int)':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:193:20: error: there are no arguments to 'dispatch' that depend on a template parameter, so a declaration of 'dispatch' must be available [-fpermissive]
  193 |             if ( ! dispatch(i) )
      |                    ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_4()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:213:9: error: 'result_t' does not name a type
  213 |         result_t operator()(const hilti::type::SignedInteger& n, const_position_t i) { x = i.parent().typename_(); }
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:213:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_4()::Visitor>::result_t' was intended)
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_5()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:227:9: error: 'result_t' does not name a type
  227 |         result_t operator()(const hilti::type::SignedInteger& n, const_position_t i) {
      |         ^~~~~~~~
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:227:9: note: (perhaps 'typename hilti::visitor::PreOrder<void, DOCTEST_ANON_FUNC_5()::Visitor>::result_t' was intended)
[ 82%] Linking CXX executable ../../bin/hiltic
make[3]: *** [auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/build.make:109: auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/tests/visitor.cc.o] Error 1
make[3]: Leaving directory '/home/admin/rpmbuild/BUILD/zeek-5.0.0/build'
make[2]: *** [CMakeFiles/Makefile2:4877: auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/admin/rpmbuild/BUILD/zeek-5.0.0/build'
[ 82%] Built target hiltic
make[2]: Leaving directory '/home/admin/rpmbuild/BUILD/zeek-5.0.0/build'
make[1]: *** [Makefile:172: all] Error 2
make[1]: Leaving directory '/home/admin/rpmbuild/BUILD/zeek-5.0.0/build'
make: *** [Makefile:15: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.cFKnPk (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.cFKnPk (%build)

The RPM is being built for CentOS-7 using devtoolset-9 software collection library.

The compile flags are

./configure --prefix=%{_prefix} --binary-package --enable-static-broker --disable-broker-tests --disable-btest --disable-btest-pcaps --with-python=/usr/bin/python3.6 --enable-jemalloc --disable-cpp-tests --build-type=Release

Adding --disable-spicy to flags removes the error and allows build to succeed.

Any help would be welcome

Thanks

./configure --prefix=%{_prefix} --binary-package --enable-static-broker --disable-broker-tests --disable-btest --disable-btest-pcaps --with-python=/usr/bin/python3.6 --enable-jemalloc --disable-cpp-tests --build-type=Release

I was able to successfully build the default target in that configuration with the CI Docker setup (required installing jemalloc-devel) so I suspect this has something to do with how the RPM is built here.

I am trying to build Zeek-5.0 RPM from source. The build process is erroring out with the following traceback

[ 82%] Building CXX object auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/tests/id-base.cc.o
[ 82%] Building CXX object auxil/spicy/spicy/hilti/toolchain/CMakeFiles/hilti-toolchain-tests.dir/tests/visitor.cc.o
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc: In function 'void DOCTEST_ANON_FUNC_0()':
/home/admin/rpmbuild/BUILD/zeek-5.0.0/auxil/spicy/spicy/hilti/toolchain/tests/visitor.cc:35:9: error: 'result_t' does not name a type
   35 |         result_t operator()(const hilti::Module& m) { return "(mo)"; }
   ...

This error is from building the target hilti-tests from the bundled Spicy which is not built by default. The default target should build though (e.g., plain make), could you check which target your RPM build process tries to build?

Adding --disable-spicy to flags removes the error and allows build to succeed.

With this flag the bundled Spicy is not built at all. If you do not plan to use Spicy this might be a viable workaround.

Thanks for looking at this.

The configuration output for Spicy is

====================|  Spicy Build Summary  |====================

Version:               1.5.0

Build type:            Release
Build directory:       /home/admin/rpmbuild/BUILD/zeek-5.0.0/build/auxil/spicy/spicy
Install prefix:        /opt/zeek
Build shared libs:     OFF

Host system:           Linux 3.10.0-1127.18.2.el7.x86_64 (x86_64)
C compiler:            /opt/rh/devtoolset-9/root/usr/bin/cc (GNU 9.3.1)
C++ compiler:          /opt/rh/devtoolset-9/root/usr/bin/c++ (GNU 9.3.1)

Building toolchain:    yes

Use ccache:            no
Use gold linker:       yes
Use sanitizers:
Use backtrace:         yes

Warnings are errors:
Precompile headers:    OFF

Bison version:         3.0.4
CMake version:         3.17.3
Flex version:          2.6.4
Python version:        3.6.8
zlib version:          1.2.7

================================================================

I have not tinkered with the targets but looking at Spicy, if build toolchain is yes, then the tests will get built.

The build and install part in the spec file are picked from the SRPM spec file:

%build
./configure --prefix=%{_prefix} --binary-package --enable-static-broker --disable-broker-tests --disable-btest --disable-btest-pcaps --with-python=/usr/bin/python3.6 --enable-jemalloc --disable-cpp-tests --build-type=Release
make

%install
rm -rf $RPM_BUILD_ROOT
%if %{defined rhel_version}
make install DESTDIR=$RPM_BUILD_ROOT
%else
%make_install
%endif

This should be disabled on the Zeek side, see zeek/CMakeLists.txt at 86c316ddfc1466d493a9b9239cca5aa8cb361fe2 · zeek/zeek · GitHub. Which Zeek commit are you trying to build?

1 Like

Thanks for the pointer. I was building the LTS source from https://zeek.org/get-zeek/

Patching in the commit provided by you stops tests from building and allows spicy build to succeed.

Great to hear! The patch is already marked to be included in the zeek-5.0.1 patch release.