# Fail to compile kernel in Freebsd 7.0 R



## ohcarol (Feb 18, 2009)

Hello all,
  I am trying to build custom kernel with Freebsd 7.0 RC. Whenever I issue the make -j2 buildkernel KERNCONF=MYKERNEL command it gives out the following error:


===> zlib (all)
cc -O2 -fno-strict-aliasing -pipe  -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/PROXY/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/PROXY -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/zlib/../../net/zlib.c
ld  -d -warn-common -r -d -o zlib.kld zlib.o
:> export_syms
awk -f /usr/src/sys/modules/zlib/../../conf/kmod_syms.awk zlib.kld  export_syms | xargs -J% objcopy % zlib.kld
ld -Bshareable  -d -warn-common -o zlib.ko.debug zlib.kld
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols zlib.ko.debug zlib.ko
===> zyd (all)
cc -O2 -fno-strict-aliasing -pipe  -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/PROXY/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/usr/obj/usr/src/sys/PROXY -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/zyd/../../dev/usb/if_zyd.c
ld  -d -warn-common -r -d -o if_zyd.kld if_zyd.o
:> export_syms
awk -f /usr/src/sys/modules/zyd/../../conf/kmod_syms.awk if_zyd.kld  export_syms | xargs -J% objcopy % if_zyd.kld
ld -Bshareable  -d -warn-common -o if_zyd.ko.debug if_zyd.kld
objcopy --only-keep-debug if_zyd.ko.debug if_zyd.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=if_zyd.ko.symbols if_zyd.ko.debug if_zyd.ko
1 error
*** Error code 2
1 error
*** Error code 2
1 error


----------



## r-c-e (Feb 18, 2009)

tried running without multiple threads?


----------



## DutchDaemon (Feb 18, 2009)

Did you clear out /usr/obj before you started building (again)? And are you sure your kernel sources haven't been updated in the meantime? You'll have to rebuild world before building a kernel in that case.


----------



## Mel_Flynn (Feb 18, 2009)

ohcarol said:
			
		

> Hello all,
> I am trying to build custom kernel with Freebsd 7.0 RC. Whenever I issue the make -j2 buildkernel KERNCONF=MYKERNEL command it gives out the following error:


No, that's not the error. Rebuild without -j2 then you'll see the error. *Always* do that before posting a problem, unless you're sure it's caused by -j2.


----------



## ohcarol (Feb 19, 2009)

Thanks all,
 make without -j help to solve the problem.


----------

