Bug 9381

Summary: check-host-rpath issues
Product: buildroot Reporter: Jean-pierre Cartal <jpcartal>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2016.08   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Jean-pierre Cartal 2016-10-26 11:45:54 UTC
Hello,

It seems that the check-host-rpath script has issues with buildroot paths that contains links :

jpcartal@florida:buildroot-2016.08$ echo $PWD
/home/jpcartal/Dev/Ssd/buildroot/buildroot-2016.08
jpcartal@florida:buildroot-2016.08$ realpath $PWD
/home/jpcartal/Ssd/buildroot/buildroot-2016.08
jpcartal@florida:buildroot-2016.08$ support/scripts/check-host-rpath toto $PWD/output/host
***
*** ERROR: package toto installs executables without proper RPATH:
***   /home/jpcartal/Dev/Ssd/buildroot/buildroot-2016.08/output/host/usr/bin/crlutil
***   /home/jpcartal/Dev/Ssd/buildroot/buildroot-2016.08/output/host/usr/bin/arm-buildroot-linux-gnueabihf-ar
....
jpcartal@florida:buildroot-2016.08$ cd $(realpath $PWD)
jpcartal@florida:buildroot-2016.08$ support/scripts/check-host-rpath toto $PWD/output/host
jpcartal@florida:buildroot-2016.08$

Also it seems that the $ORIGIN ld feature is not supported.
Comment 1 Thomas Petazzoni 2016-10-26 12:07:55 UTC
Did you test with Buildroot 2016.08, or the latest master?

Indeed, after 2016.08, we have merged some patches that make sure the Buildroot build takes place from a canonical path, in order to avoid symlink related problems. See https://git.buildroot.org/buildroot/commit/Makefile?id=173135df5b69dfd5ae6fe6cf2de8833c6f74c143.

If you've tried with Buildroot 2016.08, can you try with the latest master?
Comment 2 Jean-pierre Cartal 2016-10-26 12:11:29 UTC
Hello,

Thanks for your answer.

I tried with release 2016.08, I'll give the master version a try and let you know.

Do you know if there is any plan to support the $ORIGIN ld feature ?

Regards.
Comment 3 Thomas Petazzoni 2016-10-26 12:22:51 UTC
(In reply to Jean-pierre Cartal from comment #2)

> Do you know if there is any plan to support the $ORIGIN ld feature ?

Yes. Samuel sent patches doing this, which we discussed during the latest Buildroot Developers Meeting. However, we felt that a better approach was to improve the patchelf utility, so Samuel is normally working on this. Don't hesitate to get in touch with Samuel Martin to see if he needs help on this topic.
Comment 4 Jean-pierre Cartal 2016-10-27 07:15:03 UTC
(In reply to Thomas Petazzoni from comment #1)
Hi,

Just tested with master version and the link issue is indeed solved.

Thanks for your help.