ADIOS2
ADIOS2 copied to clipboard
pugixml can't be found
I'm trying since severals month to overcome the missing pugixml. The error occurs on both current git and 2.9.2 Since I'm on ArchLinux I would prefer to use system libs.
Describe the bug
CMake Error at source/adios2/toolkit/remote/CMakeLists.txt:12 (get_property):
get_property could not find TARGET pugixml. Perhaps it has not yet been
created.
To Reproduce
cmake -B build -S ADIOS2 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=ON \
-DADIOS2_USE_EXTERNAL_DEPENDENCIES=ON \
-DADIOS2_HAVE_HDF5_VOL=OFF \
-DADIOS2_BUILD_EXAMPLES=OFF
Expected behavior configure, make, make install
Desktop (please complete the following information):
- OS/Platform: ArchLinux
- Build: gcc 13.2.1
Interesting... Obviously a CMake issue, but not having a handy ArchLinux platform sitting around, we're unlikely to be able to duplicate it (nor do we regularly test the use of external rather than supplied packages.). Perhaps if you included the output of CMake? That would let us know if it actually found a system pugixml...
Do you mean a config.log? I couldn't find one, but here is the shell output on Pastebin.
Probably needs to be looked at by our CMake people. Are you looking at this because you want to use ADIOS or are you packaging?
adios2 is already packaged for Arch Linux and it links to system pugixml with no problems, as far as I can tell :shrug:
@lahwaacz PS: I've just noticed that you are the actual packager. I'm (terribly!) sorry for leaving the path of vanilla ArchLinux. May you be so kind and try a build with current git sources?
@vicentebolea ?
@waarmond thanks for sharing this with us.
Can you share your cmakecache.txt, if you do not have it, what is the pugixml version.
I am seeing the same while bumping adios2 to 2.10.0
CMake Error at source/adios2/toolkit/remote/CMakeLists.txt:12 (get_property):
get_property could not find TARGET pugixml. Perhaps it has not yet been
created.
-- Looking for rdma/fi_ext_gni.h
-- Looking for rdma/fi_ext_gni.h - not found
CMake Error at source/utils/CMakeLists.txt:18 (get_property):
get_property could not find TARGET pugixml. Perhaps it has not yet been
created.
- https://github.com/Homebrew/homebrew-core/pull/167957
- build: gcc 13.2.0
2.9.2 worked well for homebrew builds before (including py3.12 build migration), the gcc 13.2.0 was used for both builds.
2.10.0 issue was probably introduced in https://github.com/ornladios/ADIOS2/commit/dd432c15899040aee549b1c91849b0c18a482127
From quick glance, external pugixml target doesn't seem to be available in that scope (subdir thirdparty/ vs source/...). Snippet of pugixml-config.cmake:
if (NOT TARGET pugixml AND (NOT DEFINED PACKAGE_FIND_VERSION OR PACKAGE_FIND_VERSION VERSION_LESS "1.11"))
add_library(pugixml INTERFACE IMPORTED)
# Equivalent to target_link_libraries INTERFACE, but compatible with CMake 3.10
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES pugixml::pugixml)
endif ()
I don't know what is recommended way, but some things that work are extending scope find_package(pugixml CONFIG GLOBAL) or using the other target adios2::thirdparty::pugixml which is GLOBAL.
EDIT: Looks like other changes in https://github.com/ornladios/ADIOS2/commit/dd432c15899040aee549b1c91849b0c18a482127 are also problematic. Even if you fix CMake scoping, build will fail when linking, e.g.
[ 82%] Linking CXX executable ../../bin/bpls
cd /tmp/adios2-20240404-72380-x9l9xf/ADIOS2-2.10.0/build/source/utils && /opt/homebrew/Cellar/cmake/3.29.1/bin/cmake -E cmake_link_script CMakeFiles/bpls.dir/link.txt --verbose=1
/opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/bpls.dir/bpls/bpls.cpp.o -o ../../bin/bpls ../../lib/libadios2_core.2.10.0.dylib
Undefined symbols for architecture arm64:
"pugi::xml_document::load_buffer(void const*, unsigned long, unsigned int, pugi::xml_encoding)", referenced from:
adios2::utils::print_data_xml(char const*, unsigned long) in bpls.cpp.o
@cho-m thanks for the hints. It seems that to be a typo from our side, we must use the target adios2::thirdparty::pugixml within the adios2 source code. Can you try to replace pugixml to adios2::thirdparty::pugixml in source/adios2/toolkit/remote/CMakeLists.txt:12 and check that it configures and builds?
https://github.com/ornladios/ADIOS2/pull/4135
I believe that this was fixed at #4135, closing this please re-open if you still have the issue.