All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 7172] Name collision of rpath token expansion and internal variables
Date: Sun,  8 Jun 2014 07:03:29 +0000 (UTC)	[thread overview]
Message-ID: <20140608070329.A41679CEEE@busybox.osuosl.org> (raw)
In-Reply-To: <bug-7172-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=7172

--- Comment #1 from Samuel Martin <s.martin49@gmail.com> 2014-06-08 07:03:28 UTC ---
Mike,

(In reply to comment #0)
> Ref:  man ld.so
> 
> Example:
> In menu -> tool chain -> Target Linker Options (BR2_TARGET_LDFLAGS) to:
> -Wl,-rpath='$ORIGIN/../lib'
> (A relative path from executable to pathname of its required libraries.
> The example in ld.so manual.).
> 
> Build BusyBox (which honors BR_TARGET_LDFLAGS, not everything does).
> 
> Use: readelf -dl on the resulting binary and find an entry similar to:
>  0x0000000f (RPATH)                      Library rpath: [outputRIGIN/../lib]
> 
> Where the $O of $ORIGIN has been expanded to an internal value by the time the
> content of BR2_TARGET_LDFLAGS is seen by the compiler.

Unfortunately, there is no trivial solution. This bug comes from the
interaction between Buildroot and the packages' build-systems (especially those
based on autotools).

I mean there no easy way to correctly escape "$ORIGIN" in makefiles (form
Buildroot and the package itself) or/and in sh scripts.

> 
> This was when using the Buildroot generation of a toolchain.
> Other toolchain selections not tested.

The toolchain has nothing to do with this issue.


From the couple of experiments I run, the only reliable solution to correctly
set RPATH is using chrpath or patchelf at the end of the build.


Regards,

Samuel

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

  reply	other threads:[~2014-06-08  7:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08  2:41 [Buildroot] [Bug 7172] New: Name collision of rpath token expansion and internal variables bugzilla at busybox.net
2014-06-08  7:03 ` bugzilla at busybox.net [this message]
2014-06-08 10:38   ` [Buildroot] [Bug 7172] " Mike Zick
2014-06-08 11:24     ` Samuel Martin
2014-06-08 12:57       ` Mike Zick
2014-06-08 13:53         ` Thomas Petazzoni
2014-06-08 14:04 ` bugzilla at busybox.net
2014-06-08 14:21 ` bugzilla at busybox.net
2014-06-08 15:56 ` bugzilla at busybox.net
2014-06-08 16:03 ` bugzilla at busybox.net
2014-06-08 16:28 ` bugzilla at busybox.net
2014-06-08 16:48 ` bugzilla at busybox.net
2014-06-08 18:18 ` bugzilla at busybox.net
2014-06-08 18:20 ` bugzilla at busybox.net
2014-06-10 12:40 ` bugzilla at busybox.net
2014-06-11 21:36 ` bugzilla at busybox.net
2014-06-22 13:52 ` bugzilla at busybox.net
2014-06-22 13:52 ` bugzilla at busybox.net
2014-06-29 13:14 ` bugzilla at busybox.net
2014-06-29 19:46   ` Mike Zick
2014-07-07 13:06 ` bugzilla at busybox.net
2014-07-17 18:00 ` bugzilla at busybox.net
2014-07-30 20:15 ` bugzilla at busybox.net
2014-07-30 22:41 ` bugzilla at busybox.net
2014-08-01 17:22 ` bugzilla at busybox.net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140608070329.A41679CEEE@busybox.osuosl.org \
    --to=bugzilla@busybox.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.