ADIOS 2.5.0: Static Build Issues Linking Blosc
Created by: ax3l
I am building a static version of ADIOS2 2.5.0 against a static version of C-Blosc 1.15.0 for a PyPI release of openPMD-api with the following CMake flags:
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DADIOS2_BUILD_EXAMPLES=OFF
-DADIOS2_BUILD_TESTING=OFF
with results in the config
ADIOS2 build configuration:
ADIOS Version: 2.5.0
C++ Compiler : GNU 8.3.1
/opt/rh/devtoolset-8/root/usr/bin/c++
Fortran Compiler : GNU 8.3.1
/opt/rh/devtoolset-8/root/usr/bin/gfortran
Installation prefix: /usr
bin: bin
lib: lib64
include: include
cmake: lib64/cmake/adios2
Features:
Library Type: static (with PIC)
Build Type: Release
Testing: OFF
Examples: OFF
Build Options:
Blosc : ON
BZip2 : OFF
ZFP : OFF
SZ : OFF
MGARD : OFF
PNG : OFF
MPI : OFF
DataMan : OFF
Table : OFF
SSC : OFF
SST : ON
DataSpaces: OFF
ZeroMQ : OFF
HDF5 : ON
Python : OFF
Fortran : ON
SysVShMem: ON
Profiling: OFF
Endian_Reverse: OFF
RDMA Transport for Staging: Unconfigured
-- Configuring done
-- Generating done
Just or the record, this is the Docker environment I am building in.
ADIOS2 builds the library, but fails in the adios-config
step with:
Configuring adios2-config dummy CMake project
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Check for working C compiler: /opt/rh/devtoolset-8/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-8/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/rh/devtoolset-8/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-8/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 8.3.1
-- Check for working Fortran compiler: /opt/rh/devtoolset-8/root/usr/bin/gfortran
-- Check for working Fortran compiler: /opt/rh/devtoolset-8/root/usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /opt/rh/devtoolset-8/root/usr/bin/gfortran supports Fortran 90
-- Checking whether /opt/rh/devtoolset-8/root/usr/bin/gfortran supports Fortran 90 -- yes
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/lib/libhdf5.a;/usr/lib64/librt.so;/usr/lib64/libdl.so;/usr/lib64/libm.so (found version "1.10.5") found components: C
-- Found atl: /usr/lib64/cmake/adios2/thirdparty/atl-config.cmake (found suitable version "2.2.1", minimum required is "2.2.1")
-- Found atl: /usr/lib64/cmake/adios2/thirdparty/atl-config.cmake (found version "2.2.1")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- Checking for module 'libffi'
-- Found libffi, version 3.0.5
-- Found LibFFI: -lffi
-- Found dill: /usr/lib64/cmake/adios2/thirdparty/dill-config.cmake (found version "2.4.0")
-- Found ffs: /usr/lib64/cmake/adios2/thirdparty/ffs-config.cmake (found suitable version "1.6.0", minimum required is "1.6.0")
-- Found dill: /usr/lib64/cmake/adios2/thirdparty/dill-config.cmake (found suitable version "2.4.0", minimum required is "2.4.0")
-- Found enet: /usr/lib64/cmake/adios2/thirdparty/enet-config.cmake (found suitable version "1.3.14", minimum required is "1.3.14")
-- Found EVPath: /usr/lib64/cmake/adios2/thirdparty/EVPathConfigCommon.cmake (found version "4.4.0")
-- Found adios2: /usr/lib64/cmake/adios2/adios2-config.cmake (found version "2.5.0")
-- Configuring done
CMake Error at CMakeLists.txt:12 (add_executable):
Target "with_C" links to target "Blosc::Blosc" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:24 (add_executable):
Target "with_Fortran" links to target "Blosc::Blosc" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:14 (add_executable):
Target "with_CXX" links to target "Blosc::Blosc" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Failed
CMake Error at cmake/install/post/cmake_install.cmake:44 (message):
generate-adios2-config.sh returned 1, should be 0
Call Stack (most recent call first):
cmake_install.cmake:51 (include)
make: *** [install] Error 1
I can skip this step with -DADIOS2_INSTALL_GENERATE_CONFIG=OFF
but this only transitions the problem downstream to my build of openPMD-api.
It it possible some dependencies or really just an alias are missing from the CMake targets?