# Failed to build usd using rez

**URL:** <https://forum.aousd.org/t/failed-to-build-usd-using-rez/2049>\
**Category:** Build and Deployment\
**Created:** [December 3, 2024, 2:33pm UTC](https://forum.aousd.org/t/failed-to-build-usd-using-rez/2049 "2024-12-03T14:33:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![minwoo](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@minwoo](https://forum.aousd.org/u/minwoo)\
**Post date:** [December 3, 2024, 2:33pm UTC](https://forum.aousd.org/t/failed-to-build-usd-using-rez/2049/1 "2024-12-03T14:33:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [December 3, 2024, 2:40pm UTC](https://forum.aousd.org/t/failed-to-build-usd-using-rez/2049/2 "2024-12-03T14:40:02Z")

</div>

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](https://cmake.org/cmake/help/latest/variable/CMAKE_VERBOSE_MAKEFILE.html)

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

---

<div class="post-metadata">

**Author:** ![minwoo](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@minwoo](https://forum.aousd.org/u/minwoo)\
**Post date:** [December 10, 2024, 2:42am UTC](https://forum.aousd.org/t/failed-to-build-usd-using-rez/2049/3 "2024-12-10T02:42:17Z")

</div>

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!
