Closed barracuda156 closed 9 months ago
Also fails with LLVM clang-15:
-- The C compiler identification is Clang 15.0.7
-- The Fortran compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/local/bin/clang-mp-15 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/local/bin/gfortran-mp-13 - skipped
-- h5fortran 4.10.3 CMake 3.28.0-rc1 Toolchain
-- checking that compilers can link together
-- checking that compilers can link together - OK
-- Performing Test HAVE_IEEE_ARITH
-- Performing Test HAVE_IEEE_ARITH - Success
-- Looking for H5_HAVE_FILTER_SZIP
-- Looking for H5_HAVE_FILTER_SZIP - found
-- Looking for H5_HAVE_FILTER_DEFLATE
-- Looking for H5_HAVE_FILTER_DEFLATE - found
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.3")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HDF5_C_links
-- Performing Test HDF5_C_links - Success
-- Performing Test HDF5_Fortran_links
-- Performing Test HDF5_Fortran_links - Success
-- Found HDF5: /opt/local/lib/libhdf5_hl.dylib;/opt/local/lib/libhdf5.dylib (found version "1.14.2") found components: Fortran
-- Performing Test hdf5_c_types
-- Performing Test hdf5_c_types - Failed
CMake Error at cmake/CheckHDF5.cmake:42 (message):
HDF5 C types failed check
Call Stack (most recent call first):
cmake/CheckHDF5.cmake:96 (check_hdf5_c)
CMakeLists.txt:49 (check_hdf5)
I wonder if this is a Macports packaging issue with the new Xcode 15 linker. I use similar AppleClang and Gfortran versions with Homebrew and don't have any issue.
I tried with CMake 3.27.7 and CMake 3.28.0-rc2
cmake -Bbuild
-- The C compiler identification is AppleClang 15.0.0.15000040
-- The Fortran compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/homebrew/bin/gfortran - skipped
-- h5fortran 4.10.3 CMake 3.27.7 Toolchain
-- Performing Test HAVE_IEEE_ARITH
-- Performing Test HAVE_IEEE_ARITH - Success
-- Looking for H5_HAVE_FILTER_SZIP
-- Looking for H5_HAVE_FILTER_SZIP - found
-- Looking for H5_HAVE_FILTER_DEFLATE
-- Looking for H5_HAVE_FILTER_DEFLATE - found
-- Looking for H5_HAVE_PARALLEL
-- Looking for H5_HAVE_PARALLEL - not found
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HDF5_C_links
-- Performing Test HDF5_C_links - Success
-- Performing Test HDF5_Fortran_links
-- Performing Test HDF5_Fortran_links - Success
-- Found HDF5: /opt/homebrew/Cellar/hdf5/1.14.2/lib/libhdf5_hl.dylib;/opt/homebrew/Cellar/hdf5/1.14.2/lib/libhdf5.dylib (found version "1.14.2") found components: Fortran
If you look at ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml near the bottom you will probably see errors about unknown linker flags. If that is the case, a generic workaround currently needed by many project since Xcode 15 is:
export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
You need a fresh build directory as LDFLAGS is only considered by CMake on the first project configure.
Hi! When I try to build it on Ubuntu 20.04
via GNU GCC 13.2.0
, I got a same error. Is there a solution? My cmake
version is 3.27.7 and hdf5
version is 1.12.2.
cmake -B build -DCMAKE_PREFIX_PATH=/public/mathlib/hdf5/gcc/1.12.2 -DCMAKE_INSTALL_PREFIX=$HOME/test/111
-- The C compiler identification is GNU 13.2.0
-- The Fortran compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /public/compiler/gcc/13.2.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /public/compiler/gcc/13.2.0/bin/gfortran - skipped
-- h5fortran 4.10.4 CMake 3.27.7 Toolchain
-- Performing Test HAVE_IEEE_ARITH
-- Performing Test HAVE_IEEE_ARITH - Success
-- Looking for H5_HAVE_FILTER_SZIP
-- Looking for H5_HAVE_FILTER_SZIP - not found
-- Looking for H5_HAVE_FILTER_DEFLATE
-- Looking for H5_HAVE_FILTER_DEFLATE - found
-- Looking for H5_HAVE_PARALLEL
-- Looking for H5_HAVE_PARALLEL - not found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.3")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Performing Test HDF5_C_links
-- Performing Test HDF5_C_links - Success
-- Performing Test HDF5_Fortran_links
-- Performing Test HDF5_Fortran_links - Success
-- Found HDF5: /public/mathlib/hdf5/gcc/1.12.2/lib/libhdf5_hl.so;/public/mathlib/hdf5/gcc/1.12.2/lib/libhdf5.so (found version "1.12.2") found components: Fortran
-- Performing Test hdf5_c_types
-- Performing Test hdf5_c_types - Failed
CMake Error at cmake/CheckHDF5.cmake:42 (message):
HDF5 C types failed check
Call Stack (most recent call first):
cmake/CheckHDF5.cmake:96 (check_hdf5_c)
CMakeLists.txt:43 (check_hdf5)
-- Configuring incomplete, errors occurred!
@scivision Thank you, I will check the linker issue. It might be the case, since we had it with some other ports. However, given that Ubuntu is affected, according to the comment above, the problem may be elsewhere.
The error only happens on Sonoma by the way: https://ports.macports.org/port/h5fortran/details Everything else builds fine (well, 10.6–10.7 x86 are broken on buildbots with Clangs, but everything 10.8+ builds – up to Ventura).
4.10.4 still fails.
In my attempt 4.10.3
can be complie with gfortran 13.2.0
, however 4.10.4
can not.
In my attempt
4.10.3
can be complie withgfortran 13.2.0
, however4.10.4
can not.
What error did you get? It worked for me with gcc13 (on 10.6).
The original issue is now RESOLVED for 4.10.4 on Macports. https://trac.macports.org/ticket/68499
"Performing Test hdf5_c_types - Failed"
is not accurate.ld: duplicate LC_RPATH '/opt/local/lib/libgcc' in '/opt/local/lib/libhdf5_fortran.310.dylib'
clang: error: linker command failed with exit code 1
I predict that this problem can also happen on Ventura when updated to Xcode 15, and older HDF5 fortran library builds.
If you are satisfied, please close this ticket.
What happened?
Configure fails on Sonoma. Ventura (also on
aarch64
) seems to be fine: https://build.macports.org/builders/ports-13_arm64-builder/builds/38986/steps/install-port/logs/stdioRelevant log output