Skip to content

Cannot build on RHEL 8 #150

@antoine-morvan

Description

@antoine-morvan

Hello,

I am trying to build malt on a cluster with RHEL 8 installed. However the build fails with the following error:

[ 61%] Building CXX object src/reader/libreader/CMakeFiles/malt-reader.dir/json/Parser.cpp.o
cd /home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/build_malt/src/reader/libreader && /usr/bin/g++ -Dmalt_reader_EXPORTS -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/build_malt/src -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/. -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/.. -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/../.. -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/../../libinstrum -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/extern-deps/from-nlohmann-json -I/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/extern-deps/from-fftw -O3 -DNDEBUG -std=gnu++11 -fPIC -fPIC -fvisibility=hidden -fopenmp -pthread -MD -MT src/reader/libreader/CMakeFiles/malt-reader.dir/json/Parser.cpp.o -MF CMakeFiles/malt-reader.dir/json/Parser.cpp.o.d -o CMakeFiles/malt-reader.dir/json/Parser.cpp.o -c /home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/json/Parser.cpp
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
                 from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/json/Parser.cpp:12:
/usr/include/c++/8/bits/stl_pair.h: In instantiation of 'struct std::pair<MALTJson::JsonString, MALTJson::JsonNode>':
/home/antoine/.tmp/antoine.780ec5c9bbce.sws/tmp_malt.7BsBgiO2g/malt-1.5.0/src/reader/libreader/json/Parser.cpp:128:82:   required from here
/usr/include/c++/8/bits/stl_pair.h:303:17: error: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = MALTJson::JsonString; _T2 = MALTJson::JsonNode]' declared to take const reference, but implicit declaration would take non-const
       constexpr pair(const pair&) = default;
                 ^~~~
make[2]: *** [src/reader/libreader/CMakeFiles/malt-reader.dir/build.make:93: src/reader/libreader/CMakeFiles/malt-reader.dir/json/Parser.cpp.o] Error 1

I tried older versions of malt; it seems this was introduced with version 1.4.0, as versions 1.2.5 to 1.3.1 do not trigger this error, whereas 1.4.0 to 1.5.0 all produce it.

GCC on RHEL 8 is

$ gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28)

I can provide more elements if needed.

Best.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions