From: Thomas De Schampheleire Date: Tue, 7 Aug 2018 15:36:07 +0200 Subject: [Buildroot] How to retain intentional absolute RPATH for target application? In-Reply-To: <20180801141713.GT21354@australia> References: <20180801141713.GT21354@australia> Message-ID: <20180807133607.GI13619@australia.be.alcatel-lucent.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On Wed, Aug 01, 2018 at 04:17:13PM +0200, Thomas De Schampheleire wrote: > Hi, > > I have an application that has an RPATH containing (among some automatically > present values) an absolute path which is present on target but not a standard > search path, say /opt/foobar/lib , and also as first entry $ORIGIN/../lib. > The application is stored in /opt/foobar/bin. > > Testing on target in a case where fix-rpath is not used (old buildroot version) > shows that the first entry in RPATH is used, i.e. $ORIGIN/../lib, resolving to > /opt/foobar/bin/../lib. > > When going to current buildroot including fix-rpath, this application cannot be > loaded because the libraries are not found. Analysis shows that only standard > search paths are considered. > > Manually checking the patchelf step shows that the RPATH is completely cleared. > I found a patch by Bryce Ferguson regarding endianness problems on PPC (this is > indeed a PPC target), but although it is applied and fixes the display of the > RPATH field in readelf after running fix-rpath, the actual issue remains: > RPATH is empty after running fix-rpath. > > My question is now: how to allow preserving such an intentional RPATH, or at > least make sure that the libraries in /opt/foobar/lib are found? Any hints or feedback? Thanks, Thomas