Summary: | sys-apps/busybox-1.36.1-r1 ld: read-only segment has dynamic relocations | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | René Rhéaume <rene.rheaume> |
Component: | Current packages | Assignee: | Embedded Gentoo Team <embedded> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bkohler, ceamac, rene.rheaume |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=928250 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
emerge --info output Ebuild patch |
Description
René Rhéaume
2024-06-07 19:10:01 UTC
Created attachment 895333 [details]
build.log
Created attachment 895334 [details]
emerge --info output
emerge -pqv output: [ebuild N ] sys-apps/busybox-1.36.1-r1 USE="pam -debug -livecd -make-symlinks -math -mdev -savedconfig (-selinux) -sep-usr -static -syslog (-systemd)" Error message: /usr/lib/gcc/i686-pc-linux-musl/13/../../../../i686-pc-linux-musl/bin/ld: libbb/lib.a(hash_md5_sha256_x86-32_shaNI.o): warning: relocation in read-only section `.text.sha256_process_block64_shaNI' /usr/lib/gcc/i686-pc-linux-musl/13/../../../../i686-pc-linux-musl/bin/ld: read-only segment has dynamic relocations collect2: error: ld returned 1 exit status Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS. Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam" make: *** [Makefile:719: busybox_unstripped] Error 1 [31;01m*[0m ERROR: sys-apps/busybox-1.36.1-r1::gentoo failed (compile phase): [31;01m*[0m emake failed [31;01m*[0m [31;01m*[0m If you need support, post the output of `emerge --info '=sys-apps/busybox-1.36.1-r1::gentoo'`, [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-apps/busybox-1.36.1-r1::gentoo'`. [31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-apps/busybox-1.36.1-r1/temp/build.log'. [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-apps/busybox-1.36.1-r1/temp/environment'. [31;01m*[0m Working directory: '/var/tmp/portage/sys-apps/busybox-1.36.1-r1/work/busybox-1.36.1' [31;01m*[0m S: '/var/tmp/portage/sys-apps/busybox-1.36.1-r1/work/busybox-1.36.1' Could this be related to bug 928250 ? I'm seeing this on the x86 admincd build as well: /usr/libexec/gcc/i686-pc-linux-gnu/ld: coreutils/lib.a(mktemp.o): in function `mktemp_main': mktemp.c:(.text.mktemp_main+0xaf): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' /usr/libexec/gcc/i686-pc-linux-gnu/ld: coreutils/lib.a(mktemp.o): note: the message above does not take linker garbage collection into account /usr/libexec/gcc/i686-pc-linux-gnu/ld: libbb/lib.a(hash_md5_sha256_x86-32_shaNI.o): warning: relocation in read-only section `.text.sha256_process_block64_shaNI' /usr/libexec/gcc/i686-pc-linux-gnu/ld: read-only segment has dynamic relocations collect2: error: ld returned 1 exit status Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS. Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam" make: *** [Makefile:719: busybox_unstripped] Error 1 * ERROR: sys-apps/busybox-1.36.1-r2::gentoo failed (compile phase): * emake failed Possibly related to these? http://lists.busybox.net/pipermail/busybox/2023-January/090078.html https://www.mail-archive.com/busybox@busybox.net/msg28952.html Does https://git.alpinelinux.org/aports/tree/main/busybox/0025-Hackfix-to-disable-HW-acceleration-for-MD5-SHA1-on-x.patch help then? Yes this patch does work, build is successful. I hadn't found any patch so I attempted to disable some of those bits via savedconfig without success. Created attachment 896530 [details, diff] Ebuild patch Using the code patch linked in comment #7. With it, I am able to use Busybox as init to try check my login issue (which is not yet fixed). The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a760727c2c9e90293c566060a90f5aedce48bdda commit a760727c2c9e90293c566060a90f5aedce48bdda Author: Viorel Munteanu <ceamac@gentoo.org> AuthorDate: 2024-07-05 05:34:18 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2024-07-05 05:42:48 +0000 sys-apps/busybox: skip some dynamic relocations on 32-bit i386 Disable using HW sha1 and sha256 on 32 bit i386. This caused musl build to fail. The code only worked on SSSE CPUs. Closes: https://bugs.gentoo.org/933771 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> ...x-1.36.1-r2.ebuild => busybox-1.36.1-r3.ebuild} | 2 + .../busybox-1.36.1-skip-dynamic-relocations.patch | 43 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) Typo, I meant SSSE3 |