-
Notifications
You must be signed in to change notification settings - Fork 30
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 building OGRE / OGRE2 from source in colcon workspace #174
Conversation
…source installation in the colcon workspace Signed-off-by: Ian Chen <[email protected]>
@darksylinc can you give this a try? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with ign-rendering6
(Fortress). When using the ign-cmake2
branch, I saw the following build warning:
CMake Warning at /ogre_source_ws/install/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:53 (message):
CONFIGURATION WARNINGS:
-- Skipping component [ogre]: Missing dependency [IgnOGRE] (Components: RTShaderSystem, Terrain, Overlay).
^~~~~ Set SKIP_ogre=true in cmake to suppress this warning.
When I used the branch in this PR, the warning disappeared, so I believe that this resolves the issue for me.
On a related note, I was looking over the FindIgnOGRE.cmake
file, and believe there may be an issue with the following code block: https://github.com/ignitionrobotics/ign-cmake/blob/f559887e98a2ced7bb89606cb3cfcba4be098ff5/cmake/FindIgnOGRE.cmake#L67-L74
I believe that line 72 should be the following instead (notice how the quotes are removed from _pkgconfig_invoke_result
so that we can get the value of this variable):
elseif (NOT _pkgconfig_invoke_result STREQUAL "")
Is this a correct assumption? If so, should we make this fix in this PR as well?
Signed-off-by: Ian Chen <[email protected]>
good catch. I've removed the quotes. 3969bcc |
Signed-off-by: Ian Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this since it appears to resolve the build warnings for me, but maybe we can get confirmation from at least one other person before merging.
I'm afraid it's worse now. Colcon won't complain (ok it does because it doesn't find libOgreHlmsPbs_d and libOgreHlmsUnlit_d.so) but now workarounding the bugs won't fix anything. Colcon just refuses to install libignition-rendering-ogre2 but says everything is fine. A couple notes: I'm building with I'm patching ign-rendering with this so that Debug builds and runs ok:
and only have Another thing I noticed is that some of the paths were wrong:
I will now try a non-debug build to see if that works. Update: Release build worked fine! Update 2: The following patch fixed Debug for me (on top of your PR):
The _d files must come first or else 1.9's system libOgreOverlay will take precedence over 2.1's libOgreOverlay_d PS I suspect what prevented my workarounds from working anymore is: |
Btw just add the suggested patch in #174 (comment) and it would be good to go |
Signed-off-by: Ian Chen <[email protected]>
applied patch in ca041f9, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New patch seems good to me, thanks @darksylinc!
) * add logic to find ogre and its components when there is also another source installation in the colcon workspace Signed-off-by: Ian Chen <[email protected]> * set ogre var to empty string, fix pkg result check, typo Signed-off-by: Ian Chen <[email protected]> * add comment about unsetting ogre var Signed-off-by: Ian Chen <[email protected]> * find lib with _d suffix Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen [email protected]
🦟 Bug fix
Summary
Problem: When building ogre2 in a colcon workspace, we ran into an error about not finding an ogre 1.x component. The problem is the cmake module for ogre 1.x is looking into the ogre2 source directory in the colcon workspace instead of the system installed one.
I also had to fix the values returned by the
OGRE_LIBRARIES
variable. It needs to be the full path to the library. We are actually doing something similar ogre2 cmake module and also in the logic for ogre 1.x on windows. Not sure why the issue only surfaced in the colcon workspace setup mentioned above.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge