LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 956|回复: 5

[求助] emerge mkinitrd 失败

[复制链接]
发表于 2008-5-25 22:01:20 | 显示全部楼层 |阅读模式
在网上搜了两天也没有解决,只好贴出来请大家帮忙看看,谢谢了!

错误提示如下:提示cannot find -lc,怎么会提示找不到libc呢?

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [nash] Error 1
*
* ERROR: sys-apps/mkinitrd-3.5.7-r3 failed.
* Call stack:
*               ebuild.sh, line   49:  Called src_compile
*             environment, line 2030:  Called die
* The specific snippet of code:
*       emake || die "nash compile failed.";
*  The die message:
*   nash compile failed.
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-apps/mkinitrd-3.5.7-r3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-apps/mkinitrd-3.5.7-r3/temp/environment'.
*


附录 emerge --info
gentoo ~ # emerge --info
Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r5 i686)
=================================================================
System uname: 2.6.24-gentoo-r5 i686 Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
Timestamp of tree: Sun, 25 May 2008 09:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
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.5, 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="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
CHOST="i686-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/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://61.135.158.199"
LANG="en_US.UTF-8"
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://61.135.158.199/gentoo-portage"
USE="X acl acpi alsa 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 mp3 mpeg mudflap 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 ssl startup-notification svg tcpd tiff truetype unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
发表于 2008-5-27 11:33:17 | 显示全部楼层
推荐genkernel,比手动编译方便,最后自动生成initrd.img(initramfs-genkernel-x86-2.6.xx-gentoo-rx)
使用genkernel --menuscript all一样达到make menuconfig的目的,当然也可以load .config
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-27 20:56:47 | 显示全部楼层
genkernel kernel可以成功,genkernel all 或者 genkernel initrd就报一样的错误,genkernel应该也是调用mkinitrd生成 initrd.img文件的
回复 支持 反对

使用道具 举报

发表于 2008-5-27 21:33:58 | 显示全部楼层
到 bugs.gentoo.org 看看吧!真不行上一个 Bug,再不行,重来一次。说不定是人品问题
回复 支持 反对

使用道具 举报

发表于 2008-5-27 21:46:14 | 显示全部楼层
Post by slurker;1855707
  genkernel应该也是调用mkinitrd生成 initrd.img文件的


那就要解决错误了。

另外:genkernel不需要mkinitrd
回复 支持 反对

使用道具 举报

发表于 2008-5-27 22:21:15 | 显示全部楼层
Post by slurker;1854955

错误提示如下:提示cannot find -lc,怎么会提示找不到libc呢?
cannot find -lc

ld属于系统开发工具的连接器。
更正:-lc应该是ld的选项:libc.a
你是应该从这里入手不错。
看看libc.a能否找到,哪个包提供
我的:locate libc.a
/usr/lib/libc.a


我也不知道是属于gcc的还是glibc-devel还是其它的,锁定范围不大了,我想就是编译环境不全。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表