unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Peter Mikkelsen <petermikkelsen10@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28444-done@debbugs.gnu.org
Subject: [bug#28444] [PATCH 3/3] build-system: Add 'meson-build-system'.
Date: Sat, 16 Sep 2017 19:06:03 +0200	[thread overview]
Message-ID: <CADh9keV1P7DdsmEHdG9QgfcDDPJQmTme=iXtnguaLX92S00Xzg@mail.gmail.com> (raw)
In-Reply-To: <87ingik4hc.fsf@gnu.org>

2017-09-16 18:11 GMT+02:00 Ludovic Courtès <ludo@gnu.org>:
>
> Hi Peter,
>
> Peter Mikkelsen <petermikkelsen10@gmail.com> skribis:
>
>
> [...]
>
> >> According to this description, half of it corresponds to the
> >> ‘validate-runpath’ phase, no?
> >
> > To my understanding 'validate-runpath' just checks and complains, but
> > this phase checks if it can find any dependencies in directories that
> > are local to the package, and if it can, it adds them to the runpath.
> > I have tried to update the description :)
>
> I see.  Out of curiosity, which libraries did you find to be present in
> RUNPATH but not in NEEDED?
>


I tried building a simple program, and using 'patchelf --print-needed'
i got this:

libuuid.so
libstdc++.so.6
libgcc_s.so.1
libc.so.6

and without the shrinking done, the runpath looks like this:

/gnu/store/8y6wd2rfi6p3gpxcz3p1gyzsbxwyc9ha-uuid-cpp-0.6.5.1/lib:$ORIGIN/:/gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib:/gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib/lib:/gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/../../..

and with, it looks like this:

/gnu/store/nqdf6kr5cqfqh9z5yprar1yyfqwprj4v-uuid-cpp-0.6.5.1/lib:$ORIGIN/:/gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib:/gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib/lib

So the last part of the old runpath is removed, and looking at the
output of ldd, it seems like it was never needed:

linux-vdso.so.1 (0x00007ffd6cbe2000)
libuuid.so => /gnu/store/8y6wd2rfi6p3gpxcz3p1gyzsbxwyc9ha-uuid-cpp-0.6.5.1/lib/libuuid.so
(0x00007feae61bc000)
libstdc++.so.6 =>
/gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib/lib/libstdc++.so.6
(0x00007feae5e42000)
libgcc_s.so.1 =>
/gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib/lib/libgcc_s.so.1
(0x00007feae5c2b000)
libc.so.6 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libc.so.6
(0x00007feae588c000)
libm.so.6 => /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/libm.so.6
(0x00007feae557a000)
/gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25/lib/ld-linux-x86-64.so.2
(0x00007feae63c4000)

Now, I am not sure it is worth shrinking, but I just think it is a
little bit strange having unneeded directories in the runpath :)
While trying to build a gnome package, I noticed that the runpath was
huuuge before shrinking, but I don't have that package definition
anymore :/
We can see what happens when we update gnome :)
>
> I’d consider it a Meson bug (or a bug in how the package uses Meson) if
> test libraries are passed as -l when linking non-test binaries.
>

I don't know if this is what is happening, but on their side they
'fix' the runpath before install, which we don't.
If any problem arises I will be happy to give it a look, but in the
mean time, I think this will work :)

> At any rate, we should implement ‘shrink-runpath’ in (guix build
> gremlin) someday!

That would be awesome!
>
> > From 8185c2a154c7473d3b50351246cc83b792ec6a57 Mon Sep 17 00:00:00 2001
> > From: Peter Mikkelsen <petermikkelsen10@gmail.com>
> > Date: Wed, 13 Sep 2017 14:37:39 +0200
> > Subject: [PATCH] build-system: Add 'meson-build-system'.
> >
> > * Makefile.am (MODULES): Add 'guix/build-system/meson.scm' and
> >   'guix/build/meson-build-system.scm'.
> > * guix/build-system/meson.scm: New file.
> > * guix/build/meson-build-system.scm: New file.
> > * doc/guix.texi (Build Systems): Add 'meson-build-system'.
>
> Pushed with the changes below.
>
> Thank you!
>
> Now to upgrade GNOME?  :-)
Yes :) I will finish some ongoing Haskell work before giving it a shot
>
> Ludo’.
>

Thanks,
Peter

  reply	other threads:[~2017-09-16 17:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 12:48 [bug#28444] [PATCH 0/3] Add meson-build-system Peter Mikkelsen
2017-09-13 12:50 ` [bug#28444] [PATCH 1/3] gnu: meson: Update to 0.42.0 Peter Mikkelsen
2017-09-13 12:50   ` [bug#28444] [PATCH 2/3] gnu: Add meson-for-build Peter Mikkelsen
2017-09-15 20:57     ` Ludovic Courtès
2017-09-15 21:00       ` Peter Mikkelsen
2017-09-13 12:50   ` [bug#28444] [PATCH 3/3] build-system: Add 'meson-build-system' Peter Mikkelsen
2017-09-15 21:07     ` Ludovic Courtès
2017-09-16 11:08       ` Peter Mikkelsen
2017-09-16 16:11         ` bug#28444: " Ludovic Courtès
2017-09-16 17:06           ` Peter Mikkelsen [this message]
2017-09-17 13:19             ` [bug#28444] " Ludovic Courtès
2017-09-17 13:24               ` Peter Mikkelsen
2017-09-17 14:01               ` Peter Mikkelsen
2017-09-17 19:21                 ` Ludovic Courtès
2017-09-15 20:53   ` [bug#28444] [PATCH 1/3] gnu: meson: Update to 0.42.0 Ludovic Courtès

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='CADh9keV1P7DdsmEHdG9QgfcDDPJQmTme=iXtnguaLX92S00Xzg@mail.gmail.com' \
    --to=petermikkelsen10@gmail.com \
    --cc=28444-done@debbugs.gnu.org \
    --cc=ludo@gnu.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).