Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] genkernel busybox "Library m is needed"
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tux's lil' helper
Tux's lil' helper

Joined: 13 Aug 2004
Posts: 79

PostPosted: Tue Dec 29, 2015 2:42 pm    Post subject: [solved] genkernel busybox "Library m is needed" Reply with quote

I'm trying to install fresh Gentoo on x64 platform. (from livedvd-amd64-multilib-20140826.iso)
The problem part is kernel compilation with genkernel (gentoo-sources) especially initramfs building. It breaks with:
* Library m is needed, can't exclude it (yet)
*Final link with: m
*Output of:
*gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lm -Wl,--end-group -Wl,--warn-common -Wl,-Map, -Wl,--verbose
*collect2: error: ld terminated with signal 6 [Прекъснат]
*    *(.text.unlikely .text.*_unlikely .text.unlikely.*)
*    *(.text.exit .text.exit.*)
*    *(.text.startup .text.startup.*)
*    *(*)
*    *(.text .stub .text.* .gnu.linkonce.t.*)
*    /* .gnu.warning sections are handled specially by elf32.em.  */
*    *(.gnu.warning)
*опита да се отвори e2fsprogs/lib.a успя
*опита да се отвори editors/lib.a успя
*опита да се отвори findutils/lib.a успя
*опита да се отвори init/lib.a успя
*опита да се отвори libbb/lib.a успя
*Makefile:715: recipe for target 'busybox_unstripped' failed
*make: *** [busybox_unstripped] Error 1

I search google and realized that m is libm which is part of glibc, then I recompiled glibc and busybox without any success. There are required files in /lib64:
livecd / # ls -l /lib64/libm*
-rwxr-xr-x 1 root root 1050736 29 дек 14,39 /lib64/
-rwxr-xr-x 1 root root   14384 29 дек 14,39 /lib64/
lrwxrwxrwx 1 root root      17 27 дек 16,32 /lib64/ ->
-rwxr-xr-x 1 root root  296368 27 дек 16,32 /lib64/
lrwxrwxrwx 1 root root      12 29 дек 14,38 /lib64/ ->

Any ideas?

Last edited by SunHateR on Tue Dec 29, 2015 7:23 pm; edited 1 time in total
Back to top
View user's profile Send private message

Joined: 01 Jul 2004
Posts: 7530
Location: almost Mile High in the USA

PostPosted: Tue Dec 29, 2015 6:42 pm    Post subject: Reply with quote

I recall the "Library m is needed, can't exclude it (yet)" is normal during building busybox. It's trying to reduce as many libraries it can to reduce the size of the library.

This is the error we need to look at:

*collect2: error: ld terminated with signal 6 [Прекъснат]

This is sigabrt. Now unfortunately I'm not sure why ld would abort, seems like an ld bug or something is corrupt. Try rebuilding binutils (doubt that's the problem). emerge --info would be helpful to see what version of the tools you're using.

The livedvd you're using is kind of old, but if you used a fresh stage then it should be OK...
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tux's lil' helper
Tux's lil' helper

Joined: 13 Aug 2004
Posts: 79

PostPosted: Tue Dec 29, 2015 7:06 pm    Post subject: Reply with quote

Portage 2.2.24 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 3.15.6-aufs-r1 x86_64)
System uname: Linux-3.15.6-aufs-r1-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-2.2
KiB Mem:     1923984 total,    339400 free
KiB Swap:   10485756 total,  10300788 free
Timestamp of repository gentoo: Mon, 28 Dec 2015 21:30:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.4::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

CFLAGS="-march=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl seccomp session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

binutils rebuild didn't help. I started "emerge --emptytree world" yesterday. It's about to finish ;]
This is the latest livedvd. Next step is to try with minimal CD. Yes, stage3 is fresh.
Back to top
View user's profile Send private message
Tux's lil' helper
Tux's lil' helper

Joined: 13 Aug 2004
Posts: 79

PostPosted: Tue Dec 29, 2015 7:23 pm    Post subject: Reply with quote

Well, it works now... I'm not sure how it be done. I remind that I was set custom localization (eselect locale) and I tried with:
LC_ALL=C genkernel initramfs

and it works.
Thank you anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum