ADIOS2
ADIOS2 copied to clipboard
Build breaks with cmake-3.24.0: install into a stage directory is broken
Describe the bug After cmake was upgraded from 3.23.3 to 3.24.0 adios2-2.8.3 now breaks:
-- Found adios2: /wrkdirs/usr/ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-config.cmake (found version "2.8.3") found components: C CXX MPI
CMake Error at CMakeLists.txt:9 (find_package):
Found package configuration file:
/wrkdirs/usr/ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-config.cmake
but it set adios2_FOUND to FALSE so package "adios2" is considered to be
NOT FOUND. Reason given by package:
The following imported targets are referenced, but are missing: ffs::ffs
clang-14 OS: FreeBSD 13.1
@yurivict there is a configure error with ZFP in the log txt that you attached, can you try to address this by ADIOS2_USE_ZFP=OFF and try to reproduce this error
I just reproduced this error
We have ZFP in a package:
zfp-1.0.0 High throughput library for compressed floating-point arrays
Why not use the external ZFP package instead?
We have ZFP in a package:
zfp-1.0.0 High throughput library for compressed floating-point arrays
Why not use the external ZFP package instead?
Nevermind, the ZFP was unrelated.
The current master branch still fails with cmake-3.24.0:
CMake Error at CMakeLists.txt:9 (find_package):
By not providing "Findadios2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "adios2", but
CMake did not find one.
Could not find a package configuration file provided by "adios2" with any
of the following names:
adios2Config.cmake
adios2-config.cmake
Add the installation prefix of "adios2" to CMAKE_PREFIX_PATH or set
"adios2_DIR" to a directory containing one of the above files. If "adios2"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/tmp/tmp.Rf5mJBXG/CMakeFiles/CMakeOutput.log".
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:53 (include)
@yurivict
@yurivict we seem to have resolved this issue for Linux/Mac in the last PR. We do not have a FreeBSD machine to test this, so there is little we can do about it.
One thing could be: whats your bash version?
bash-5.1.16
Could you add set -x in a line after the shebang in cmake/install/post/generate-adios2-config.sh.in, reconfigure and post the output of cmake --install here?
-- Installing: /disk-samsung/freebsd-ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-config-version.cmake
-- Installing: /disk-samsung/freebsd-ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-config-common.cmake
-- Installing: /disk-samsung/freebsd-ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-targets.cmake
-- Installing: /disk-samsung/freebsd-ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-targets-release.cmake
-- Installing: /disk-samsung/freebsd-ports/misc/adios2/work/stage/usr/local/lib/cmake/adios2/adios2-config.cmake
+ unset MAKEFLAGS
+ unset MAKE
+ PREFIX=/usr/local
+ '[' / '!=' / ']'
+ shift
+ CMAKE=/usr/local/bin/cmake
+ SOURCE_DIR=/disk-samsung/freebsd-ports/misc/adios2/work/ADIOS2-91207a2fb/cmake/install/post/adios2-config-dummy
++ mktemp -d
+ BUILD_DIR=/tmp/tmp.9xUqBz3Q
+ pushd /tmp/tmp.9xUqBz3Q
+ '[' 1 -eq 1 ']'
+ export CC=/usr/local/bin/mpicc
+ CC=/usr/local/bin/mpicc
+ '[' 1 -eq 1 ']'
+ export CXX=/usr/local/bin/mpicxx
+ CXX=/usr/local/bin/mpicxx
+ '[' 1 -eq 1 ']'
+ export FC=/usr/local/bin/mpif90
+ FC=/usr/local/bin/mpif90
+ export adios2_DIR=/usr/local/lib/cmake/adios2
+ adios2_DIR=/usr/local/lib/cmake/adios2
+ '[' -n '' ']'
+ echo 'Configuring adios2-config dummy CMake project'
+ /usr/local/bin/cmake -G 'Unix Makefiles' /disk-samsung/freebsd-ports/misc/adios2/work/ADIOS2-91207a2fb/cmake/install/post/adios2-config-dummy
/tmp/tmp.9xUqBz3Q ~/.build
Configuring adios2-config dummy CMake project
-- The C compiler identification is Clang 14.0.5
-- The CXX compiler identification is Clang 14.0.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/bin/mpicc - 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/local/bin/mpicxx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:9 (find_package):
By not providing "Findadios2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "adios2", but
CMake did not find one.
Could not find a package configuration file provided by "adios2" with any
of the following names:
adios2Config.cmake
adios2-config.cmake
Add the installation prefix of "adios2" to CMAKE_PREFIX_PATH or set
"adios2_DIR" to a directory containing one of the above files. If "adios2"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/tmp/tmp.9xUqBz3Q/CMakeFiles/CMakeOutput.log".
+ echo Failed
Failed
+ exit 1
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:53 (include)
is there a adios2-config.cmake file in /usr/local/lib/cmake/adios2?
oh I see the issue:
You installed ADIOS2 in /disk-samsung/freebsd-ports/misc/adios2/work/stage/usr/local however adios2_DIR was seted to /usr/local. can you try to cmake --install with an absolute path?
In the ports framework the package has to be installed into a stage directory.
@yurivict can you try with the latest master.
2.9.0 still has this problem.
Why is adios2-config dummy configured after install? Is this intended?
In order for the package to be found after the 'install' target the stage directory should be added to cmake's search path.
In its current form ADIOS2 is broken when stage directory is used.
Why is adios2-config dummy configured after install? Is this intended?
@yurivict The adios2-config is a script that is only used to help using ADIOS from a non CMAKE project, its generated after install and it also during its generation it builds a dummy project to test that it works. You do not need this if you intend to use ADIOS from a cmake project.
You can disable this component with: -DADIOS2_INSTALL_GENERATE_CONFIG=OFF
Initial error might have been resolved in https://github.com/ornladios/ADIOS2/pull/3760
Closing this since we cannot reproduce this error. Please re-open if you encounter this error again.