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 debug builds of gz-rendering-ogre2 plugin #1014

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jul 3, 2024

🦟 Bug fix

Summary

The ogre2 plugin fails to load in gz-sim when gz-rendering is built in Debug mode. The following error message is emitted:

Error while loading the library [....lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so]: ....lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so: undefined symbol: _ZThn1008_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE

This is because we set DEBUG=1 and _DEBUG=1 on the ogre2 target which seem to change the ABI of the generated library. These defines should really be set if Ogre2 itself is built in debug mode, so this PR simply comments out the CMake command that adds those defines.

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.

The ogre2 plugin fails to load in gz-sim when gz-rendering
is built in Debug mode. The following error message is emitted:
```
Error while loading the library [....lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so]: ....lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so: undefined symbol: _ZThn1008_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE
```

This is because we set `DEBUG=1` and `_DEBUG=1`
on the ogre2 target which seem to change the ABI of the generated
library. These defines should really be set if Ogre2 itself is built in
debug mode, so this PR simply comments out the CMake command that adds
those defines.

Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey requested a review from iche033 as a code owner July 3, 2024 04:42
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Jul 3, 2024
@azeey
Copy link
Contributor Author

azeey commented Jul 3, 2024

cc @athenaz2

@iche033 iche033 merged commit a7cf4f0 into gazebosim:gz-rendering8 Jul 3, 2024
9 of 10 checks passed
@azeey azeey deleted the fix_debug_build branch July 3, 2024 15:26
athenaz2 pushed a commit to athenaz2/gz-rendering that referenced this pull request Jul 25, 2024
The ogre2 plugin fails to load in gz-sim when gz-rendering
is built in Debug mode. The following error message is emitted:
```
Error while loading the library [....lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so]: ....lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so: undefined symbol: _ZThn1008_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE
```

This is because we set `DEBUG=1` and `_DEBUG=1`
on the ogre2 target which seem to change the ABI of the generated
library. These defines should really be set if Ogre2 itself is built in
debug mode, so this PR simply comments out the CMake command that adds
those defines.

Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Athena Z <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants