diff --git a/USD-21.11-disable-malloc-hooks.patch b/USD-21.11-disable-malloc-hooks.patch new file mode 100644 index 0000000..e9164cb --- /dev/null +++ b/USD-21.11-disable-malloc-hooks.patch @@ -0,0 +1,23 @@ +diff -Naur USD-21.11-original/pxr/base/arch/mallocHook.cpp USD-21.11/pxr/base/arch/mallocHook.cpp +--- USD-21.11-original/pxr/base/arch/mallocHook.cpp 2021-11-01 13:10:51.000000000 -0400 ++++ USD-21.11/pxr/base/arch/mallocHook.cpp 2022-03-31 17:26:22.176739670 -0400 +@@ -177,7 +177,7 @@ + _underlyingMemalignFunc || _underlyingFreeFunc; + } + +-#if defined(ARCH_OS_LINUX) ++#if 0 + template + static bool _GetSymbol(T* addr, const char* name, string* errMsg) { + if (void* symbol = dlsym(RTLD_DEFAULT, name)) { +@@ -241,8 +241,8 @@ + ARCH_UNUSED_ARG void (*freeWrapper)(void*, const void*), + string* errMsg) + { +-#if !defined(ARCH_OS_LINUX) +- *errMsg = "ArchMallocHook functionality not implemented for non-linux systems"; ++#if 1 ++ *errMsg = "ArchMallocHook functionality not implemented"; + return false; + #else + if (IsInitialized()) { diff --git a/usd.spec b/usd.spec index e43eb48..1fab300 100644 --- a/usd.spec +++ b/usd.spec @@ -6,9 +6,7 @@ %bcond_with documentation %bcond_without embree %bcond_without imaging -# We must keep jemalloc enabled to work around -# https://github.com/PixarAnimationStudios/USD/issues/1592. -%bcond_without jemalloc +%bcond_with jemalloc %bcond_with openshading %bcond_with openvdb %bcond_with ocio @@ -72,6 +70,12 @@ Patch2: USD-21.08-OpenEXR3.patch # https://github.com/PixarAnimationStudios/USD/pull/1676 Patch3: 1676.patch +# USD uses deprecated malloc hooks removed in glibc 2.34 +# https://github.com/PixarAnimationStudios/USD/issues/1592 +# Based on: +# https://github.com/PixarAnimationStudios/USD/issues/1592#issuecomment-1047152905 +Patch4: USD-21.11-disable-malloc-hooks.patch + # Base BuildRequires: boost-devel BuildRequires: boost-program-options