Skip to content

Conversation

@linxiulei
Copy link

FIX #100.

In addition, the '--shrink-prefix' option can be used for specify rpath
when executable is building in anothen buildroot. For instance, if an
executable located in /tmp/buildroot and can only be installed to
/usr/local. To accomplish that in build stage, use:

$ patchelf --shrink-rpath --shrink-prefix /tmp/buildroot

in /foo/lib, then the new RPATH will be "/foo/lib".

.IP --shrink-prefix
Work with --shrink-rpath, used in stage of build before installed to real dest path.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't really make sense of this description...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for response

I use patchelf in a stage of rpmbuild, which install software files in a buildroot dir ( for example /home/rpmbuild/buildroot but which is not the root dir software actually run at ).
And in that case, patchelf would not find dynamic libs correctly.

.IP --shrink-prefix PREFIX
Work with --shrink-rpath, search all directory in RPATH with prefix $PREFIX, insteal search all directory IN RPATH

For instance as above, --shrink-prefix /root/build/, /root/build/lib:/root/build/usr/lib:/root/build/foo/lib would be searched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add search path prefix for "--shrink-rpath"

2 participants