package/libcap: needs host-binutils
PATCH 1/1 package/libcap: needs host-binutils
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
--- package/libcap/libcap.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/libcap/libcap.mk +1 -1
@@ -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)" \
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Fabrice, All,
On 2021-09-05 11:09 +0200, Fabrice Fontaine spake thusly:
Quoted 21 lines
libcap needs a version of objcopy which supports --dump-section since bump to version 2.52 in commit
38b0759432070f7a57c0fab84d44a07caead6f06and
https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/commit/?id=ee3b25c0a877fa74d1aec88f325ac45b09963c82objcopy --dump-section .interp=loader.txt empty
/dev/null
objcopy: unrecognized option '--dump-section'Fixes:
- http://autobuild.buildroot.org/results/88cc2be14a5f134dc2aa22ca838836dc11e39930Signed-off-by Fabrice Fontaine <[email protected]>--- package/libcap/libcap.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/libcap/libcap.mk +0
-0
package/libcap/libcap.mk LIBCAP_CPE_ID_VENDOR = libcap_project · line 17
Quoted 5 lines
package/libcap/libcap.mk +1
-1@@ -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.txtOf 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.txtThat 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.
Quoted 9 lines
package/libcap/libcap.mk +0
-0LIBCAP_MAKE_FLAGS = \ CROSS_COMPILE="$(TARGET_CROSS)" \Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | 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 [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot