Public bug reported:

Revision bump for current ogre on Noble
 - Tested on PPA with version:  ogre-next - 
2.3.3+dfsg-6~202404240955~ubuntu24.04.1
    https://launchpad.net/~j-rivero/+archive/ubuntu/ogre-next-recipe/+packages
 - MR: 
https://code.launchpad.net/~j-rivero/ubuntu/+source/ogre-next/+git/ogre-next-2/+merge/464934

The latest bump in ogre-next for 2.3.3+dfsg-0ubuntu2 version came with an 
addition in d/rules
of: -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -DDEBUG=0 -D_DEBUG=0". See 
https://git.launchpad.net/
ubuntu/+source/ogre-next/tree/debian/rules#n15. That is generating incompatible 
ABIs if the
same set of flags is not used in third party software. Specially difficult to 
detect since the problems will appear in the loading of the OGRE plugins not 
during the building. See the full justification for the long story:

[Justification]

For the current version 2.3.3+dfsg-0ubuntu2 the build process, the test
suite and the autopkgtest did not detect any problem in the build or run
of the different OGRE components.

However when we (Gazebo simulator team) used the library to build our 
gazebo-rendering library we found problems with missing symbols at runtime when 
trying to load plugins.
"""
/ws/harmonic/install_noble/gz-rendering8/lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so:
 undefined symbol: 
_ZThn944_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE
"""

If we demangle that symbol the "T non-virtual thunk to
Ogre::HlmsPbs::_changeRenderSystem(Ogre::RenderSystem*)" appears and
that method do exists o the current OGRE version. The problem is that
the ABI symbol has a different offset after _ZThn: instead of 944 it has
1008. So the symbol is not the same for the loader:

 1. _ZThn944_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE  (in 
gz-rendering)
 2. _ZThn1008_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE (in 
2.3.3+dfsg-0ubuntu2)

It is hard to know where this difference in the offset is coming from
but I was able to track the problem to the use of -DDEBUG=0 -D_DEBUG=0
in debian/rules added for the 2.3.3 version bump with respect to jammy
2.2.5. Removing it, solves the offset difference.

[Updating details]

The MR linked to the bug just remove the custom NDEBUG flags added to
d/rules. ogre-next does not have any reverse dependency at this moment
in Ubuntu.

[Testing done]

Using the packages generated with the proposed change keeps the package
building in all arches, passing the autopkgtest and allow use to run the
Gazebo Simulator with the OGRE-Next libraries for the first time in
Noble.

With current 2.3.3+dfsg-0ubuntu2:
--------- 8 -------------------------------------------
[GUI] [Msg] Loading plugin [gz-rendering-ogre2]
Error while loading the library 
[/usr/local/google/home/addisuzt/ws/harmonic/install_noble/gz-rendering8/lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so]:
 
/usr/local/google/home/addisuzt/ws/harmonic/install_noble/gz-rendering8/lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so:
 undefined symbol: 
_ZThn944_N4Ogre7HlmsPbs19_changeRenderSystemEPNS_12RenderSystemE
[GUI] [Err] [RenderEngineManager.cc:501] Failed to load plugin 
[gz-rendering-ogre2] : couldn't load library on path 
[/usr/local/google/home/addisuzt/ws/harmonic/install_noble/gz-rendering8/lib/gz-rendering-8/engine-plugins/libgz-rendering-ogre2.so].
--------- 8 -------------------------------------------
With changes in proposed 2.3.3+dfsg-0ubuntu3:

--------- 8 -------------------------------------------
[GUI] [Wrn] [Application.cc:908] [QT] 
file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML 
EntityContextMenu: Detected anchors on an item that is managed by a layout. 
This is undefined behavior; use Layout.alignment instead.
failed to create drawable
[GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[GUI] [Msg] Move to service on [/gui/move_to]
[GUI] [Msg] Follow service on [/gui/follow]
[GUI] [Msg] Move to pose service on [/gui/move_to/pose]
[GUI] [Msg] Camera pose topic advertised on [/gui/camera/pose]
[GUI] [Msg] Follow offset service on [/gui/follow/offset]
[Msg] Found no publishers on /stats, adding root stats topic
[Msg] Found no publishers on /clock, adding root clock topic
[Msg] Serving scene information on [/world/shapes/scene/info]
[Msg] Serving graph information on [/world/shapes/scene/graph]
--------- 8 -------------------------------------------

The simulator loads just fine.

** Affects: ogre-next (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: noble

** Merge proposal linked:
   
https://code.launchpad.net/~j-rivero/ubuntu/+source/ogre-next/+git/ogre-next-2/+merge/464934

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2063359

Title:
  [FFe] Use of NDEBUG in d/rules for 2.3.3+dfsg-0ubuntu2 on Noble
  generates an incompatible ABI

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ogre-next/+bug/2063359/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to