Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222161 - sys-apps/module-init-tools blows up with "can't find -lc"
Summary: sys-apps/module-init-tools blows up with "can't find -lc"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 222163 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-14 23:19 UTC by Craig Goodrich
Modified: 2009-06-22 23:52 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Goodrich 2008-05-14 23:19:04 UTC
I unmerged module-init-tools and then (realizing with horror my situation) did an emerge.  The ebuild blew up with "ld: can't find -lc".  "USE=-static emerge ..." didn't help.

Is this a regression?  Similar bugs were reported back in '03.

This is an x86-64 system.

How can I recover?  EEEK!

Reproducible: Always

Steps to Reproduce:
1.unmerge module-init-tools.
2.emerge module-init-tools
3.die like a dog.
Comment 1 Tristan Heaven (RETIRED) gentoo-dev 2008-05-15 00:06:01 UTC
*** Bug 222163 has been marked as a duplicate of this bug. ***
Comment 2 Craig Goodrich 2008-05-15 00:47:08 UTC
Apologies for the accidental duplicate entry.

This is the tail end of the ebuild:

x86_64-pc-linux-gnu-gcc  -O3 -pipe -march=athlon64 -Wunused -Wall   -o depmod  depmod.o moduleops.o tables.o zlibsupport.o -lz
if x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"module-init-tools\" -DVERSION=\"3.4\" -DCONFIG_USE_ZLIB=1  -I. -I.     -O3 -pipe -march=athlon64 -Wunused -Wall -MT modinfo.o -MD -MP -MF ".deps/modinfo.Tpo" -c -o modinfo.o modinfo.c; \
        then mv -f ".deps/modinfo.Tpo" ".deps/modinfo.Po"; else rm -f ".deps/modinfo.Tpo"; exit 1; fi
modinfo.c: In function 'main':
modinfo.c:345: warning: 'infosize' may be used uninitialized in this function
x86_64-pc-linux-gnu-gcc  -O3 -pipe -march=athlon64 -Wunused -Wall   -o modinfo  modinfo.o zlibsupport.o -lz
x86_64-pc-linux-gnu-gcc  -O3 -pipe -march=athlon64 -Wunused -Wall   -o insmod.static -static insmod.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [insmod.static] Error 1
 *
 * ERROR: sys-apps/module-init-tools-3.4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2473:  Called die
 * The specific snippet of code:
 *       emake || die "emake module-init-tools failed"
 *  The die message:
 *   emake module-init-tools failed
 *

By the way, I tried emerging glibc in the hope that a shiny new 64-bit libc.a might magically appear, but that blew up in configure:

checking for stdint.h... yes
checking for unistd.h... yes
checking for long double... yes
checking size of long double... configure: error: cannot compute sizeof (long double), 77

But posting one bug a day is my limit...
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-15 03:24:53 UTC
emerge --info too, please.
Comment 4 Craig Goodrich 2008-05-15 03:54:19 UTC
This is a relatively fresh install off the 2008 live CD on a HP 9700 laptop.


Portage 2.1.4.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24.7 x86_64)
=================================================================
System uname: 2.6.24.7 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-60
Timestamp of tree: Wed, 14 May 2008 21:03:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kerberos ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg tcpd tiff truetype unicode vorbis xml xorg xv zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Oliver Putz 2008-05-18 18:17:56 UTC
I am not sure if this is helpful, but I stumbled across the same bug (x86_64 too). I installed the system from the 2008beta liveCD and when I ran an emerge -e system afterwards, emerge failed in the already mentioned way. However, after I reemerged glibc, I could compile module-init-tools without problems.
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-20 22:16:58 UTC
I don't really see how this is an amd64 issue. 

@base-system: Please advise and add amd64@g.o back to CC if needed.
Comment 7 SpanKY gentoo-dev 2008-12-25 22:18:27 UTC
no -lc when building something static (like module-init-tools) means you have a neutered glibc ... i think the release team has fixed this issue in newer stages, so people who are affected just have to re-emerge glibc
Comment 8 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-26 13:43:04 UTC
There is a known issue with the 2008.0 amd64 livecd where all the static libs have been removed. We never looked too deeply into the issue to figure out why. As far as I know, this only affected people doing installs using the GUI installer from the 2008.0 amd64 livecd.
Comment 9 Frederic LIETART 2009-03-11 17:50:41 UTC
Fix to emerge glibc-2.8_p20080602-r1 ;)
Comment 10 Marat Radchenko 2009-03-20 19:17:20 UTC
Hit same bug with module-init-tools-3.5 on arm.
Comment 11 SpanKY gentoo-dev 2009-06-22 23:52:00 UTC
anyone who hits a static problem has a broken system.  the arch doesnt matter.

at any rate, considering this fixed as the latest catalyst should build things correctly and the latest module-init-tools no longer builds static binaries when USE=-static.