# cannot compile kernel[solved]

## Adel Ahmed

I have restore gentoo from a tar backup(it was a hot backup if that makes any difference), the system boots fine but I cannot compile my kernel anymore

localhost linux # make menuconfig

  HOSTCC  scripts/basic/fixdep

scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory

compilation terminated.

make[1]: *** [scripts/basic/fixdep] Error 1

make: *** [scripts_basic] Error 2

I though I'd try recompiling glibc:

*   failed to configure glibc

 * 

 * Call stack:

 *           ebuild.sh, line   93:  Called src_compile

 *         environment, line 3139:  Called eblit-run 'src_compile'

 *         environment, line  910:  Called eblit-glibc-src_compile

 *   src_compile.eblit, line  259:  Called src_compile

 *         environment, line 3139:  Called eblit-run 'src_compile'

 *         environment, line  910:  Called eblit-glibc-src_compile

 *   src_compile.eblit, line  267:  Called toolchain-glibc_src_compile

 *   src_compile.eblit, line  165:  Called glibc_do_configure 'nptl'

 *   src_compile.eblit, line  113:  Called die

 * The specific snippet of code:

 *   	"$@" || die "failed to configure glibc"

 * 

any help?

thanksLast edited by Adel Ahmed on Sat Jul 19, 2014 2:32 pm; edited 1 time in total

----------

## toralf

its glibc related :

```
$ equery b /usr/include/sys/types.h

 * Searching for /usr/include/sys/types.h ...

sys-libs/glibc-2.17 (/usr/include/sys/types.h)

```

or:

```
$ equery b /usr/lib/bcc/include/sys/types.h

 * Searching for /usr/lib/bcc/include/sys/types.h ...

sys-devel/dev86-0.16.19 (/usr/lib/bcc/include/sys/types.h)

```

----------

## Adel Ahmed

I can't recompile  glibc though

should I try downloading the file manually from another system?

----------

## NeddySeagoon

blakdeath,

horrible things will happen if you manage to downgrade glibc accidently.

If you have another box with the same glibc version, copy over the missing file.

If its more that one or two files, you will need a binary glibc for the same arch and the same version of glbc to fix it.

----------

## Adel Ahmed

well the entire sys directory was missing so I copied it over and everything is working now

it's a flaw in my backup scrip(--exclude=sys/) 

I'll work on that and deleted all my old backup images

thanks

----------

## toralf

???

/sys is (like /proc and /run) a dir which is fullfilled during boot of the kernel

----------

## Adel Ahmed

I was trying to exclude /sys from the image and /usr/include/sys got included by mistake

----------

## toralf

Ick - yeah - IIRC, I made a similar mistake, now I Prepend a "/" in my exclude files to avoid such things

----------

## BobWya

@tralf / @blakdeath,

Was hacking about and tar'd up a Gentoo install from laptop to fix my desktop install... Getting lots of weird errors. So it turns out all those guides telling me to use --exclude=sys are pretty dumb (if that string is just a path match)!! One actually said something along the lines of you don't need "/sys" just use "sys" blah, blah...

Thanks sorted out my compile errors!   :Cool: 

Robert

----------

