Skip to content

Add symbol visibility macros to make*Palette public functions (backport #1492) - #1501

Merged
ahcorde merged 2 commits into
humblefrom
mergify/bp/humble/pr-1492
Jun 25, 2025
Merged

ahcorde merged 2 commits into
humblefrom
mergify/bp/humble/pr-1492

Conversation

@mergify

@mergify mergify Bot commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Description

Add symbol visibility macros to make*Palette public functions. The functions are included in public headers and used in downstream projects (see https://github.com/OctoMap/octomap_rviz_plugins/blob/62ea089afc43801d70dd31dd51a1d35b916416a7/src/occupancy_map_display.cpp#L71C39-L71C57), so I think it make sense to expose them as public functions.

Is this user-facing behavior change?

Not on Linux or macOS. The only difference is that on Windows the make*Palette functions can actually be used.

Did you use Generative AI?

No.

Additional Information

Without this fix, downstream packages can fail on Windows with errors like:

MSBuild version 17.13.15+18b3035f6 for .NET Framework
MSBUILD : error MSB1009: Project file does not exist.
Switch: Release.vcxproj

D:\src\ros-jazzy\output\bld\rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615\work\build>cmake --build . --config Release
MSBuild version 17.13.15+18b3035f6 for .NET Framework

  1>Checking Build System
  Automatic MOC for target octomap_rviz_plugins
  Building Custom Rule D:/src/ros-jazzy/output/bld/rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615/work/ros-jazzy-octomap-rviz-plugins/src/work/CMakeLists.txt
  moc_occupancy_grid_display.cpp
  moc_occupancy_map_display.cpp
  D:/src/ros-jazzy/output/bld/rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615/h_env/Library/opt/rviz_ogre_vendor/include/OGRE\OgreVector3.h is deprecated, migrate to Ogre.h
  Generating Code...
occupancy_map_display.obj : error LNK2019: unresolved external symbol "class std::vector<unsigned char,class std::allocator<unsigned char> > __cdecl rviz_default_plugins::displays::makeRawPalette(bool,int)" (
?makeRawPalette@displays@rviz_default_plugins@@YA?AV?$vector@EV?$allocator@E@std@@@std@@_NH@Z) referenced in function "public: virtual void __cdecl octomap_rviz_plugins::OccupancyMapDisplay::onInitialize(void
)" (?onInitialize@OccupancyMapDisplay@octomap_rviz_plugins@@UEAAXXZ) [D:\src\ros-jazzy\output\bld\rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615\work\build\octomap_rviz_plugins.vcxproj]
occupancy_map_display.obj : error LNK2019: unresolved external symbol "class std::vector<unsigned char,class std::allocator<unsigned char> > __cdecl rviz_default_plugins::displays::makeMapPalette(bool,int)" (
?makeMapPalette@displays@rviz_default_plugins@@YA?AV?$vector@EV?$allocator@E@std@@@std@@_NH@Z) referenced in function "public: virtual void __cdecl octomap_rviz_plugins::OccupancyMapDisplay::onInitialize(void
)" (?onInitialize@OccupancyMapDisplay@octomap_rviz_plugins@@UEAAXXZ) [D:\src\ros-jazzy\output\bld\rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615\work\build\octomap_rviz_plugins.vcxproj]
occupancy_map_display.obj : error LNK2019: unresolved external symbol "class std::vector<unsigned char,class std::allocator<unsigned char> > __cdecl rviz_default_plugins::displays::makeCostmapPalette(bool,int
)" (?makeCostmapPalette@displays@rviz_default_plugins@@YA?AV?$vector@EV?$allocator@E@std@@@std@@_NH@Z) referenced in function "public: virtual void __cdecl octomap_rviz_plugins::OccupancyMapDisplay::onInitial
ize(void)" (?onInitialize@OccupancyMapDisplay@octomap_rviz_plugins@@UEAAXXZ) [D:\src\ros-jazzy\output\bld\rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615\work\build\octomap_rviz_plugins.vcxproj]
D:\src\ros-jazzy\output\bld\rattler-build_ros-jazzy-octomap-rviz-plugins_1750498615\work\build\Release\octomap_rviz_plugins.dll : fatal error LNK1120: 3 unresolved externals [D:\src\ros-jazzy\output\bld\rattl
er-build_ros-jazzy-octomap-rviz-plugins_1750498615\work\build\octomap_rviz_plugins.vcxproj]

This is an automatic backport of pull request #1492 done by [Mergify](https://mergify.com).

Signed-off-by: Silvio Traversaro <[email protected]>
(cherry picked from commit 007c6e9)

# Conflicts:
#	rviz_default_plugins/include/rviz_default_plugins/displays/map/palette_builder.hpp
@mergify mergify Bot added the conflicts label Jun 24, 2025
@mergify

mergify Bot commented Jun 24, 2025

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 007c6e9 has failed:

On branch mergify/bp/humble/pr-1492
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 007c6e9a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rviz_default_plugins/include/rviz_default_plugins/displays/map/palette_builder.hpp

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
@ahcorde

ahcorde commented Jun 24, 2025 •

Copy link
Copy Markdown
Contributor

Pulls: #1501
Gist: https://gist.githubusercontent.com/ahcorde/15815bcd41caaa6fd022dfe0523b4c19/raw/c2736b35f5f1c4d7df8b30ffd95687082aac891b/ros2.repos
BUILD args: --packages-above-and-dependencies rviz_default_plugins
TEST args: --packages-above rviz_default_plugins
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16295

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
ahcorde merged commit c8b8d22 into humble Jun 25, 2025
@ahcorde
ahcorde deleted the mergify/bp/humble/pr-1492 branch June 25, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants