ADIOS2: macOS Cross-Compile `release_29`: `ffs::ffs` missing in `adios2-config.cmake`

I am trying to build release_29 due to the many patches that are needed to get our all-static dependency wheels to build.

I am currently blocked by:

...
    -- Found ADIOS2: /usr/local/lib/cmake/adios2/adios2-config.cmake (found suitable version "2.9.0", minimum required is "2.7.0") found components: C CXX
    CMake Error at CMakeLists.txt:444 (find_package):
      Found package configuration file:
  
        /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

https://github.com/openPMD/openPMD-api/pull/1387

when cross-compiling for macOS arm64 (from x86).

cc @vicentebolea @eisenhauer

Note that ADIOS2 itself builds & installs fine, it is the installed adios2-config.cmake package that seems to forget to define one of the used targets.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

The issue happens because EVPATH dependency gets properly exported when using SST, however, even without SST we use ffs which gets exposed through EVPATH. @ax3l the workaround should be to enable SST or disable BP5.

Things to do:

  • Properly export ffs in adios2-config when SST is disabled.

@ax3l can you also run the --trace-expand for the configuration of Adios2, this might bring some light on why this is happening

I have found the culprit but not the reason of this happening.

Looking at the trace, /usr/local/lib/cmake/adios2/adios2-config.cmake(7) should be if (NOT OFF) since the OFF is ADIOS2_USE_EXTERNAL_EVPATH, however it is for some reason undef.


2023-07-27T01:15:15.9040940Z 
2023-07-27T01:15:15.9041520Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(3):  set(_ADIOS2_CMAKE_MODULE_PATH /Users/runner/work/openPMD-api/openPMD-api/src/share/openPMD/cmake )
2023-07-27T01:15:15.9042260Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(4):  list(INSERT CMAKE_MODULE_PATH 0 /usr/local/lib/cmake/adios2 )
2023-07-27T01:15:15.9042820Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(6):  if(NOT OFF )
2023-07-27T01:15:15.9043330Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(7):  if(NOT )
2023-07-27T01:15:15.9043840Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(11):  if(NOT OFF )
2023-07-27T01:15:15.9044440Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(12):  set(atl_DIR /usr/local/lib/cmake/adios2/thirdparty )
2023-07-27T01:15:15.9045010Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(15):  if(NOT OFF )
2023-07-27T01:15:15.9045620Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(16):  set(dill_DIR /usr/local/lib/cmake/adios2/thirdparty )
2023-07-27T01:15:15.9046510Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(19):  if(NOT OFF )
2023-07-27T01:15:15.9047120Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(20):  set(ffs_DIR /usr/local/lib/cmake/adios2/thirdparty )
2023-07-27T01:15:15.9047680Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(23):  if(NOT OFF )
2023-07-27T01:15:15.9048280Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(24):  set(enet_DIR /usr/local/lib/cmake/adios2/thirdparty )
2023-07-27T01:15:15.9048960Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(28):  set(ADIOS2_CONFIG /usr/local/lib/cmake/adios2/adios2-config.cmake )
2023-07-27T01:15:15.9049670Z   /usr/local/lib/cmake/adios2/adios2-config.cmake(29):  include(/usr/local/lib/cmake/adios2/adios2-config-common.cmake )

Here is the source file of adios2-config.cmake:

if(NOT @BUILD_SHARED_LIBS@)
  if(NOT @ADIOS2_USE_EXTERNAL_EVPATH@)
    set(EVPath_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty)
  endif()

  if(NOT @ADIOS2_USE_EXTERNAL_ATL@)
    set(atl_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty)
  endif()

  if(NOT @ADIOS2_USE_EXTERNAL_DILL@)
    set(dill_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty)
  endif()

  if(NOT @ADIOS2_USE_EXTERNAL_FFS@)
    set(ffs_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty)
  endif()

  if(NOT @ADIOS2_USE_EXTERNAL_ENET@)
    set(enet_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty)
  endif()
endif()

It is located at cmake/adios2-config-install.cmake.in. we need set(EVPath_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty) since later it will find_dependency(EVPATH) which will load all the other (ffs, atl, dill, enet) thirdparty cmake config files

Note that this is only happening with static build

Side question: FFS is a mandatory ADIOS2 dependency or can it be disabled? (I did not find an option for it.)

The options to disable it are indirect. It is required both for SST and for BP5. If you disable both of those FFS will not be built. (But BP5 is now the default file format. If you disable it there are some tests that won’t pass, functionality will be lost, etc.)

I see is it possible to configure openpmd with --trace-expand and write the the output. I have seen this error before and as I recall it was something to do with ADIOS2_DIR must be specified as a env variable rather than a cmake flag.

@ax3l thanks for reporting. Can i get the full configure/build output.