From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] gnutls: Fix search path for libgcrypt
Date: Sat, 12 May 2012 21:07:55 +0200 [thread overview]
Message-ID: <20120512210755.672039a4@skate> (raw)
In-Reply-To: <1336847275-21899-1-git-send-email-arnout@mind.be>
Hello,
Le Sat, 12 May 2012 20:27:55 +0200,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> a ?crit :
> In some configurations, the --with-libgcrypt-prefix configure option
> causes the default library search path to be disabled completely,
> so the compiler can't find libc etc.
>
> Fixes http://autobuild.buildroot.net/results/52a227e8a8723b7914a37d9b3519da5fd2a2844a/
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Are you sure it fixes the problem?
Last WE, I started investigating the problem, and found out that just
compiling gnutls wasn't enough to reproduce the problem. The problem
was starting to occur when libintl was built before libgcrypt. In this
case, libgcrypt.la had -lintl in its dependencies, and in turn,
libintl.la had -lc in its dependencies. Then, libtool expands this -lc
into the full path to libc.so.
However, libc.so is a linker script which contains a reference
to /lib/libc.so.0. And unfortunately, there is a binutils bug that
makes it behave differently:
* If a linker script is referenced using -lc, then it correctly
prepends the paths in the linker script by the sysroot path;
* If a linker script is referenced using its full path (as is done by
libtool), then binutils do not prepend the paths in the linker
script by the sysroot path, which leads the gnutls ./configure to
try to link against /lib/libc.so.0, which obviously doesn't exist.
Gustavo has patches for binutils that solve this bug, but the problem
remains for external toolchains. I am not sure how to fix the problem
properly.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-05-12 19:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 18:27 [Buildroot] [PATCH] gnutls: Fix search path for libgcrypt Arnout Vandecappelle
2012-05-12 19:07 ` Thomas Petazzoni [this message]
2012-05-12 20:07 ` Arnout Vandecappelle
2012-05-13 7:02 ` Thomas Petazzoni
2012-05-14 19:14 ` Peter Korsgaard
2012-05-15 6:27 ` Arnout Vandecappelle
2012-05-15 7:44 ` Peter Korsgaard
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=20120512210755.672039a4@skate \
--to=thomas.petazzoni@free-electrons.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