Hello everyone,
I am trying to install openmc from source using the “Manually Installing from Source” tutorial.
I have been successful in doing so and using openmc on my personal computer using WSL. However, I would like to install it on my university’s computers which are running Ubuntu 20.04.6 LTS on an ARM64 architecture.
The issue I am facing is occurring when running make at the “Linking CXX shared library lib/libopenmc.so” step.
I have noticed other topics about compiling from source, however I haven’t seen anything about this specific issue, please excuse me in case I missed it.
The output of running cmake … is the following :
– The C compiler identification is GNU 9.4.0
– The CXX compiler identification is GNU 9.4.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– No build type selected, defaulting to RelWithDebInfo
– Found OpenMP_C: -fopenmp (found version “4.5”)
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”)
– Found ZLIB: /usr/local/lib/libz.a (found version “1.1.4”)
– Found PNG: /usr/lib/aarch64-linux-gnu/libpng.so (found version “1.2.5”)
– Found HDF5: /usr/lib/aarch64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/aarch64-linux-gnu/libpthread.so;/usr/lib/aarch64-linux-gnu/libsz.so;/usr/local/lib/libz.a;/usr/lib/aarch64-linux-gnu/libdl.so;/usr/lib/aarch64-linux-gnu/libm.so (found version “1.10.4”) found components: C HL
– HDF5 Libraries: /usr/lib/aarch64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/aarch64-linux-gnu/libsz.so;/usr/local/lib/libz.a
– OpenMC C++ flags:
– OpenMC Linker flags:
– Found Git: /usr/bin/git (found version “2.25.1”)
– Submodule update
Submodule path ‘vendor/fmt’: checked out ‘d141cdbeb0fb422a3fb7173b285fd38e0d1772dc’
– Did not find pugixml, will use submodule instead
CMake Deprecation Warning at vendor/pugixml/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument value. Or, use the … syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.
– Did not find fmt, will use submodule instead
– Module support is disabled.
– Version: 8.0.1
– Build type: RelWithDebInfo
– CXX_STANDARD: 11
– Performing Test has_std_11_flag
– Performing Test has_std_11_flag - Success
– Performing Test has_std_0x_flag
– Performing Test has_std_0x_flag - Success
– Performing Test SUPPORTS_USER_DEFINED_LITERALS
– Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
– Performing Test FMT_HAS_VARIANT
– Performing Test FMT_HAS_VARIANT - Success
– Required features: cxx_variadic_templates
– Looking for strtod_l
– Looking for strtod_l - not found
– Did not find xtensor, will use submodule instead
CMake Deprecation Warning at vendor/xtl/CMakeLists.txt:10 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument value. Or, use the … syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.
– xtl v0.7.7
CMake Deprecation Warning at vendor/xtensor/CMakeLists.txt:10 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument value. Or, use the … syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.
– Building xtensor v0.25.0
– Found xtl v0.7.7
– Did not find gsl-lite, will use submodule instead
CMake Deprecation Warning at vendor/gsl-lite/CMakeLists.txt:10 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument value. Or, use the … syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.
– Project ‘gsl_lite’, package ‘gsl-lite’ version: ‘0.36.1’
– Did not find Catch2, will use submodule instead
– Performing Test HAVE_FLAG__ffile_prefix_map_openmc_vendor_Catch2_
– Performing Test HAVE_FLAG__ffile_prefix_map_openmc_vendor_Catch2_ - Success
– Configuring done (5.3s)
– Generating done (1.0s)
the error occurs when running make :
[ 47%] Linking CXX shared library lib/libopenmc.so
/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocations in generic ELF (EM: 3)
/usr/bin/ld: /usr/local/lib/libz.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/libopenmc.dir/build.make:1774: lib/libopenmc.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:318: CMakeFiles/libopenmc.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Is there a specific libz version that would be required or would the error be due to something else I am missing ?
Thank you in advance,
Raphaël