Hi, I had been working recently on building the prman Hydra delegate on Linux. We are using CMake directly to build USD.
Things seems straightforward by the guide (RenderMan USD Imaging Plugin — Universal Scene Description 23.08 documentation) but I ran into an issue that seemed like the prman stats library wasn’t getting linked in. I checked on the build script and noticed the libraries for prman don’t seem to be added automatically by CMake–just on Windows–apparently to work around an absolute rpath issue.
I moved these three lines so they are always included in the build and everything seems fine. I also don’t see any absolute RPATH/RUNPATH added to hdPrman.so.
I was curious if this is working around an active problem still, and if perhaps I should send a PR for this?
Hey @pkilgo, I believe the RenderMan libraries are explicitly not linked in the CMakeLists.txt because hdPrman tries to dynamically determine what RenderMan libraries to use at runtime via the RMANTREE environment variable – see the pxr/imaging/plugin/hdPrmanLoader library.
We haven’t seen any linker errors related to the stats library in our internal testing and AFAICT libprman.so itself links to libstats.so. Can you describe what kind of issue you were hitting?
Hi Sunya, thank you for the context. That makes sense why the build script is written the way it is. I thought what I experienced was a build-time linking error, but it has been a while and I do not have the build log, and also can’t reproduce any error at build time. So I will revert the patch, and see if it ever reoccurs.
I can “forget” to set RMANTREE and I see hdPrmanLoader warning correctly.
The hdPrmanLoader backend requires $RMANTREE to be set.