Allow using hdRpr plugin on Linux from non-standard paths#240
Merged
bsavery merged 1 commit intoGPUOpen-LibrariesAndSDKs:masterfrom Feb 26, 2020
Merged
Allow using hdRpr plugin on Linux from non-standard paths#240bsavery merged 1 commit intoGPUOpen-LibrariesAndSDKs:masterfrom
bsavery merged 1 commit intoGPUOpen-LibrariesAndSDKs:masterfrom
Conversation
Contributor
|
Regarding macOS. I'm not sure I now what you mean about needing an absolute path. You can have an $RPATH in paths no? |
Contributor
Author
|
When I mentioned the "macOS issue" I was referring to this part of the cmake code. You can see that Pixar absolutizes rpaths. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Right now, if the user has Houdini installed under the path that is not /opt/hfs18.0 or not the one we built against, hdRpr.so will fail to load.
Linux
Houdini build
master
The issue is here
/opt/hfs18.0/dsolib:/opt/hfs18.0.387/dsolib, in absolute paths which bounds us to the particular naming of Houdini install root./home/hshakula/dev/builds/RPR_SDK_1.34.7/binUbuntu18:/home/hshakula/dev/builds/RIF_SDK_1.4.4/Ubuntu18/Bin/Release/x64is just a trash that should not be in rpaths.fix-linux-rpath
Houdini's directory structure looks like this:
So new rpath will point to dsolib and it's not bound to the Root name at all.
Usdview build
master
fix-linux-rpath
Everything the same, just without the trash.
macOS
macOS, in particular, is an interesting case because it has SIP which disallows non-absolute rpaths.
So in the case of macOS, hdRpr pre-built plugin is always bound to a particular Houdini version.
On macOS effective change is the removal of the trash.
Houdini build
master
fix-linux-rpath
Usdview build
master
fix-linux-rpath
Summary
Fix rpath on Linux and tweak it on macOS.
Regarding macOS absolute rpath, I hope there is some way to work around this issue but it's not the original issue I was going to fix with this PR.
I will add a corresponding entry in my TODO-list to check what can be done here.