From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/libarchive: fix linking issue with uClibc
Date: Thu, 28 Aug 2014 23:50:13 +0200 [thread overview]
Message-ID: <53FFA415.3080904@openwide.fr> (raw)
In-Reply-To: <20140825230356.7bebde3b@free-electrons.com>
Hi Thomas,
Le 25/08/2014 23:03, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
>
> On Sun, 24 Aug 2014 18:53:06 +0200, Romain Naour wrote:
>> With uClibc the dynamic linking loader functions needs
>> to be linked with -ldl
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/6af/6af140618b274536238b062635d493709905c8f6/build-end.log
>>
>> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
>> ---
>> package/libarchive/libarchive.mk | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk
>> index 8c6951d..ce3355c 100644
>> --- a/package/libarchive/libarchive.mk
>> +++ b/package/libarchive/libarchive.mk
>> @@ -68,4 +68,8 @@ else
>> LIBARCHIVE_CONF_OPT += --without-zlib
>> endif
>>
>> +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
>> +LIBARCHIVE_CONF_ENV += LIBS="-ldl"
>> +endif
>> +
>> $(eval $(autotools-package))
>
> I don't think this is the right fix, for several reasons:
>
> *) The problem only occurs due to the fact that bsdcpio and bsdtar are
> by default linked statically. When BR2_PREFER_STATIC_LIB is
> disabled, we should pass --enable-bsdtar=shared and
> --enable-bsdcpio=shared to ensure they are dynamically linked. This
> fixes the problem in the dynamic linking case.
>
> *) The problem is caused by the dependency of OpenSSL on libdl. So
> there is no need to always link against libdl: it should only be
> done when BR2_PREFER_STATIC_LIB=y and OpenSSL is enabled.
>
> *) I don't see why the problem would be uClibc specific.
>
> Generally speaking, it's annoying to have to teach all packages
> using OpenSSL that they should link against -ldl when doing static
> linking. It would be so much better if everyone was using pkg-config...
>
Ok, I misunderstood the problem, thanks for your explanations.
I'll try to fix this issue before the release.
Best regards,
Romain
next prev parent reply other threads:[~2014-08-28 21:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-24 16:53 [Buildroot] [PATCH 1/3] package/libevas-generic-loaders: needs zlib Romain Naour
2014-08-24 16:53 ` [Buildroot] [PATCH 2/3] package/libinput: fix build with libevdev Romain Naour
2014-08-25 18:12 ` Thomas Petazzoni
2014-08-25 21:01 ` Romain Naour
2014-08-26 9:13 ` Vicente Olivert Riera
2014-08-28 21:31 ` Romain Naour
2014-08-24 16:53 ` [Buildroot] [PATCH 3/3] package/libarchive: fix linking issue with uClibc Romain Naour
2014-08-25 21:03 ` Thomas Petazzoni
2014-08-28 21:50 ` Romain Naour [this message]
2014-08-25 18:08 ` [Buildroot] [PATCH 1/3] package/libevas-generic-loaders: needs zlib Thomas Petazzoni
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=53FFA415.3080904@openwide.fr \
--to=romain.naour@openwide.fr \
--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