Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --shrink-prefix used for build while package is not installed #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

@@ -53,6 +53,9 @@ For instance, if an executable references one library libfoo.so, has
an RPATH "/lib:/usr/lib:/foo/lib", and libfoo.so can only be found
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