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

Fix configuration with GZ_ENABLE_RELOCATABLE_INSTALL=ON #1071

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Sep 29, 2024

🦟 Bug fix

Summary

When GZ_ENABLE_RELOCATABLE_INSTALL is ON, the project that uses gz_add_get_install_prefix_impl needs to call gz_find_package(DL REQUIRED) . For some reason, this was not added in https://github.com/gazebosim/gz-rendering/pull/804/files, but everything was working fine for some reason. However, I tried to ocmpile gz-rendering9 on conda-forge, and know the build is failing with:

-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
CMake Error at /home/conda/feedstock_root/build_artifacts/gz-rendering9_1727635675214/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/share/cmake/gz-cmake4/cmake4/GzRelocatableBinaries.cmake:97 (message):
  gz_add_get_install_prefix_impl called without DL_TARGET defined,

  please add gz_find_package(DL) if you want to use
  gz_add_get_install_prefix_impl.
Call Stack (most recent call first):
  src/CMakeLists.txt:18 (gz_add_get_install_prefix_impl)


-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/conda_build/build.py", line 1785, in bundle_conda
    utils.check_call_env(
  File "/opt/conda/lib/python3.10/site-packages/conda_build/utils.py", line 404, in check_call_env
    return _func_defaulting_env_to_os_environ("call", *popenargs, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/conda_build/utils.py", line 380, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/usr/bin/bash', '-e', '/home/conda/feedstock_root/build_artifacts/gz-rendering9_1727635675214/work/build_cxx.sh']' returned non-zero exit status 1.

See conda-forge/gz-rendering-feedstock#30 (comment) . I guess this PR should fix this problem.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

By adding the missing DL dependency

Signed-off-by: Silvio Traversaro <[email protected]>
@traversaro traversaro requested a review from iche033 as a code owner September 29, 2024 19:02
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Sep 29, 2024
@traversaro traversaro changed the title Fix installation with GZ_ENABLE_RELOCATABLE_INSTALL=ON Fix configuration with GZ_ENABLE_RELOCATABLE_INSTALL=ON Sep 29, 2024
@iche033 iche033 merged commit a9af984 into gazebosim:gz-rendering9 Sep 30, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants