From 0452d6e22e62a40dc9ac828061215e02aed8de97 Mon Sep 17 00:00:00 2001 From: Jeff Lait Date: Wed, 2 Aug 2023 13:42:13 -0400 Subject: [PATCH 1/3] Explicitly disable the lookup table generation as two namespaced versions will otherwise conflict, as the lookuptable itself is extern "C" so not namespaced. Signed-off-by: Jeff Lait --- openvdb/openvdb/math/Half.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openvdb/openvdb/math/Half.h b/openvdb/openvdb/math/Half.h index 85c792aac4..87ff4bb5d4 100644 --- a/openvdb/openvdb/math/Half.h +++ b/openvdb/openvdb/math/Half.h @@ -200,6 +200,15 @@ namespace OPENVDB_VERSION_NAME { namespace math { namespace internal { +// Use of lookup table is explicitly suppressed and the generation of +// a lookup table is suppressed. This is required because we namespace +// our type, but the lookup table is extern "C" and lacks a namespace. +// Thus any attempt to link two versions of OpenVDB with different +// namespaces will clash due to redefinition with a new type. +// The default was not to use a lookup table. +#undef IMATH_HALF_USE_LOOKUP_TABLE +#define IMATH_HALF_NO_LOOKUP_TABLE + //------------------------------------------------------------------------- // Limits // From 5f9503534ca42a229ea99fafb369fde204123ed0 Mon Sep 17 00:00:00 2001 From: Jeff Lait Date: Wed, 2 Aug 2023 14:35:46 -0400 Subject: [PATCH 2/3] Describe and justify LUT change. Signed-off-by: Jeff Lait --- pendingchanges/remove_half_lut.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pendingchanges/remove_half_lut.txt diff --git a/pendingchanges/remove_half_lut.txt b/pendingchanges/remove_half_lut.txt new file mode 100644 index 0000000000..39d65a2803 --- /dev/null +++ b/pendingchanges/remove_half_lut.txt @@ -0,0 +1,5 @@ +Fixes: + - The Half.h is no longer built with an internal lookup table, but + explicilty selects the non-lut version and disables creation of + a lut. This is required to avoid symbol conflicts with + different namespaced OpenVDB builds. From 01ca701ae161c351ebb8f0444b9f91e193bad13b Mon Sep 17 00:00:00 2001 From: Jeff Lait Date: Thu, 3 Aug 2023 10:06:57 -0400 Subject: [PATCH 3/3] Remove trailing whitespace. Signed-off-by: Jeff Lait --- openvdb/openvdb/math/Half.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvdb/openvdb/math/Half.h b/openvdb/openvdb/math/Half.h index 87ff4bb5d4..b8045ba441 100644 --- a/openvdb/openvdb/math/Half.h +++ b/openvdb/openvdb/math/Half.h @@ -203,7 +203,7 @@ namespace internal { // Use of lookup table is explicitly suppressed and the generation of // a lookup table is suppressed. This is required because we namespace // our type, but the lookup table is extern "C" and lacks a namespace. -// Thus any attempt to link two versions of OpenVDB with different +// Thus any attempt to link two versions of OpenVDB with different // namespaces will clash due to redefinition with a new type. // The default was not to use a lookup table. #undef IMATH_HALF_USE_LOOKUP_TABLE