Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666690 - sys-apps/busybox-1.29.3 fails with USE=static
Summary: sys-apps/busybox-1.29.3 fails with USE=static
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-21 11:26 UTC by ykui
Modified: 2023-03-01 07:38 UTC (History)
3 users (show)

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


Attachments
emerge -pv '=sys-apps/busybox-1.29.3::gentoo' (file_666690.txt,378 bytes, text/plain)
2018-09-21 11:26 UTC, ykui
Details
build.log (build.log,563.33 KB, text/plain)
2018-09-21 11:27 UTC, ykui
Details
USE="static" emerge --info '=sys-apps/busybox-1.29.3::gentoo' (file_666690.txt,6.91 KB, text/plain)
2018-09-21 20:46 UTC, ykui
Details
/etc/nsswitch.conf (file_666690.txt,442 bytes, text/plain)
2018-09-22 12:18 UTC, ykui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ykui 2018-09-21 11:26:47 UTC
Created attachment 547474 [details]
emerge -pv '=sys-apps/busybox-1.29.3::gentoo'

Building sys-apps/busybox-1.29.3 fails for me if the static USE-flag is set (which it was by default).
Comment 1 ykui 2018-09-21 11:27:56 UTC
Created attachment 547476 [details]
build.log
Comment 2 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-09-21 19:40:53 UTC
I do not really understand, can you post full emerge --info ?
Comment 3 ykui 2018-09-21 20:46:50 UTC
Created attachment 547502 [details]
USE="static" emerge --info '=sys-apps/busybox-1.29.3::gentoo'

sure

My installed version of busybox is with the useflag -static
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-09-22 08:16:25 UTC
For the first look, it looks like not a bug, but missconfiguration.

Please show your /etc/nsswitch.conf
Comment 5 ykui 2018-09-22 12:18:25 UTC
Created attachment 547516 [details]
/etc/nsswitch.conf
Comment 6 Reanoyer 2019-04-22 04:44:58 UTC
can reproduce in my new install. But in the older it doesn't happens.

I'll show the differences from one to another system
diff emerge.good emerge.bad (emerge --info)

1c1
< Portage 2.3.64 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop, gcc-8.3.0, glibc-2.29-r2, 5.0.7 x86_64)
---
> Portage 2.3.64 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop, gcc-8.3.0, glibc-2.29-r2, 4.20.16-112.current x86_64)
3,5c3,5
< System uname: Linux-5.0.7-x86_64-AMD_Ryzen_3_2200G_with_Radeon_Vega_Graphics-with-gentoo-2.6
< KiB Mem:     8160772 total,   3751896 free
< KiB Swap:    8191996 total,   8191996 free
---
> System uname: Linux-4.20.16-112.current-x86_64-Intel-R-_Core-TM-_i5-6200U_CPU_@_2.30GHz-with-gentoo-2.6
> KiB Mem:     7576192 total,    775244 free
> KiB Swap:          0 total,         0 free
9c9
< ld GNU ld (Gentoo 2.32 p2) 2.32.0
---
> ld GNU gold (Gentoo 2.31.1 p5 2.31.1) 1.16
11d10
< ccache version 3.6 [enabled]
13d11
< dev-java/java-config:     2.2.0-r4::gentoo
16,18d13
< dev-util/ccache:          3.6::gentoo
< dev-util/cmake:           3.14.2::gentoo
< dev-util/pkgconfig:       0.29.2::gentoo
22c17
< sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
---
> sys-devel/autoconf:       2.69-r4::gentoo
24c19
< sys-devel/binutils:       2.32-r1::gentoo
---
> sys-devel/binutils:       2.31.1-r4::gentoo, 2.32-r1::gentoo
39,48d33
< flatpak-overlay
<     location: /var/lib/layman/flatpak-overlay
<     masters: gentoo
<     priority: 50
< 
< steam-overlay
<     location: /var/lib/layman/steam-overlay
<     masters: gentoo
<     priority: 50
< 
60c45
< FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
---
> FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
63c48
< LANG="es_ES.utf8"
---
> LANG="en_US.UTF-8"



diff /etc/nsswitch.conf nsswitch.conf.bad 

no differences in the nsswitch file
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2020-12-17 17:46:13 UTC
The real bug here is probably a mismatch (or a codegen bug) between implementation of '__x86_return_thunk' in libselinux and busybox:

/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../lib64/libselinux.a(booleans.o): in function `__x86_return_thunk':
(.text.__x86_indirect_thunk[__x86_indirect_thunk]+0x0): multiple definition of `__x86_return_thunk'; libbb/lib.a(appletlib.o):appletlib.c:(.text.__x86_return_thunk[__x86_return_thunk]+0x0): first defined here

That sounds like a '__x86_indirect_thunk' being place in normal (non-common) section at least in one of two lirbaries. Or symbol sizes are different.

It probably comes from 'CFLAGS="... -mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-register"'.

1. Does it still happen for you?
2. Does it still happen if you rebuild /lib64/libselinux.a?
Comment 8 Viorel Munteanu gentoo-dev 2022-04-17 13:36:30 UTC
Could not reproduce this in 1.34.1.  Does it still happen?
Comment 9 ykui 2022-06-19 10:47:42 UTC
busybox-1.34.1 successfully builds for me with USE="-pam static".
Comment 10 ykui 2022-06-19 10:48:51 UTC
(more specifically USE=ipv6 selinux static)