CESNET / libfds

Flow Data Storage library
Other
9 stars 12 forks source link

Build fail on Fedora 36. #27

Closed hejcman closed 2 years ago

hejcman commented 2 years ago

Following the installation instruction and building the library on Fedora 36 results in the following error:

❯ make
[  2%] Building C object src/trie/CMakeFiles/trie_obj.dir/trie.c.o
[  2%] Built target trie_obj
[  4%] Building CXX object src/xml_parser/CMakeFiles/xml_parser_obj.dir/xml_parser.cpp.o
[  4%] Built target xml_parser_obj
[  6%] Building CXX object src/iemgr/CMakeFiles/iemgr_obj.dir/iemgr_common.cpp.o
[  8%] Building CXX object src/iemgr/CMakeFiles/iemgr_obj.dir/iemgr_element.cpp.o
[ 10%] Building CXX object src/iemgr/CMakeFiles/iemgr_obj.dir/iemgr_scope.cpp.o
[ 12%] Building CXX object src/iemgr/CMakeFiles/iemgr_obj.dir/iemgr_alias.cpp.o
/home/hejcman/Documents/libfds/src/iemgr/iemgr_alias.cpp: In function ‘bool check_valid_alias_name(const char*)’:
/home/hejcman/Documents/libfds/src/iemgr/iemgr_alias.cpp:18:33: error: variable ‘std::array<const char*, 6> prefixes’ has initializer but incomplete type
   18 |     std::array<const char *, 6> prefixes { "in ", "out ", "ingress " ,"egress ", "src " ,"dst " };
      |                                 ^~~~~~~~
make[2]: *** [src/iemgr/CMakeFiles/iemgr_obj.dir/build.make:118: src/iemgr/CMakeFiles/iemgr_obj.dir/iemgr_alias.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:425: src/iemgr/CMakeFiles/iemgr_obj.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

All listed dependencies have been installed and no further arguments were passed to CMake.

hejcman commented 2 years ago

Likely due to GCC version. Fedora 36 uses version 12.1.1. When installing on Ubuntu Server 22.04 with GCC version 11.2.0, no errors were thrown.

sedmicha commented 2 years ago

Looking at the error message and the problematic file, my first guess would be that the <array> include is missing. If that is the issue, it baffles me that this hasn't been a problem and wasn't caught until now. I haven't been able to replicate the issue on my machine, but I'm in the process of getting a Fedora 36 VM running and looking into it.

sedmicha commented 2 years ago

This has now been fixed in the devel branch.