OPM / opm-simulators

OPM Flow and experimental simulators, including components such as well models etc.
http://www.opm-project.org
GNU General Public License v3.0
122 stars 121 forks source link

Cannot compile on Centos 7 #2630

Closed goncalvesmachadoc closed 3 years ago

goncalvesmachadoc commented 4 years ago

We are attempting to build opm from source, however are encountering errors during the unit test.

The build host is a CentOS Linux release 7.7.1908 machine. We are using the following software to build OPM and are following the procedure at https://opm-project.org/?page_id=231.

1) git/2.21.0
2) gcc/9.2.0
3) blas/gcc/64/3.8.0
4) trilinos/191218
5) cmake/3.15.7
6) dune/2.7.0
7) lapack/gcc/64/3.8.0
8) openmpi/2.1.1
9) boost/1.58 or boost/1.72 10) suitsparse/5.7.1

We tried both boost versions 1.58 and 1.72 and installed an updated version of binutils. The latter made no difference and further attempts were made with the default system linker.

Typically the build fails as follows. These errors messages are from using the boost version 1.72

[ 44%] Building CXX object CMakeFiles/test_EclIO.dir/tests/test_EclIO.cpp.o
[ 44%] Linking CXX executable bin/test_EclIO
CMakeFiles/test_EclIO.dir/tests/test_EclIO.cpp.o: In function `boost::unit_test::make_test_case(boost::function<void ()> const&, boost::unit_test::basic_cstr
ing<char const>, boost::unit_test::basic_cstring<char const>, unsigned long)':
test_EclIO.cpp:(.text._ZN5boost9unit_test14make_test_caseERKNS_8functionIFvvEEENS0_13basic_cstringIKcEES8_m[_ZN5boost9unit_test14make_test_caseERKNS_8functio
nIFvvEEENS0_13basic_cstringIKcEES8_m]+0x23): undefined reference to `boost::unit_test::ut_detail::normalize_test_case_name[abi:cxx11](boost::unit_test::basic
_cstring<char const>)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/test_EclIO] Error 1
make[1]: *** [CMakeFiles/test_EclIO.dir/all] Error 2
make: *** [all] Error 2

Using boost version 1.58 the build fails at the same place and initially returns more errors before returning the same error above.

Despite the errors with opm_common I went ahead and build the opm_materials, though unusable it built without errors.

I have logfiles of the cmake configurations as well as the extended error messages from using boost version 1.58 if required.

We have also tried to install opm binary packages and we received the following error:

https://www.opm-project.org/package/redhat/%24releasever/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror.

One of the configured repositories failed (Open Porous Media Initiative), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:

  1. Contact the upstream for the repository and get them to fix the problem.

As an aside we have recently built OPM from source successfully on Centos 6. Could you advise on our issue?

akva2 commented 4 years ago

boost on centos is a mess. stick to boost148-devel or disable building of tests. (-DBUILD_TESTING=0).

goncalvesmachadoc commented 4 years ago

Thanks, that works! I disabled the tests (-DBUILD_TESTING=0) and opm-common now builds.

alfbr commented 4 years ago

Reminds me of a discussion at the summit :-)

bska commented 3 years ago

@goncalvesmachadoc : Is this still a problem for you? If not, would you mind closing the issue?