You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blender cannot link against USD library version 21.02, because the latter exports the names LZ4_compress_forceExtDict and LZ4_decompress_safe_forceExtDict.
This issue was likely introduced in commit df48692. As you can see in the commit message of 4da033b, the LZ4 symbols are supposed to be encapsulated in a C++ namespace. However, since df48692 these two symbols are marked as export "C" and thus collide with other libraries.
Steps to Reproduce
Build USD as static library
Run nm -C libusd_m.a | grep LZ4
See that LZ4_compress_forceExtDict and LZ4_decompress_safe_forceExtDict are listed.
System Information (OS, Hardware)
Kubuntu Linux 20.04 and CentOS 7
Package Versions
USD 21.02
Build Flags
We build with these extra flags, to ensure that USD uses the correct precompiled libraries used to build Blender:
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# USD wants the tbb debug lib set even when you are doing a release build
# Otherwise it will error out during the cmake configure phase.
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.
-DPXR_SET_INTERNAL_NAMESPACE=usdBlender
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
-DPXR_BUILD_IMAGING=OFF
-DPXR_BUILD_TESTS=OFF
-DBUILD_SHARED_LIBS=OFF
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
-DPXR_BUILD_MONOLITHIC=ON
-DPXR_BUILD_USD_TOOLS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
# USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file
# doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib.
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
The text was updated successfully, but these errors were encountered:
USD version 21.02 includes two of the changes Blender used to patch in,
which have now been removed from `usd.diff`. Unfortunately 21.02
introduces another issue where LZ4 symbols are accidentally exported,
causing linker errors. Fortunately these symbols are only used for
resting, so I added a patch hunk that simply removes their `extern "C"`
declaration.
The LZ4 linker issue has been reported upstream at
PixarAnimationStudios/OpenUSD#1447.
Reviewed By: sebbas, mont29
Differential Revision: https://developer.blender.org/D10367
Description of Issue
Blender cannot link against USD library version 21.02, because the latter exports the names
LZ4_compress_forceExtDict
andLZ4_decompress_safe_forceExtDict
.This issue was likely introduced in commit df48692. As you can see in the commit message of 4da033b, the LZ4 symbols are supposed to be encapsulated in a C++ namespace. However, since df48692 these two symbols are marked as
export "C"
and thus collide with other libraries.Steps to Reproduce
nm -C libusd_m.a | grep LZ4
LZ4_compress_forceExtDict
andLZ4_decompress_safe_forceExtDict
are listed.System Information (OS, Hardware)
Kubuntu Linux 20.04 and CentOS 7
Package Versions
USD 21.02
Build Flags
We build with these extra flags, to ensure that USD uses the correct precompiled libraries used to build Blender:
The text was updated successfully, but these errors were encountered: