From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libcap: fix build of host variant on systems without static libc
Date: Wed, 9 Sep 2020 23:12:23 +0200 [thread overview]
Message-ID: <20200909231223.56548dc3@windsurf.hq.k.grp> (raw)
In-Reply-To: <20200904210137.GO14354@scaer>
Hello,
On Fri, 4 Sep 2020 23:01:37 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> On 2020-09-04 17:15 +0200, Thomas Petazzoni spake thusly:
> > Since the bump to 2.42 in 241e3bdea8b68b3ce78b1b76db29019fdcbb7b05,
> > the host variant of libcap fails to build on systems that don't have
> > the static variant of the C library installed. Indeed, libcap tries to
> > build test programs statically, which fails with:
> >
> > /usr/bin/ld: cannot find -lc
> > collect2: error: ld returned 1 exit status
> >
> > This commit fixes that by:
> >
> > (1) Adding a patch, submitted upstream, which makes the
> > tests/Makefile obey the same DYNAMIC variable as the one used by
> > progs/Makefile.
>
> But then it means that tests will run with a system-wide version of
> libcap if that exists, or would fail to run at all if libcap is not
> installed in the system, both really not being what is expected of
> the tests, I would think. So upstream will probably not be that thrilled
> about that patch, I'm afraid...
>
> But seeing how some tests are run udner sudo, we can't use
> LD_LIBRARY_PATH.
>
> Instead, I think we should womething like -Wl,-rpath,'$$ORIGN/../libcap'
>
> Unless I missed something?
I have sent a new version of the patch, which uses fixes from upstream,
and for the tests, they use LD_LIBRARY_PATH to use the locally
available shared library.
See https://patchwork.ozlabs.org/project/buildroot/patch/20200909210250.1093461-1-thomas.petazzoni at bootlin.com/
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2020-09-09 21:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 15:15 [Buildroot] [PATCH] package/libcap: fix build of host variant on systems without static libc Thomas Petazzoni
2020-09-04 21:01 ` Yann E. MORIN
2020-09-09 21:12 ` Thomas Petazzoni [this message]
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=20200909231223.56548dc3@windsurf.hq.k.grp \
--to=thomas.petazzoni@bootlin.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox