* [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target
@ 2020-06-18 17:35 Andreas Hilse
2020-06-18 19:10 ` Thomas Petazzoni
2020-06-18 19:14 ` Baruch Siach
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Hilse @ 2020-06-18 17:35 UTC (permalink / raw)
To: buildroot
Hi,
I found an issue with buildroot 2020.02.x concerning iproute2 binaries
being linked against libelf.
According to iproute2.mk it should only link against libelf if
BR2_PACKAGE_ELFUTILS is selected.
But it also links against libelf without that option selected and thus
renders the created binaries unusable in the target system.
After digging further I found that this is due to the iproute2 configure
script detecting libelf being available in the used toolchain
(crosstool-ng companion library).
After finding out I can work around this issue.
I thought this might be a thing to be addressed in buildroot, but I'm not
sure how to approach it.
Best regards
Andreas Hilse
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target
2020-06-18 17:35 [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target Andreas Hilse
@ 2020-06-18 19:10 ` Thomas Petazzoni
2020-06-18 19:14 ` Baruch Siach
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2020-06-18 19:10 UTC (permalink / raw)
To: buildroot
On Thu, 18 Jun 2020 19:35:48 +0200 (CEST)
Andreas Hilse <andreas.hilse@ipcomm.de> wrote:
> I found an issue with buildroot 2020.02.x concerning iproute2 binaries
> being linked against libelf.
>
> According to iproute2.mk it should only link against libelf if
> BR2_PACKAGE_ELFUTILS is selected.
> But it also links against libelf without that option selected and thus
> renders the created binaries unusable in the target system.
>
> After digging further I found that this is due to the iproute2 configure
> script detecting libelf being available in the used toolchain
> (crosstool-ng companion library).
So your crosstool-ng toolchain comes with more libraries than just the
C library ? Buildroot really expects external toolchains to be "pure"
toolchains, i.e with only the C library and no other additional library.
> After finding out I can work around this issue.
> I thought this might be a thing to be addressed in buildroot, but I'm not
> sure how to approach it.
There is no provision in the iproute2 configure script to explicitly
disable a functionality. So we would have to patch this configure
script.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target
2020-06-18 17:35 [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target Andreas Hilse
2020-06-18 19:10 ` Thomas Petazzoni
@ 2020-06-18 19:14 ` Baruch Siach
2020-06-19 6:31 ` Andreas Hilse
1 sibling, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2020-06-18 19:14 UTC (permalink / raw)
To: buildroot
Hi Andreas,
On Thu, Jun 18 2020, Andreas Hilse wrote:
> I found an issue with buildroot 2020.02.x concerning iproute2 binaries
> being linked against libelf.
>
> According to iproute2.mk it should only link against libelf if
> BR2_PACKAGE_ELFUTILS is selected.
> But it also links against libelf without that option selected and thus
> renders the created binaries unusable in the target system.
>
> After digging further I found that this is due to the iproute2 configure
> script detecting libelf being available in the used toolchain
> (crosstool-ng companion library).
>
> After finding out I can work around this issue.
> I thought this might be a thing to be addressed in buildroot, but I'm not
> sure how to approach it.
Section 6.1.2 in the Buildroot manual says this:
We do not support toolchains or SDK generated by OpenEmbedded or
Yocto, because these toolchains are not pure toolchains (i.e. just
the compiler, binutils, the C and C++ libraries).
https://buildroot.org/downloads/manual/manual.html#_cross_compilation_toolchain
Buildroot Can't support an external toolchain that provides its own
build of libelf, or any other library besides what gcc and the C library
provide.
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target
2020-06-18 19:14 ` Baruch Siach
@ 2020-06-19 6:31 ` Andreas Hilse
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Hilse @ 2020-06-19 6:31 UTC (permalink / raw)
To: buildroot
Thank you Thomas and Baruch for clarifying!
> Section 6.1.2 in the Buildroot manual says this:
>
> We do not support toolchains or SDK generated by OpenEmbedded or
> Yocto, because these toolchains are not pure toolchains (i.e. just
> the compiler, binutils, the C and C++ libraries).
>
>
> https://buildroot.org/downloads/manual/manual.html#_cross_compilation_to
> olchain
>
> Buildroot Can't support an external toolchain that provides its own
> build of libelf, or any other library besides what gcc and the C library
> provide.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-19 6:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-18 17:35 [Buildroot] iproute2 binaries getting linked against libelf, which is not available in target Andreas Hilse
2020-06-18 19:10 ` Thomas Petazzoni
2020-06-18 19:14 ` Baruch Siach
2020-06-19 6:31 ` Andreas Hilse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox