Issue with building
Hello! Currently running into an issue that's put a total halt on installation progress. I have USD installed and all the environment variables set properly, but whenever I try to start the actual build process (cmake --preset container-release), it gives me this error:
CMake Error at moonray/hydra/CMakeLists.txt:38 (find_package):
By not providing "Findpxr.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pxr", but
CMake did not find one.
Could not find a package configuration file provided by "pxr" with any of
the following names:
pxrConfig.cmake
pxr-config.cmake
Add the installation prefix of "pxr" to CMAKE_PREFIX_PATH or set "pxr_DIR"
to a directory containing one of the above files. If "pxr" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
I can't proceed because the next command says it can't make directories, so it's stopping. I presume that's caused by the above error.
Okay. So I decided to delete everything and start over. I'm now stuck on step 2 (cmake --build . -- -j 64). Now I get this
gmake[2]: *** [CMakeFiles/embree.dir/build.make:117: embree-prefix/src/embree-stamp/embree-patch] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:455: CMakeFiles/embree.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
I tried to run this through three or four times and re-downloaded the entire git twice, but nothing changed. Occasionally, the first line says Error 2 instead of Error 1. I'm at a total loss ._.
Are you following the docker instructions? I know that if you are at step 2 building the dependencies in an unclean build directory it will attempt to repatch embree and fail. Make sure you either 'rm -rf build/*' whilest attached to the build container or just restart the container and restart.
For me it was failing but finally worked with -j 8 instead of -j 64. In my probably probably it was failing due to 100% load on my CPU.
Final command for my case: cmake --build . -- -j 8
As PolygonError says, cmake writes intermediate files and directories into the "build" directory. Sometimes if it gets into a bad state you have to manually delete the entire contents of this directory to force cmake to restart from scratch. This applies to both container and non-container builds.
Regarding the original 'pxrConfig.cmake' issue, this file is part of the USD installation that tells CMake where to find all the USD libraries. If you are building using the full version of step 2, USD should be downloaded and built, and place pxrConfig.cmake in /usr/local : so you should check that this file exists at the end of step 2. If you are using an existing install of USD, it might have placed pxrConfig.cmake somewhere else, or not have it at all.