Skip to content

Various fixes for Ogre3D (multiarch support for Debian, resource not found, update robot.mesh)#1948

Open
fspindle wants to merge 6 commits intolagadic:masterfrom
fspindle:fix_various_ogre
Open

Various fixes for Ogre3D (multiarch support for Debian, resource not found, update robot.mesh)#1948
fspindle wants to merge 6 commits intolagadic:masterfrom
fspindle:fix_various_ogre

Conversation

@fspindle
Copy link
Copy Markdown
Contributor

No description provided.

- New file is a copy from Ogre 14.4.1 Samples/Media/models/robot.mesh
- This update was necessary to fix the following warning when running AROgre.cpp example:

  Mesh: Loading robot.mesh.
  Skeleton: Loading robot.skeleton
  Warning: robot.mesh uses an old format [MeshSerializer_v1.41]; upgrade with the OgreMeshUpgrader tool
This commit addresses Debian bug #1133721 where libvisp-dev failed to
co-install on multi-arch systems because the file 'plugins.cfg' was
installed in an architecture-independent path (/usr/share) while its
content varied by architecture.

To comply with Debian policy 5.6.34.3 for "Multi-Arch: same" packages:
- Introduced VISP_OGRE_DATA_INSTALL_PATH to handle Ogre configuration files.
- On UNIX systems with ENABLE_MULTIARCH, this path is now moved from
  the shared DATAROOTDIR to the architecture-specific LIBDIR:
  ${CMAKE_INSTALL_LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}/visp-${VISP_VERSION}
- Updated OgreTools.cmake to install plugins.cfg to this new destination.
- Updated VISPGenerateHeaders.cmake to ensure vpConfig.h correctly points
  to the new architecture-dependent location for Ogre plugins.

This allows identical files to remain in /usr/share while moving
architecture-specific configuration to architecture-specific folders,
resolving the file conflict between different architectures (e.g., amd64 vs arm64).

Resolves: https://bugs.debian.org/1133721
This commit addresses issue lagadic#1947 where Ogre3D samples (like AROgre)
crashed with an exception because they could not locate 'robot.mesh'
and other materials.

The fix involves:
- Updating vp_set_ogre_resources macro to differentiate between build
  and install resource paths.
- Introducing OGRE_RESOURCE_LINES_BUILD and OGRE_RESOURCE_LINES_INSTALL
  to ensure the generated 'resources.cfg' points to the correct media
  folders (models, scripts, textures) depending on the context.
- Explicitly copying the media directory from the source tree to the
  binary directory during the build process to ensure availability
  for out-of-source builds.
- Updating the 'resources.cfg.in' template to include these new
  resource line variables.
- Ensuring the media directory is correctly installed to
  VISP_OGRE_DATA_INSTALL_PATH with appropriate permissions.

This ensures that Ogre can always find the ViSP-specific assets
required by the augmented reality modules.

Resolves: lagadic#1947
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.78%. Comparing base (0436495) to head (5f3621e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1948      +/-   ##
==========================================
- Coverage   48.80%   48.78%   -0.03%     
==========================================
  Files         532      532              
  Lines       69310    69310              
  Branches    32412    32412              
==========================================
- Hits        33830    33816      -14     
- Misses      24907    31347    +6440     
+ Partials    10573     4147    -6426     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

1 participant