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

CI Failure April 2024 #78

Closed
traversaro opened this issue Apr 9, 2024 · 4 comments
Closed

CI Failure April 2024 #78

traversaro opened this issue Apr 9, 2024 · 4 comments
Assignees

Comments

@traversaro
Copy link
Collaborator

Message failure:

CMake Warning at /home/runner/work/matio-cpp/matio-cpp/install/lib/cmake/matioCpp/matioCppConfig.cmake:24 (find_package):
  By not providing "FindMATIO.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "MATIO", but
  CMake did not find one.

  Could not find a package configuration file provided by "MATIO" with any of
  the following names:

    MATIOConfig.cmake
    matio-config.cmake

  Add the installation prefix of "MATIO" to CMAKE_PREFIX_PATH or set
  "MATIO_DIR" to a directory containing one of the above files.  If "MATIO"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:4 (find_package)


-- Configuring done (0.2s)
CMake Error at /home/runner/work/matio-cpp/matio-cpp/install/lib/cmake/matioCpp/matioCppTargets.cmake:61 (set_target_properties):
-- Generating done (0.0s)
  The link interface of target "matioCpp::matioCpp" contains:

    MATIO::MATIO

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/runner/work/matio-cpp/matio-cpp/install/lib/cmake/matioCpp/matioCppConfig.cmake:33 (include)
  CMakeLists.txt:4 (find_package)


CMake Generate step failed.  Build files cannot be regenerated correctly.

see #77 .

Originally found by @Nicogene .

@traversaro
Copy link
Collaborator Author

I guess we can start porting the changes in ami-iit/bipedal-locomotion-framework#827 here, as anyhow they are needed to avoid similar bugs.

@traversaro
Copy link
Collaborator Author

This is not fixed by #79 .

@traversaro
Copy link
Collaborator Author

traversaro commented Apr 9, 2024

It seems that this is some kind of regression related to https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9390, that got release in cmake 3.29.1 . In conda CI the workaround is to pin cmake 3.29.0, in apt GitHub Actions builds probably we need to remove the custom cmake installed by GitHub Actions images to use the one from apt (or just use docker images).

traversaro added a commit that referenced this issue Apr 9, 2024
…ke >=3.29.1

OVERRIDE_MODULE_PATH used the PACKAGE_PREFIX_DIR variable, that however was
an internal undocumented detail of configure_package_config_file and that was
changed in CMake 3.29.1 by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9390 .

See #78 (comment) for more context.

To fix the problem, we switch to add directly the OVERRIDE_MODULE_PATH logic in the generated
cmake config template, so that there we can use the @PACKAGE_CMAKE_INSTALL_PREFIX@ variable,
and rely on the configure_package_config_file to appropriately substitute @PACKAGE_CMAKE_INSTALL_PREFIX@
with the actual relocated install prefix. To do so, we also pass CMAKE_INSTALL_PREFIX to the
PATH_VARS option of configure_package_config_file.
@traversaro
Copy link
Collaborator Author

It seems that this is some kind of regression related to https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9390, that got release in cmake 3.29.1 . In conda CI the workaround is to pin cmake 3.29.0, in apt GitHub Actions builds probably we need to remove the custom cmake installed by GitHub Actions images to use the one from apt (or just use docker images).

Actually the problem was in the InstallBasicPackageFiles module, in particular the variant with the OVERRIDE_MODULE_PATH option used here and in BLF, that used some CMake functionality that was an implementation detail. This was fixed in #79 and released in https:/ami-iit/matio-cpp/releases/tag/v0.2.4 .

traversaro added a commit to traversaro/bipedal-locomotion-framework that referenced this issue Apr 9, 2024
OVERRIDE_MODULE_PATH used the PACKAGE_PREFIX_DIR variable, that however was
an internal undocumented detail of configure_package_config_file and that was
changed in CMake 3.29.1 by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9390 .

See ami-iit/matio-cpp#78 (comment) for more context.

To fix the problem, we switch to add directly the OVERRIDE_MODULE_PATH logic in the generated
cmake config template, so that there we can use the @PACKAGE_CMAKE_INSTALL_PREFIX@ variable,
and rely on the configure_package_config_file to appropriately substitute @PACKAGE_CMAKE_INSTALL_PREFIX@
with the actual relocated install prefix. To do so, we also pass CMAKE_INSTALL_PREFIX to the
PATH_VARS option of configure_package_config_file.
GiulioRomualdi pushed a commit to ami-iit/bipedal-locomotion-framework that referenced this issue Apr 9, 2024
#835)

OVERRIDE_MODULE_PATH used the PACKAGE_PREFIX_DIR variable, that however was
an internal undocumented detail of configure_package_config_file and that was
changed in CMake 3.29.1 by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9390 .

See ami-iit/matio-cpp#78 (comment) for more context.

To fix the problem, we switch to add directly the OVERRIDE_MODULE_PATH logic in the generated
cmake config template, so that there we can use the @PACKAGE_CMAKE_INSTALL_PREFIX@ variable,
and rely on the configure_package_config_file to appropriately substitute @PACKAGE_CMAKE_INSTALL_PREFIX@
with the actual relocated install prefix. To do so, we also pass CMAKE_INSTALL_PREFIX to the
PATH_VARS option of configure_package_config_file.
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

2 participants