Failed to build usd using rez

Hi? I’m trying to build usd(version=24.11) using rez with all dependencies.

Oh! I’ve never built before. Please note!

-DPXR_BUILD_USDVIEW=ON doesn’t show usdview in the bin path, so I’m referencing other people’s github and trying to build.

Currently, conrigure is set like this in cmake,

cmake
{BUILD_PATH}/..\ -DCMAKE_INSTALL_PREFIX={INSTALL_PATH}
-DCMAKE_C_FLAGS=“-fPIC”
-DCMAKE_CXX_FLAGS=“-fPIC -Wno-deprecated-declarations -Wno-unused-variable”
-DCMAKE_POLICY_DEFAULT_CMP0072=NEW
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
-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_HOUDINI_PLUGIN=OFF
-DPXR_BUILD_MATERIALX_PLUGIN=OFF
-DPXR_BUILD_OPENCOLORIO_PLUGIN=ON
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON
-DPXR_BUILD_PRMAN_PLUGIN=OFF
-DPXR_BUILD_TESTS=ON
-DPXR_BUILD_USD_CORE=ON
-DPXR_BUILD_USDVIEW=ON
-DPXR_BUILD_USD_IMAGING=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
-DALEMBIC_DIR={REZ_ALEMBIC_ROOT} \ -DBoost_NO_BOOST_CMAKE=ON \ -DBoost_NO_SYSTEM_PATHS=ON \ -DBOOST_ROOT={REZ_BOOST_ROOT}
-DBOOST_INCLUDEDIR={REZ_BOOST_ROOT}/include/boost \ -DOPENSUBDIV_INCLUDE_DIR={REZ_OPENSUBDIV_ROOT}/include
-DOPENSUBDIV_LIBRARIES={REZ_OPENSUBDIV_ROOT}/lib/ \ -DOPENSUBDIV_OSDCPU_LIBRARY={REZ_OPENSUBDIV_ROOT}/lib/libosdCPU.so
-DPTEX_INCLUDE_DIR={REZ_PTEX_ROOT}/include \ -DPTEX_LIBRARY={REZ_PTEX_ROOT}/lib64/libPtex.so

I’m getting the following error, but I can’t figure out what’s missing or why it’s happening.

[ 81%] Building CXX object pxr/usd/usdGeom/CMakeFiles/usdGeom.dir/xformCommonAPI.cpp.o
In file included from /usd/24.11/pxr/base/work/dispatcher.h:26,
from /usd/24.11/pxr/usd/sdf/layer.h:29,
from /usd/24.11/pxr/usd/usd/schemaRegistry.h:14,
from /usd/24.11/pxr/usd/usd/primDefinition.h:12,
from /usd/24.11/pxr/usd/usd/primData.h:16,
from /usd/24.11/pxr/usd/usd/object.h:15,
from /usd/24.11/pxr/usd/usd/prim.h:15,
from /usd/24.11/pxr/usd/usd/schemaBase.h:12,
from /usd/24.11/pxr/usd/usd/typed.h:14,
from /usd/24.11/pxr/usd/usdGeom/subset.h:14,
from /usd/24.11/pxr/usd/usdGeom/subset.cpp:7:
/cocoa/inhouse/tool/rez-packages/tbb/2020.3/platform-linux/arch-x86_64/tbb/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
21 | #pragma message(“TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.”)
| ^
In file included from /usd/24.11/pxr/base/work/dispatcher.h:26,
from /usd/24.11/pxr/usd/sdf/layer.h:29,
from /usd/24.11/pxr/usd/usd/schemaRegistry.h:14,
from /usd/24.11/pxr/usd/usd/primDefinition.h:12,
from /usd/24.11/pxr/usd/usd/primData.h:16,
from /usd/24.11/pxr/usd/usd/object.h:15,
from /usd/24.11/pxr/usd/usd/prim.h:15,
from /usd/24.11/pxr/usd/usd/schemaBase.h:12,
from /usd/24.11/pxr/usd/usd/typed.h:14,
from /usd/24.11/pxr/usd/usdGeom/imageable.h:14,
from /usd/24.11/pxr/usd/usdGeom/xformable.h:14,
from /usd/24.11/pxr/usd/usdGeom/boundable.h:14,
from /usd/24.11/pxr/usd/usdGeom/gprim.h:14,
from /usd/24.11/pxr/usd/usdGeom/pointBased.h:14,
from /usd/24.11/pxr/usd/usdGeom/tetMesh.h:14,
from /usd/24.11/pxr/usd/usdGeom/tetMesh.cpp:7:
/cocoa/inhouse/tool/rez-packages/tbb/2020.3/platform-linux/arch-x86_64/tbb/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
21 | #pragma message(“TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.”)
| ^
[ 81%] Building CXX object pxr/usd/usdGeom/CMakeFiles/usdGeom.dir/xformable.cpp.o
In file included from /usd/24.11/pxr/base/work/dispatcher.h:26,
from /usd/24.11/pxr/usd/sdf/layer.h:29,
from /usd/24.11/pxr/usd/usd/schemaRegistry.h:14,
from /usd/24.11/pxr/usd/usd/primDefinition.h:12,
from /usd/24.11/pxr/usd/usd/primData.h:16,
from /usd/24.11/pxr/usd/usd/object.h:15,
from /usd/24.11/pxr/usd/usd/prim.h:15,
from /usd/24.11/pxr/usd/usd/schemaBase.h:12,
from /usd/24.11/pxr/usd/usd/apiSchemaBase.h:14,
from /usd/24.11/pxr/usd/usdGeom/visibilityAPI.h:14,
from /usd/24.11/pxr/usd/usdGeom/visibilityAPI.cpp:7:
/cocoa/inhouse/tool/rez-packages/tbb/2020.3/platform-linux/arch-x86_64/tbb/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
21 | #pragma message(“TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.”)
| ^
In file included from /usd/24.11/pxr/base/work/dispatcher.h:26,
from /usd/24.11/pxr/usd/sdf/layer.h:29,
from /usd/24.11/pxr/usd/usd/schemaRegistry.h:14,
from /usd/24.11/pxr/usd/usd/primDefinition.h:12,
from /usd/24.11/pxr/usd/usd/primData.h:16,
from /usd/24.11/pxr/usd/usd/object.h:15,
from /usd/24.11/pxr/usd/usd/prim.h:15,
from /usd/24.11/pxr/usd/usd/schemaBase.h:12,
from /usd/24.11/pxr/usd/usd/typed.h:14,
from /usd/24.11/pxr/usd/usdGeom/imageable.h:14,
from /usd/24.11/pxr/usd/usdGeom/xformable.h:14,
from /usd/24.11/pxr/usd/usdGeom/xform.h:14,
from /usd/24.11/pxr/usd/usdGeom/xform.cpp:7:
/cocoa/inhouse/tool/rez-packages/tbb/2020.3/platform-linux/arch-x86_64/tbb/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
21 | #pragma message(“TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.”)
| ^
In file included from /usd/24.11/pxr/base/work/dispatcher.h:26,
from /usd/24.11/pxr/usd/sdf/layer.h:29,
from /usd/24.11/pxr/usd/usd/schemaRegistry.h:14,
from /usd/24.11/pxr/usd/usd/primDefinition.h:12,
from /usd/24.11/pxr/usd/usd/primData.h:16,
from /usd/24.11/pxr/usd/usd/object.h:15,
from /usd/24.11/pxr/usd/usd/prim.h:15,
from /usd/24.11/pxr/usd/usd/schemaBase.h:12,
from /usd/24.11/pxr/usd/usd/apiSchemaBase.h:14,
from /usd/24.11/pxr/usd/usdGeom/xformCommonAPI.h:14,
from /usd/24.11/pxr/usd/usdGeom/xformCommonAPI.cpp:7:
/cocoa/inhouse/tool/rez-packages/tbb/2020.3/platform-linux/arch-x86_64/tbb/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
21 | #pragma message(“TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.”)
| ^
In file included from /usd/24.11/pxr/base/work/dispatcher.h:26,
from /usd/24.11/pxr/usd/sdf/layer.h:29,
from /usd/24.11/pxr/usd/usd/schemaRegistry.h:14,
from /usd/24.11/pxr/usd/usd/primDefinition.h:12,
from /usd/24.11/pxr/usd/usd/primData.h:16,
from /usd/24.11/pxr/usd/usd/object.h:15,
from /usd/24.11/pxr/usd/usd/prim.h:15,
from /usd/24.11/pxr/usd/usd/schemaBase.h:12,
from /usd/24.11/pxr/usd/usd/typed.h:14,
from /usd/24.11/pxr/usd/usdGeom/imageable.h:14,
from /usd/24.11/pxr/usd/usdGeom/xformable.h:14,
from /usd/24.11/pxr/usd/usdGeom/xformable.cpp:7:
/cocoa/inhouse/tool/rez-packages/tbb/2020.3/platform-linux/arch-x86_64/tbb/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
21 | #pragma message(“TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.”)
| ^
[ 81%] Linking CXX shared library libusd_usdGeom.so
[ 82%] Built target usdGeom
make[3]: *** [Makefile:146: all] 오류 2
make[2]: *** [CMakeFiles/REZ_USD.dir/build.make:86: usd/src/REZ_USD-stamp/REZ_USD-build] 오류 2
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/REZ_USD.dir/all] 오류 2
make: *** [Makefile:136: all] 오류 2
18:22:29 ERROR BuildError: The cmake build system failed.

[minwoo@localhost rez-usd]$

I need help, what am I missing?

For Rez, I would strongly recommend against using the Rez CMake support directly, and instead rely on a build command that calls a python script which in turn calls cmake for you. We’ve had issues in the past where Rez introduces some oddities if it’s calling cmake directly itself.

That said, I don’t actually see an error in your build that would be causing it to fail. Could you enable verbose builds? CMAKE_VERBOSE_MAKEFILE — CMake 3.31.1 Documentation

Once that’s done, look for any lines that say: “error”. The warning lines can be skipped and are just noise

1 Like

I built the ptex in rez but found a problem. I solved the problem by building with regular cmake and configuring the res package. thank you!