unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: 31970@debbugs.gnu.org
Subject: bug#31970: epiphany: Strange "XXXXXXXXXXXXX..." entries in library RPATHs
Date: Tue, 26 Jun 2018 14:48:52 +0200	[thread overview]
Message-ID: <87r2kt4ssr.fsf@gnu.org> (raw)
In-Reply-To: <878t725xyt.fsf@netris.org> (Mark H. Weaver's message of "Mon, 25 Jun 2018 17:59:38 -0400")

Hi Mark,

Mark H Weaver <mhw@netris.org> skribis:

> which also changed the build-system from 'glib-or-gtk-build-system' to
> 'meson-build-system', warnings started appearing in the build logs for
> epiphany complaining about "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
> appearing in the RPATH of the built libraries.

I suspect the only way those XXX can end up here is if Meson adds them
through -Wl,-rpath.  And indeed, it does!  From compilers.py:

--8<---------------cut here---------------start------------->8---
    def build_unix_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
        if not rpath_paths and not install_rpath and not build_rpath:
            return []
        # The rpaths we write must be relative, because otherwise
        # they have different length depending on the build
        # directory. This breaks reproducible builds.
        rel_rpaths = []
        for p in rpath_paths:
            if p == from_dir:
                relative = '' # relpath errors out in this case
            else:
                relative = os.path.relpath(os.path.join(build_dir, p), os.path.join(build_dir, from_dir))
            rel_rpaths.append(relative)
        paths = ':'.join([os.path.join('$ORIGIN', p) for p in rel_rpaths])
        # Build_rpath is used as-is (it is usually absolute).
        if build_rpath != '':
            if paths != '':
                paths += ':'
            paths += build_rpath
        if len(paths) < len(install_rpath):
            padding = 'X' * (len(install_rpath) - len(paths))
            if not paths:
                paths = padding
            else:
                paths = paths + ':' + padding
--8<---------------cut here---------------end--------------->8---

So AIUI, those XXX are here precisely so we can overwrite the RUNPATH at
installation time with the final RUNPATH (this works around the fact
that Meson, unlike Libtool, doesn’t relink files upon install.)

We should take advantage of this in ‘meson-build-system’, or maybe we
don’t need to do anything?

> See below for the relevant excerpt of the build log.  Note also the
> RPATH entries preceeding "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
> beginning with "$ORIGIN/".  I'm not sure if those are a problem or not.

Use of $ORIGIN is fine.

Thanks,
Ludo’.

  reply	other threads:[~2018-06-26 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 21:59 bug#31970: epiphany: Strange "XXXXXXXXXXXXX..." entries in library RPATHs Mark H Weaver
2018-06-26 12:48 ` Ludovic Courtès [this message]
2021-09-13  3:50 ` Sarah Morgensen

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87r2kt4ssr.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=31970@debbugs.gnu.org \
    --cc=mhw@netris.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).