unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: setting LIBDIR_IN_LDCONFIG fails if /lib is a symlink to /usr/lib
Date: Sat, 26 May 2018 15:23:24 -0700	[thread overview]
Message-ID: <87h8mut5sz.fsf@tethera.net> (raw)


On my laptop, /lib is a symlink to to /usr/lib (this might or might not
be a good idea, but is likely to become increasingly common if some
people get their way).

$ /sbin/ldconfig -NX -v | grep -v ^$'\t'

yields

        /sbin/ldconfig: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
        /sbin/ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once
        /sbin/ldconfig: Path `/lib/x86_64-linux-gnu' given more than once
        /sbin/ldconfig: Path `/usr/lib/x86_64-linux-gnu' given more than once
        /sbin/ldconfig: Path `/usr/lib' given more than once
        /usr/lib/x86_64-linux-gnu/libfakeroot:
        /usr/local/lib:
        /lib/x86_64-linux-gnu:
        /sbin/ldconfig: /lib/x86_64-linux-gnu/ld-2.27.so is the dynamic linker, ignoring

        /lib:

with libdir=/usr/lib/x86_64-linux-gnu, our sed hackery fails, since the
directory we are looking for never appears at the beggining of a
line.

One option is to do more proccesing of the output and look for the path
in "given more than once" lines as well. Still, this is an obviously
fragile way of doing things (parsing human readable output from
ldconfig), so I wondered if anyone has some better ideas.

This informattion is used two places

1) to avoid adding an unecessary RPATH to the binary. Having such an RPATH will
cause at least Debian (and I suppose other distro) tooling to complain
loudly.

2) To know whether to run ldconfig after installing the library.

             reply	other threads:[~2018-05-26 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26 22:23 David Bremner [this message]
2018-05-27 16:33 ` setting LIBDIR_IN_LDCONFIG fails if /lib is a symlink to /usr/lib Tomi Ollila
2018-05-27 22:20   ` David Bremner
2018-05-28 11:41     ` Tomi Ollila
2018-05-30  3:04       ` [PATCH] configure: check for links to/from libdir in ldconfig output David Bremner
2018-05-30 11:37         ` Tomi Ollila
2018-05-30 12:24           ` David Bremner
2018-05-30 13:03             ` Tomi Ollila
2018-06-02 11:12               ` David Bremner

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87h8mut5sz.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).