Unable to build new kernel on 8-STABLE

Hi,

When I try to build new kernel I get this error
Code:
===> aac (all)
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_pci.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_disk.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_cam.c
ld  -d -warn-common -r -d -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
-L VERSION -g -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
-L:No such file or directory
*** Error code 1

Stop in /usr/src/sys/modules/aac.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/obj/usr/src/sys/INFERNO.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
[1] /usr/src#

I can build kernel-toolchain and world without any problem. I am not sure where to look in order to resolve this.

My system details -

Code:
FreeBSD beastie.lst.org 8.2-STABLE FreeBSD 8.2-STABLE #0: Tue Jan 24 23:57:55 UTC 2012     root@:/usr/obj/usr/src/sys/BIATCHITUDESTEIN  amd64
 
Thanks for a quick reply. I tried GENERIC but I get same error.

Code:
===> aac (all)
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_pci.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_disk.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_cam.c
ld  -d -warn-common -r -d -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
-L VERSION -g -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
-L:No such file or directory
*** Error code 1

Stop in /usr/src/sys/modules/aac.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

Other than perl version there is nothing in /etc/make.conf
 
Since you are running 8.2-STABLE there is a possibility of something being wrong with your source tree.

I would suggest updating your source tree again, possibly to 8.3-PRERELEASE and try again.
 
Thanks again for prompt reply. I dont think I need 8.3-PRERELEASE. I have a lot of things running on current system including tinderbox, webserver, etc. I have problem with ULF scheduler and thinking of switching to SCHED_4BSD. My system lags with default ULF. It takes 9 minutes and 10 seconds to boot and thereafter at times it goes unresponsive even when processor is idle. How do I go back to my old source on which I built 8.2-STABLE?
 
Is there anything in src.conf that might interfere?
 
This reminds me what happened to my FreeBSD box about 6 months ago when it was running 8.2-STABLE.

I got kernel compilation errors, sort of random errors. I asked help around and suspected the hardware of my FreeBSD box first. I cleaned dirt, fans, unplug and plug memory sticks, reconnected hard disk cables etc.

However, the compilation kept failing due to some random errors. So I sort of gave up. But one day I did cvsup then the lastest 8.2-STABLE source tree and tried again, and this time it compiled without an error.

I still don't know the reason for the compilation errors, but since then I have not had a problem in compiling kernels. I update my FreeBSD like every 2 months. My FreeBSD box is now FreeBSD 9.0-STABLE.
 
Code:
[color="Red"]-L VERSION[/color] -g -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o

That VERSION string doesn't sound right. Try to re-cvsup and try again. It's also important which version did you source (not only which one you're running).
 
Thanks for the replies. I will remove the current sources and csup again. Will let you know what happens.
Is there anything in src.conf that might interfere?
I have not done anything to src.conf
 
I removed the sources and obtained new source tree but I still get the same error
Code:
===> aac (all)
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include
 /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common
 -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include
 /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common
 -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_pci.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include
 /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common
 -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_disk.c
cc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include
 /usr/obj/usr/src/sys/INFERNO/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common
 -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/INFERNO -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -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/aac/../../dev/aac/aac_cam.c
ld  -d -warn-common -r -d -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
-L VERSION -g -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
-L:No such file or directory
*** Error code 1

Stop in /usr/src/sys/modules/aac.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/obj/usr/src/sys/INFERNO.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
[6] /usr/src#
 
There might be something wrong with the Mk files in /usr/share/mk/.

Try doing a # make buildenv in /usr/src/.
 
After a bit of digging I think I know where this stuff comes from. Don't know how to fix it yet though :e

Code:
-L VERSION -g -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o

Lets break it down. /usr/share/sys.mk adds the "-L VERSION" and "-g" as CTFFLAGS. Both bsd.lib.mk and bsd.prog.mk use it as:
Code:
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJ}
This fits nicely. But for some reason the ctfmerge(1) command is missing from that line.
 
I don't know yet. Can you post the output of setenv(1)? That's assuming you're using csh(1).

If, for some reason, CTFMERGE has been defined it might explain the error.
 
@chigurh: I'm not that familiar with CTF, as far as I know it converts debug data to CTF format. Do you have dtrace enabled in your kernel config? If so, don't forget to add:

Code:
makeoptions WITH_CTF=1          # dtrace prereq

in your kernel config.
 
Having been experimenting with tinderbox the last couple of days here is something that may help. Which I am still exploring further. This is on a corei5 with an amd64 base system.

I found an issue building dirac on some tinderbox builds with i386 arch. I found setting CPUTYPE resolves the build.

Setting CPUTYPE to i486 or nocona works
Setting CPUTYPE to i386, generic or native fails
 
I removed Dtrace support from Kernel and make.conf, it builds now. I need DTrace support for kernel and userland, what do I do?
 
chigurh said:
I removed Dtrace support from Kernel and make.conf, it builds now. I need DTrace support for kernel and userland, what do I do?

I have only 9.0 at hand, so I can't tell 100% for 8.3. But look here at dtrace wiki. All information is there.
 
Back
Top