* [Buildroot] [PATCH 1/1] package/libcap: needs host-binutils
@ 2021-09-05 9:09 Fabrice Fontaine
2021-09-05 19:32 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-09-05 9:09 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine, Thomas Petazzoni
libcap needs a version of objcopy which supports --dump-section since
bump to version 2.52 in commit 38b0759432070f7a57c0fab84d44a07caead6f06
and
https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/commit/?id=ee3b25c0a877fa74d1aec88f325ac45b09963c82
objcopy --dump-section .interp=loader.txt empty /dev/null
objcopy: unrecognized option '--dump-section'
Fixes:
- http://autobuild.buildroot.org/results/88cc2be14a5f134dc2aa22ca838836dc11e39930
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/libcap/libcap.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk
index 45700e56ec..d8e685d1d7 100644
--- a/package/libcap/libcap.mk
+++ b/package/libcap/libcap.mk
@@ -14,7 +14,7 @@ LIBCAP_CPE_ID_VENDOR = libcap_project
LIBCAP_DEPENDENCIES = host-libcap host-gperf
LIBCAP_INSTALL_STAGING = YES
-HOST_LIBCAP_DEPENDENCIES = host-gperf
+HOST_LIBCAP_DEPENDENCIES = host-binutils host-gperf
LIBCAP_MAKE_FLAGS = \
CROSS_COMPILE="$(TARGET_CROSS)" \
--
2.33.0
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libcap: needs host-binutils
2021-09-05 9:09 [Buildroot] [PATCH 1/1] package/libcap: needs host-binutils Fabrice Fontaine
@ 2021-09-05 19:32 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2021-09-05 19:32 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Thomas Petazzoni, buildroot
Fabrice, All,
On 2021-09-05 11:09 +0200, Fabrice Fontaine spake thusly:
> libcap needs a version of objcopy which supports --dump-section since
> bump to version 2.52 in commit 38b0759432070f7a57c0fab84d44a07caead6f06
> and
> https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/commit/?id=ee3b25c0a877fa74d1aec88f325ac45b09963c82
>
> objcopy --dump-section .interp=loader.txt empty /dev/null
> objcopy: unrecognized option '--dump-section'
>
> Fixes:
> - http://autobuild.buildroot.org/results/88cc2be14a5f134dc2aa22ca838836dc11e39930
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/libcap/libcap.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk
> index 45700e56ec..d8e685d1d7 100644
> --- a/package/libcap/libcap.mk
> +++ b/package/libcap/libcap.mk
> @@ -14,7 +14,7 @@ LIBCAP_CPE_ID_VENDOR = libcap_project
> LIBCAP_DEPENDENCIES = host-libcap host-gperf
> LIBCAP_INSTALL_STAGING = YES
>
> -HOST_LIBCAP_DEPENDENCIES = host-gperf
> +HOST_LIBCAP_DEPENDENCIES = host-binutils host-gperf
Nope, that's not a good fix, because then the various binutils (ar, ld
et al.) will overwrite those from the toolchain. This is not an
acceptable situation for various reasons, the first being that we want
to avoid exactly the case where two packages overwrite the same file(s).
But technically, this would also lead to a situation where utilities
from the toolchains are partially changed, which means the resulting
toolchain would now be tainted.
host-binutils can only be used when using the internal toolchain.
Notice however that the failure only ev er occur on my autobuilder,
which is the very old Ubuntu 14.04 Trusty Tahr.
I wonder if the proper solution would be to instead "fix" libcap to use
a better construct that can support oldder binutils...
For example, I could whip up the following:
LD_TRACE_LOADED_OBJECTS=1 ./empty \
|sed -r -e '$!d; s/[[:space:]]+([^[:space:]]+)[[:space:]]+.*/\1/' \
>loader.txt
Of course, that is not as efficient nor as conpact as the surrent
upstream code, but it works everywhere...
Oh wait, it will probably break on non-glibc systems... Meh... So OK,
what about this:
readelf -p .interp empty \
|sed -r -e '\:.*(/.+)$:!d; s::\1:' \
>loader.txt
That will probably be a hard-sell to push upstream, though, because
--dump-section has been implemented in 2013, released in binutils 2.25,
but Ubuntu 14.04 only has binutils 2.24... Sigh... My autobuilder is
seriously getting old...
Regards,
Yann E. MORIN.
> LIBCAP_MAKE_FLAGS = \
> CROSS_COMPILE="$(TARGET_CROSS)" \
> --
> 2.33.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-05 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-05 9:09 [Buildroot] [PATCH 1/1] package/libcap: needs host-binutils Fabrice Fontaine
2021-09-05 19:32 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.