Compilation with AOCC - clang error

Hello,

I am struggling to find a way to compile HDF5 using the AOCC compilers. I have tried HDF5-1.8.20 and 1.8.20. The error message I get is:

clang-8: error: unknown argument: '-soname'
clang-8: error: no such file or directory: 'libhdf5_fortran.so.10'

I tried making the following change to the configure script:

sed -i ‘s/$wl-soname/$wl-install_name/g’ …/configure

Now I get a different error:

ld.lld: error: unknown argument: -install_name
ld.lld: error: cannot open libhdf5.so.10: No such file or directory
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)

I am completely stuck and would appreciate any suggestions.

Likewise, I am having the same problem. Did you manage to solve this?

We ended up disabling the dynamic library build and just using a static library for now. Not ideal but it works for our current purposes.

./configure --prefix=/home/nompelis/project/AHDF --enable-fortran --enable-parallel --disable-shared

We also are only building with OpenMPI 3.1.4 now as we ran into other issues when trying to build with OpenMPI 4.0.1.

FYI, also trying to build HDF5 with openmpi 4.0.1 under macOS (mojave) and running into the cpp preprocessor issue, i.e., getting the error message as follows:
checking how to run the C++ preprocessor… /usr/local/bin/cpp
configure: error: in /Users/rollett/Downloads/hdf5-1.10.5': configure: error: C++ preprocessor "/usr/local/bin/cpp" fails sanity check Seeconfig.log’ for more details
I’ve tried various options for setting CXXCPP and specifying the path to the C++ compiler but nothing works.

I also ran into the same problem whilst trying to compile hdf5-1.10.6 using AOCC-2.2.0 + openmpi-4.0.1. The system OS is openSUSE-15.2.

I also ran into the same problem with hdf5-1.12.0 using AOCC 2.3.0, without OpenMPI (serial build), with Fortran support. This is on Ubuntu 20.04.1 LTS x86_64.

  FCLD     libhdf5_fortran.la
clang-11: error: unknown argument: '-soname'
clang-11: error: no such file or directory: 'libhdf5_fortran.so.200'
$ clang --version
AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10) (based on LLVM Mirror.Version.11.0.0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/AMD/aocc-compiler-2.3.0/bin
$ uname -a
Linux basecamp 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux