Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pugixml can't be found #4081

Closed
waarmond opened this issue Mar 8, 2024 · 13 comments
Closed

pugixml can't be found #4081

waarmond opened this issue Mar 8, 2024 · 13 comments

Comments

@waarmond
Copy link

waarmond commented Mar 8, 2024

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
@eisenhauer
Copy link
Member

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...

@waarmond
Copy link
Author

waarmond commented Mar 8, 2024

Do you mean a config.log? I couldn't find one, but here is the shell output on Pastebin.

@eisenhauer
Copy link
Member

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?

@lahwaacz
Copy link
Contributor

lahwaacz commented Mar 9, 2024

adios2 is already packaged for Arch Linux and it links to system pugixml with no problems, as far as I can tell 🤷

@waarmond
Copy link
Author

waarmond commented Mar 9, 2024

@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?

@eisenhauer
Copy link
Member

@vicentebolea ?

@vicentebolea
Copy link
Collaborator

@waarmond thanks for sharing this with us.

Can you share your cmakecache.txt, if you do not have it, what is the pugixml version.

@chenrui333
Copy link

chenrui333 commented Apr 4, 2024

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.

@chenrui333
Copy link

2.9.2 worked well for homebrew builds before (including py3.12 build migration), the gcc 13.2.0 was used for both builds.

@cho-m
Copy link

cho-m commented Apr 4, 2024

2.10.0 issue was probably introduced in dd432c1

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 dd432c1 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

@vicentebolea
Copy link
Collaborator

vicentebolea commented Apr 4, 2024

@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?

@vicentebolea
Copy link
Collaborator

#4135

@vicentebolea
Copy link
Collaborator

I believe that this was fixed at #4135, closing this please re-open if you still have the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants