Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933771 - sys-apps/busybox-1.36.1-r1 ld: read-only segment has dynamic relocations
Summary: sys-apps/busybox-1.36.1-r1 ld: read-only segment has dynamic relocations
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-07 19:10 UTC by René Rhéaume
Modified: 2024-07-01 04:26 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,251.15 KB, text/plain)
2024-06-07 19:10 UTC, René Rhéaume
Details
emerge --info output (emerge-info.txt,5.78 KB, text/plain)
2024-06-07 19:38 UTC, René Rhéaume
Details
Ebuild patch (busybox-1.36.1-r1.ebuild.patch,717 bytes, patch)
2024-06-27 16:39 UTC, René Rhéaume
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description René Rhéaume 2024-06-07 19:10:01 UTC
To troubleshoot a login problem on a 32-bit musl I am installing (I'm at the last steps of the handbook. The system boots but does not let me login into), I am trying to install busybox to use it later for a single-user bootup. However, I am unable to build busybox.

Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/busybox
2.
3.
Actual Results:  
emake failed :-(

Expected Results:  
busybox merged on system
Comment 1 René Rhéaume 2024-06-07 19:10:39 UTC
Created attachment 895333 [details]
build.log
Comment 2 René Rhéaume 2024-06-07 19:38:46 UTC
Created attachment 895334 [details]
emerge --info output
Comment 3 René Rhéaume 2024-06-07 19:39:54 UTC
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'
Comment 4 René Rhéaume 2024-06-17 16:32:00 UTC
Could this be related to bug 928250 ?
Comment 5 Ben Kohler gentoo-dev 2024-06-21 11:59:13 UTC
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
Comment 8 Ben Kohler gentoo-dev 2024-06-26 12:08:23 UTC
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.
Comment 9 René Rhéaume 2024-06-27 16:39:21 UTC
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).