diff --git a/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel b/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel index cbf3a21d7147..7946aee1122a 100644 --- a/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel +++ b/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel @@ -34,6 +34,7 @@ cc_library( "include/voxelized_geometry_tools/signed_distance_field_generation.hpp", # noqa "include/voxelized_geometry_tools/tagged_object_collision_map.hpp", "include/voxelized_geometry_tools/topology_computation.hpp", + "include/voxelized_geometry_tools/vgt_namespace.hpp", ], includes = ["include"], linkstatic = True, @@ -52,6 +53,7 @@ cc_library( hdrs = [ "include/voxelized_geometry_tools/cuda_voxelization_helpers.h", "include/voxelized_geometry_tools/device_voxelization_interface.hpp", + "include/voxelized_geometry_tools/vgt_namespace.hpp", ], includes = ["include"], linkstatic = True, @@ -69,6 +71,7 @@ cc_library( hdrs = [ "include/voxelized_geometry_tools/device_voxelization_interface.hpp", "include/voxelized_geometry_tools/opencl_voxelization_helpers.h", + "include/voxelized_geometry_tools/vgt_namespace.hpp", ], includes = ["include"], linkstatic = True, diff --git a/tools/workspace/voxelized_geometry_tools/patches/vendor.patch b/tools/workspace/voxelized_geometry_tools/patches/vendor.patch new file mode 100644 index 000000000000..85242e3f9e69 --- /dev/null +++ b/tools/workspace/voxelized_geometry_tools/patches/vendor.patch @@ -0,0 +1,13 @@ +[vgt] Use hidden linker visibility + +This prevents ODR violations in case downstream code also links to VGT. + +--- include/voxelized_geometry_tools/vgt_namespace.hpp ++++ include/voxelized_geometry_tools/vgt_namespace.hpp +@@ -17,5 +17,5 @@ + + #ifndef VGT_NAMESPACE_BEGIN +-# define VGT_NAMESPACE_BEGIN inline namespace v1 { ++# define VGT_NAMESPACE_BEGIN inline namespace drake_vendor __attribute__ ((visibility ("hidden"))) { + #endif + diff --git a/tools/workspace/voxelized_geometry_tools/repository.bzl b/tools/workspace/voxelized_geometry_tools/repository.bzl index bc297794f67b..db683668da12 100644 --- a/tools/workspace/voxelized_geometry_tools/repository.bzl +++ b/tools/workspace/voxelized_geometry_tools/repository.bzl @@ -10,8 +10,11 @@ def voxelized_geometry_tools_repository( When updating, ensure that any new unit tests are reflected in package.BUILD.bazel and BUILD.bazel in drake. """, - commit = "79793a1715642603fb7cba6dbf4c81e9a3bbbfa8", - sha256 = "c27959721290a6727d3cf12f4822b8112abbb7e16aebc679d7a429f9ed73f017", # noqa + commit = "daa34feecf983a6b10b07add4a51a7e1c499b913", + sha256 = "ba62cb041ea05239196fd032bfde02e5cd2db2ad64d53dc6610218f8d8080742", # noqa build_file = ":package.BUILD.bazel", + patches = [ + ":patches/vendor.patch", + ], mirrors = mirrors, )