-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I build it with ptex added, usdview doesn't work. #3456
Comments
I'm not an expert, but it sounds like maybe your OpenSubdiv was not built
with the optional ptex support enabled?
…--spiff
On Fri, Dec 6, 2024 at 11:09 AM void ***@***.***> wrote:
Description of Issue
When running usdview with ptex enabled, an ImportError occurs due to an
undefined symbol in libusd_hdSt.so. The error message indicates that the
function
_ZN10OpenSubdiv6v3_6_03Osd21GLSLPatchShaderSource25GetPatchBasisShaderSourceB5cxx11Ev
is not found. This issue only occurs when ptex is used; otherwise, usdview
runs normally.
Steps to Reproduce
Ensure that ptex support is enabled in the environment.
Run usdview from the command line.
Observe the ImportError related to libusd_hdSt.so.
System Information (OS, Hardware)
OS: Linux (specify distribution and version, e.g., CentOS 8, Ubuntu 20.04,
etc.)
CPU: (e.g., Intel Xeon, AMD Ryzen, etc.)
RAM: (e.g., 32 GB)
GPU: (e.g., NVIDIA GeForce RTX 3080, AMD Radeon, etc.)
Package Versions
USD: 24.11
OpenSubdiv:3.6.0
Python: 3.9.16
PySide2: 5.15.2.1
Other related packages: (e.g., libusd_hdSt.so version, etc.)
Build Flags
cmake
${BUILD_PATH}/..
-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
-DCMAKE_C_FLAGS="-fPIC"
-DCMAKE_CXX_FLAGS="-fPIC -I/usr/lib64 -I/usr/lib -lGLU -lglut -lGL"
-DCMAKE_POLICY_DEFAULT_CMP0072=NEW
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
-DCMAKE_VERBOSE_MAKEFILE=ON
-DPXR_BUILD_ALEMBIC_PLUGIN=ON
-DPXR_BUILD_DRACO_PLUGIN=OFF
-DPXR_BUILD_DOCUMENTATION=OFF
-DPXR_BUILD_EMBREE_PLUGIN=OFF
-DPXR_BUILD_IMAGING=ON
-DPXR_BUILD_MATERIALX_PLUGIN=OFF
-DPXR_BUILD_OPENCOLORIO_PLUGIN=ON
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON
-DPXR_BUILD_PRMAN_PLUGIN=OFF
-DPXR_BUILD_TESTS=OFF
-DPXR_BUILD_USDVIEW=ON
-DPXR_BUILD_USD_IMAGING=ON
-DPXR_BUILD_USD_CORE=ON
-DPXR_ENABLE_GL_SUPPORT=ON
-DPXR_ENABLE_VULKAN_SUPPORT=OFF
-DPXR_ENABLE_HDF5_SUPPORT=OFF
-DPXR_ENABLE_NAMESPACES=ON
-DPXR_ENABLE_OSL_SUPPORT=OFF
-DPXR_ENABLE_PTEX_SUPPORT=ON
-DPXR_ENABLE_PYTHON_SUPPORT=ON
-DPXR_ENABLE_MATERIALX_SUPPORT=OFF
-DPXR_HEADLESS_TEST_MODE=OFF
-DPXR_STRICT_BUILD_MODE=OFF
-DPXR_VALIDATE_GENERATED_CODE=OFF
-DBoost_NO_BOOST_CMAKE=ON
-DBoost_NO_SYSTEM_PATHS=ON
-DPXR_ENABLE_MULTIVERSE_SUPPORT=OFF
-DPXR_MAYA_TBB_BUG_WORKAROUND=OFF
-DALEMBIC_DIR=${REZ_ALEMBIC_ROOT}
-DGLEW_LOCATION=${REZ_GLEW_ROOT}
-DILMBASE_LOCATION=${REZ_ILMBASE_ROOT}
-DOCIO_LOCATION=${REZ_OCIO_ROOT}
-DOIIO_LOCATION=${REZ_OIIO_ROOT}
-DOPENSUBDIV_ROOT_DIR=${REZ_OPENSUBDIV_ROOT}
-DPTEX_LOCATION=${REZ_PTEX_ROOT}
-DPTEX_INCLUDE_DIR=${REZ_PTEX_ROOT}/include
-DPTEX_LIBRARY=${REZ_PTEX_ROOT}/lib64
-DBOOST_ROOT=${REZ_BOOST_ROOT}
-DBOOST_INCLUDEDIR=${REZ_BOOST_ROOT}/include
-DTBB_ROOT_DIR=${REZ_TBB_ROOT}
-DOPENEXR_LOCATION=${REZ_OPENEXR_ROOT}
-DOPENSUBDIV_INCLUDE_DIR=${REZ_OPENSUBDIV_ROOT}/include
-DOPENSUBDIV_LIBRARIES=${REZ_OPENSUBDIV_ROOT}/lib/
-DOPENSUBDIV_OSDCPU_LIBRARY=${REZ_OPENSUBDIV_ROOT}/lib/libosdCPU.so \
—
Reply to this email directly, view it on GitHub
<#3456>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPOU2DO4N25AC5KHO5CJLT2EHY57AVCNFSM6AAAAABTFH2WGOVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZDGNZUGI4DQOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hello? Thank you for your reply. When I checked about opensubdiv, I set the flag as below. And I set it to the rez package. cmake I built opensubdiv like this. Is there something wrong with the cmake flags? Will this affect anything? FYI, opensuvdiv is version 3.6.0. |
That undefined symbol should be resolved by libosdGPU.so which is a distinct library from libosdCPU.so Does it help if you also specify Within the OpenSubdiv codebase, Ptex is used only by the examples, there are no dependencies on Ptex within the OpenSubdiv libraries. So, I don't know why enabling Ptex would affect this behavior. |
I used chatgpt's comment to add DOPENSUBDIV_OSDGPU_LIBRARY, but after registering this issue, I removed it and did a USD build, so it's the same. If DOPENSUBDIV_OSDGPU_LIBRARY is affected, I don't see anything related to the GPU. |
Hydra Storm (hdSt) requires both the osdCPU and osdGPU libraries. Ptex is optional for both OpenUSD and OpenSubdiv. For OpenSubdiv, Ptex is used only by example code and does not have any effect on the core libraries, i.e. enabling Ptex for the OpenSubdiv build just means that some additional Ptex related examples will be built. |
The missing symbol is the mangled name for: Can you check the build logs for your OpenSubdiv build to make sure that OpenGL was found during that build? Side note: I noticed |
Previously, ptex was built using rez, but the problem was solved by building without using rez. Now it works normally even if you turn on the ptex supporter. Thank you for your feedback! |
Description of Issue
When running usdview with ptex enabled, an ImportError occurs due to an undefined symbol in libusd_hdSt.so. The error message indicates that the function _ZN10OpenSubdiv6v3_6_03Osd21GLSLPatchShaderSource25GetPatchBasisShaderSourceB5cxx11Ev is not found. This issue only occurs when ptex is used; otherwise, usdview runs normally.
Steps to Reproduce
Ensure that ptex support is enabled in the environment.
Run usdview from the command line.
Observe the ImportError related to libusd_hdSt.so.
System Information (OS, Hardware)
OS: Linux (rocky 8.8)
CPU: i7-8700k
RAM: 64GB
GPU: RTX 2060
Package Versions
USD: 24.11
OpenSubdiv:3.6.0
Python: 3.9.16
PySide2: 5.15.2.1
Other related packages: (e.g., libusd_hdSt.so version, etc.)
Build Flags
cmake
${BUILD_PATH}/..
-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
-DCMAKE_C_FLAGS="-fPIC"
-DCMAKE_CXX_FLAGS="-fPIC -I/usr/lib64 -I/usr/lib -lGLU -lglut -lGL"
-DCMAKE_POLICY_DEFAULT_CMP0072=NEW
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
-DCMAKE_VERBOSE_MAKEFILE=ON
-DPXR_BUILD_ALEMBIC_PLUGIN=ON
-DPXR_BUILD_DRACO_PLUGIN=OFF
-DPXR_BUILD_DOCUMENTATION=OFF
-DPXR_BUILD_EMBREE_PLUGIN=OFF
-DPXR_BUILD_IMAGING=ON
-DPXR_BUILD_MATERIALX_PLUGIN=OFF
-DPXR_BUILD_OPENCOLORIO_PLUGIN=ON
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON
-DPXR_BUILD_PRMAN_PLUGIN=OFF
-DPXR_BUILD_TESTS=OFF
-DPXR_BUILD_USDVIEW=ON
-DPXR_BUILD_USD_IMAGING=ON
-DPXR_BUILD_USD_CORE=ON
-DPXR_ENABLE_GL_SUPPORT=ON
-DPXR_ENABLE_VULKAN_SUPPORT=OFF
-DPXR_ENABLE_HDF5_SUPPORT=OFF
-DPXR_ENABLE_NAMESPACES=ON
-DPXR_ENABLE_OSL_SUPPORT=OFF
-DPXR_ENABLE_PTEX_SUPPORT=ON
-DPXR_ENABLE_PYTHON_SUPPORT=ON
-DPXR_ENABLE_MATERIALX_SUPPORT=OFF
-DPXR_HEADLESS_TEST_MODE=OFF
-DPXR_STRICT_BUILD_MODE=OFF
-DPXR_VALIDATE_GENERATED_CODE=OFF
-DBoost_NO_BOOST_CMAKE=ON
-DBoost_NO_SYSTEM_PATHS=ON
-DPXR_ENABLE_MULTIVERSE_SUPPORT=OFF
-DPXR_MAYA_TBB_BUG_WORKAROUND=OFF
-DALEMBIC_DIR=${REZ_ALEMBIC_ROOT}
-DGLEW_LOCATION=${REZ_GLEW_ROOT}
-DILMBASE_LOCATION=${REZ_ILMBASE_ROOT}
-DOCIO_LOCATION=${REZ_OCIO_ROOT}
-DOIIO_LOCATION=${REZ_OIIO_ROOT}
-DOPENSUBDIV_ROOT_DIR=${REZ_OPENSUBDIV_ROOT}
-DPTEX_LOCATION=${REZ_PTEX_ROOT}
-DPTEX_INCLUDE_DIR=${REZ_PTEX_ROOT}/include
-DPTEX_LIBRARY=${REZ_PTEX_ROOT}/lib64
-DBOOST_ROOT=${REZ_BOOST_ROOT}
-DBOOST_INCLUDEDIR=${REZ_BOOST_ROOT}/include
-DTBB_ROOT_DIR=${REZ_TBB_ROOT}
-DOPENEXR_LOCATION=${REZ_OPENEXR_ROOT}
-DOPENSUBDIV_INCLUDE_DIR=${REZ_OPENSUBDIV_ROOT}/include
-DOPENSUBDIV_LIBRARIES=${REZ_OPENSUBDIV_ROOT}/lib/
-DOPENSUBDIV_OSDCPU_LIBRARY=${REZ_OPENSUBDIV_ROOT}/lib/libosdCPU.so \
The text was updated successfully, but these errors were encountered: