# Kernel Compiling Problem

## erojasv

Hi, i installed gentoo 2008.0 beta 2 without problems, but when i compile the kernel, with genkernel i have the next errors:

```
DOC BusyBox.1

  LINK busybox_unstripped

  DOC BusyBox.html

/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[1]: *** [busybox_unstripped] Error 1

make: *** [all] Error 2

* Gentoo Linux Genkernel; Version 3.4.9

* Running with options: --menuconfig --bootloader=grub all

* ERROR: Failed to compile the "all" target...

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any

* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and

* assign your bug to genkernel@gentoo.org. Please include

* as much information as you can in your bug report; attaching

* /var/log/genkernel.log so that your issue can be dealt with effectively.

*

* Please do *not* report compilation failures as genkernel bugs!

```

i use genkernel --menuconfig --bootloader=grub all

and the kernel version is 2.6.24-gentoo-r8, i try with 2.6.24-gentoo-r7 and i have the same errors,

----------

## d2_racing

Hi, I'm not using genkernel but are you sure that you can pass this option : --bootloader=grub

Try it without this option.

----------

## erojasv

Yes the genkernel accept this parameter and i tried without it, but i have same errors:

```
  AR cru shell/shell.a

  AR cru util-linux/util-linux.a

  AR cru e2fsprogs/e2fsprogs.a

  AR cru coreutils/libcoreutils/libcoreutils.a

  AR cru libbb/libbb.a

  DOC BusyBox.txt

  DOC BusyBox.1

  LINK busybox_unstripped

  DOC BusyBox.html

/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[1]: *** [busybox_unstripped] Error 1

make: *** [all] Error 2

* Gentoo Linux Genkernel; Version 3.4.9

* Running with options: --menuconfig all

* ERROR: Failed to compile the "all" target...

* -- Grepping log... --

* -- End log... --

```

I reinstalled busybox with version sys-apps/busybox-1.8.2

I was reading about this problem and the comments is about the glib package, if anobody can help about this problem

----------

## d2_racing

emerge --info plz

----------

## erojasv

Here is my emerge --info:

```
grimlock ~ # 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) Pentium(R) 4 CPU 3.06GHz

Timestamp of tree: Sat, 17 May 2008 18:30:03 +0000

app-shells/bash:     3.2_p17-r1

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r6

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

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -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/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LINGUAS="es en"

MAKEOPTS="-j2"

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="3dfx X Xaw3d acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cdr cjk cli cracklib crypt cups dbus djvu dmx dri dvd dvdr dvdread eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv isdnlog java jingle jpeg kde kdrive kerberos ldap libnotify livecd mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg openexr opengl openmp pam paste64 pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime rdesktop readline reflection ruby scanner sdl session speex spell spl ssl startup-notification svg tcpd theora tiff toolbar truetype unicode utempter vim-syntax vorbis wifi win32codecs x86 xcomposite xinerama xml xorg xprint xscreensaver 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es en" USERLAND="GNU" VIDEO_CARDS="vesa nv vga vmware v4l"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

----------

## erojasv

In this weekend, i build a gentoo system with stage3-i686 beta2 in other machine, and all work excellent, i compiled my kernel without problems, 2.6.24-r5 with genkernel.

The problem that i have is with an livecd 2008-beta2 installation, that i installed in my office machine, i can't compile the kernel 2.6.24-r7 and 2.6.24-r8 with genkernel because i have the errors, that i mentioned before, now i am trying with kernel 2.6.24-r4 xD

----------

## erojasv

hi?   :Confused: 

----------

## Matteo Azzali

only hint in the web for that issue is http://www.linuxforums.org/forum/linux-newbie/9482-usr-bin-ld-cannot-find-lc.html

Solution: re-emerge glibc before kernel

----------

## lawa42

Same Problem here I am recompiling glibc right now. In general there are a lot of things to recompile in 2008 beta.

Gregor

----------

## erojasv

thanks, im going to do it, i installed again gentoo 2008 beta with livecd installer and i compiled my kernel without genkernel and works fine, but with genkernel i get these errors, tomorrow in my office i am going to recompile glibc and try again genkernel

Thanks!

----------

