ARPA-SIMC / arkimet

A set of tools to organize, archive and distribute data files.
Other
15 stars 5 forks source link

Cannot compile in Fedora 36 - std::iterator is deprecated #292

Closed edigiacomo closed 2 years ago

edigiacomo commented 2 years ago

From https://simc.arpae.it/moncic-ci/arkimet/202208240820/master/fedora36/build.log:

2022-08-24 10:22:39 INFO system.fedora36 stderr: In file included from core/file.h:4,
2022-08-24 10:22:39 INFO system.fedora36 stderr:                  from core/file.cc:1:
2022-08-24 10:22:39 INFO system.fedora36 stderr: ../arki/utils/sys.h:369:35: error: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Werror=deprecated-declarations]
2022-08-24 10:22:39 INFO system.fedora36 stderr:   369 |     struct iterator : public std::iterator<std::input_iterator_tag, struct dirent>
2022-08-24 10:22:39 INFO system.fedora36 stderr:       |                                   ^~~~~~~~
2022-08-24 10:22:39 INFO system.fedora36 stderr: In file included from /usr/include/c++/12/string:45,
2022-08-24 10:22:39 INFO system.fedora36 stderr:                  from ../arki/utils/sys.h:11:
2022-08-24 10:22:39 INFO system.fedora36 stderr: /usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
2022-08-24 10:22:39 INFO system.fedora36 stderr:   127 |     struct _GLIBCXX17_DEPRECATED iterator
2022-08-24 10:22:39 INFO system.fedora36 stderr:       |                                  ^~~~~~~~
2022-08-24 10:22:40 INFO system.fedora36 stderr: cc1plus: all warnings being treated as errors
spanezz commented 2 years ago

Oddly I cannot reproduce this error on my fedora36 container. However, I did find another missing include on fedora36 that I fixed and pushed

spanezz commented 2 years ago

Meanwhile I found https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/