# [solved] Compiling Kernel error

## skiwarz

I'm trying to compile my kernel sources (gentoo-sources-4.14.78), and I'm getting an error immediately upon issuing "make"...

I have gcc-7.3.0 installed and selected via gcc-config. However, it seems that "make" is trying to use gcc-6.4.0. Here's what it spits out:

```
  HOSTCC  scripts/basic/fixdep

  HOSTCC  arch/x86/tools/relocs_32.o

  HOSTCC  arch/x86/tools/relocs_64.o

  HOSTCC  arch/x86/tools/relocs_common.o

  HOSTLD  arch/x86/tools/relocs

  CHK     include/config/kernel.release

  CHK     include/generated/uapi/linux/version.h

  CHK     include/generated/utsrelease.h

  CC      kernel/bounds.s

  CHK     include/generated/bounds.h

  CHK     include/generated/timeconst.h

  CC      arch/x86/kernel/asm-offsets.s

  CHK     include/generated/asm-offsets.h

  CALL    scripts/checksyscalls.sh

  DESCEND  objtool

make[4]: *** No rule to make target '/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/stddef.h', needed by '/usr/src/linux-4.14.78-gentoo/tools/objtool/fixdep.o'.  Stop.

make[3]: *** [Makefile:43: /usr/src/linux-4.14.78-gentoo/tools/objtool/fixdep-in.o] Error 2

make[2]: *** [/usr/src/linux-4.14.78-gentoo/tools/build/Makefile.include:4: fixdep] Error 2

make[1]: *** [Makefile:62: objtool] Error 2

make: *** [Makefile:1652: tools/objtool] Error 2
```

How do I fix this so that it uses my installed compiler?

I've tried unmerging and then re-emerging the gentoo-sources, hoping that a "clean" emerge will set it up for the right compiler, but no joy there.

I've also re-emerged my gcc, binutils, and glibc.Last edited by skiwarz on Fri Nov 02, 2018 8:20 pm; edited 1 time in total

----------

## fedeliallalinea

Can help this?

----------

## skiwarz

 *fedeliallalinea wrote:*   

> Can help this?

 

Yep... did the trick. thanks!

----------

