ornladios / ADIOS2

Next generation of ADIOS developed in the Exascale Computing Program
https://adios2.readthedocs.io/en/latest/index.html
Apache License 2.0
268 stars 125 forks source link

CMake errors encountered when configuring ADIOS2 with Blosc2 support #4370

Open dqwu opened 3 hours ago

dqwu commented 3 hours ago

This issue is reproducible on ANL Ubuntu (20 or 22) workstations with latest 2.10.1 release.

Configure and build c-blosc2 lib from source (static lib only):

git clone --branch v2.15.0 https://github.com/Blosc/c-blosc2
cd c-blosc2

mkdir build
cd build

cmake -DCMAKE_INSTALL_PREFIX=/scratch/wuda/3rdparty/c-blosc2 -DBUILD_SHARED=OFF ..

make -j4

make install

Configure and build ADIOS2 lib from source, with Blosc2 support

wget https://github.com/ornladios/ADIOS2/archive/refs/tags/v2.10.1.tar.gz

tar zxf v2.10.1.tar.gz
cd ADIOS2-2.10.1

mkdir build
cd build

CC=mpicc CXX=mpicxx FC=mpif90 \
CFLAGS="-g -O2" CPPFLAGS="-g -O2" CXXFLAGS="-g -O2" FCFLAGS="-g -O2" \
Blosc2_DIR=/scratch/wuda/3rdparty/c-blosc2 \
cmake -DCMAKE_INSTALL_PREFIX=/scratch/wuda/3rdparty/adios2 \
-DBUILD_SHARED_LIBS=OFF -DADIOS2_BUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF \
-DADIOS2_USE_Blosc2=ON \
-DADIOS2_USE_BZip2=OFF \
-DADIOS2_USE_ZFP=OFF \
-DADIOS2_USE_SZ=OFF \
-DADIOS2_USE_MGARD=OFF \
-DADIOS2_USE_PNG=OFF \
-DADIOS2_USE_DataMan=OFF \
-DADIOS2_USE_DataSpaces=OFF \
-DADIOS2_USE_MHS=OFF \
-DADIOS2_USE_ZeroMQ=OFF \
-DADIOS2_USE_HDF5=OFF \
-DADIOS2_USE_Python=OFF \
-DADIOS2_USE_Fortran=OFF \
-DADIOS2_USE_Profiling=OFF \
..

make -j4

make install

CMake errors encountered:

CMake Error at cmake/DetectOptions.cmake:97 (add_library):
  add_library cannot create ALIAS target "adios2_blosc2" because target
  "Blosc2::blosc2_static" is imported but not globally visible.
Call Stack (most recent call first):
  CMakeLists.txt:194 (include)
dqwu commented 3 hours ago

Same CMake errors when we add the installation prefix of "Blosc2" to CMAKE_PREFIX_PATH: -DCMAKE_PREFIX_PATH="/scratch/wuda/3rdparty/c-blosc2" \

dqwu commented 2 hours ago

For ADIOS2 2.9.2 release, CMake errors are encountered during "make install" step instead:

...
-- Found Blosc2: /scratch/wuda/3rdparty/c-blosc2/lib/libblosc2.a (found version "2.15.0") 
-- Found atl: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/atl-config.cmake (found suitable version "2.2.1", minimum required is "2.2.1") 
-- Found atl: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/atl-config.cmake (found version "2.2.1") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'libffi'
--   Found libffi, version 3.3
-- Found LibFFI: ffi  
-- Found dill: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/dill-config.cmake (found version "2.4.1") 
-- Found ffs: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/ffs-config.cmake (found suitable version "2.0.0", minimum required is "2.0.0") 
-- Found dill: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/dill-config.cmake (found suitable version "2.4.1", minimum required is "2.4.1") 
-- Found enet: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/enet-config.cmake (found suitable version "1.3.14", minimum required is "1.3.14") 
-- Found EVPath: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/thirdparty/EVPathConfigCommon.cmake (found version "4.5.0") 
-- Found adios2: /scratch/wuda/3rdparty/adios2/lib/cmake/adios2/adios2-config.cmake (found version "2.9.2") found components: C CXX MPI 
-- Configuring done
CMake Error at CMakeLists.txt:21 (add_executable):
  Target "serial_with_CXX" links to target "Blosc2::blosc2_static" 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:46 (add_executable):
  Target "mpi_with_CXX" links to target "Blosc2::blosc2_static" 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:16 (add_executable):
  Target "serial_with_C" links to target "Blosc2::blosc2_static" 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:40 (add_executable):
  Target "mpi_with_C" links to target "Blosc2::blosc2_static" 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:52 (include)

make: *** [Makefile:86: install] Error 1