Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

reporting worked around kernel build failures for 5.0.2



Hey guys. Today I was in the need to compile a kernel for various reasons so I figured while I was at it I would slim the generic kernel down to the bare minimals that i could conclude i need for use with vmware player.

Amongst doing so, I ran into kernel build errors.

The first error I don't readily have available though if someone would like me to reproduce it i'm quite confident I can. It showed itself when ipfilter devices and options where enabled along with a pf device. I got lucky by guessing that one quickly (it seems almost every one of my netbsd kernel building issues have stemmed from options/devices being enabled while another one is or is not, and for some reason 'config' is not catching the majority of these issues). These where not actually errors they where warnings that died because warnings where being treated as errors. When I looked at the source it had something to do with empty if statements with no blocks.

With that resolved I started nice -n 20 ./build.sh kernel=sys/arch/i386/conf/NBSDVM release

This is what I got next (and though perhaps it's rather stupid of me in some circumstances to not or to have certain options enabled without others, it stems from not doing a completely thorough job on removing features when i'm not 100% sure if I should or not)

-- BEGIN OUTPUT --
echo "source /usr/src/sys/gdbscripts/lwps" >> .gdbinit
echo "source /usr/src/sys/gdbscripts/msgbuf" >> .gdbinit
echo "source /usr/src/sys/gdbscripts/pgrpdump" >> .gdbinit
echo "source /usr/src/sys/gdbscripts/procs" >> .gdbinit
echo "source /usr/src/sys/gdbscripts/vchain" >> .gdbinit
echo "source /usr/src/sys/gdbscripts/vdump" >> .gdbinit
#    create  vers.c
/bin/sh /usr/src/sys/conf/newvers.sh
#   compile  NBSDVM/vers.o
/usr/src/tooldir.NetBSD-5.0.2-i386/bin/i386--netbsdelf-gcc -I/usr/pkg/include -L/usr/pkg/lib -ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99 -fno-strict-ali asing -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unre achable-code -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -Werror -Di386 -I. -I/usr/src/sys/../common/include -I/usr/src/sys/ar ch -I/usr/src/sys -nostdinc -DCOMPAT_50 -DPMS_ELANTECH_TOUCHPAD -DMAXUSERS=128 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad -I/usr/ src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -I/usr/src/sys/../common/include -I/usr/src/s
ys/dist/pf  -c vers.c
#      link  NBSDVM/netbsd
/usr/src/tooldir.NetBSD-5.0.2-i386/bin/i386--netbsdelf-ld -Map netbsd.map --cref -T /usr/src/sys/arch/i386/conf/kern.ldscript -Ttext c0100000 -e start -X -o netbsd ${SY
STEM_OBJ} ${EXTRA_OBJ} vers.o
machdep.o: In function `cpu_exec_aout_makecmds':
machdep.c:(.text+0xb92): undefined reference to `exec_aout_prep_zmagic'
i82365.o: In function `pcic_deactivate_card':
i82365.c:(.text+0xc91): undefined reference to `pcmcia_card_deactivate'
i82365.o: In function `pcic_attach_card':
i82365.c:(.text+0xd3e): undefined reference to `pcmcia_card_attach'
i82365.o: In function `pcic_detach_card':
i82365.c:(.text+0xd00): undefined reference to `pcmcia_card_detach'
tcic2.o: In function `tcic_attach_card':
tcic2.c:(.text+0x5d6): undefined reference to `pcmcia_card_attach'
tcic2.o: In function `tcic_deactivate_card':
tcic2.c:(.text+0xd2c): undefined reference to `pcmcia_card_deactivate'
tcic2.o: In function `tcic_detach_card':
tcic2.c:(.text+0x5ab): undefined reference to `pcmcia_card_detach'

*** Failed target:  netbsd
*** Failed command: echo '# ' " link NBSDVM/netbsd"; echo /usr/src/tooldir.NetBSD-5.0.2-i386/bin/i386--netbsdelf-ld -Map netbsd.map --cref -T /usr/src/sys/arch/i386/conf/kern.ldscript -Ttext c0100000 -e start -X -o netbsd '${SYSTEM_OBJ}' '${EXTRA_OBJ}' vers.o; /usr/src/tooldir.NetBSD-5.0.2-i386/bin/i386--netbsdelf-ld -Map netbsd.map --cref -T /usr/src/sys/arch/i386/conf/kern.ldscript -Ttext c0100000 -e start -X -o netbsd locore.o copy.o spl.o vector.o lock_stubs.o devsw.o ioconf.o param.o arc4.o des_ecb.o des_setkey.o bf_ecb.o bf_skey.o cast128.o rijndael-alg-fst.o rijndael-
-- END OUTPUT --

as for the tcic, i had to comment out the following:

#tcic0  at isa? port 0x240 iomem 0xd0000 iosiz 0x10000

as for the i82365, i saw it was trying to use a function for pcic, which i searched in the config, and commented out any lines i had left pertaining to pcic, which i believe was cardbus support via the pci bus.

then for the machdep.c, well it had assumingly externed this cpu_exec_aout stuff and was not linking to anything that defined it... so i looked in the config file once again and and commented out the following:

# For GENERIC, we build the exec formats as modules by default.
#no options        EXEC_AOUT       # exec a.out binaries
#no options        EXEC_ELF32      # exec ELF binaries
#no options        EXEC_SCRIPT     # exec #! scripts
#no options        COREDUMP

the kernel built, now as i'm building release, everything else has proceeded to being built, and that is where i'm currently at.

hopefuly this may help someone out there.

hopefuly it will raise some eyebrows also!

n0ah
Noah McNallie
http://n0ah.org


Home | Main Index | Thread Index | Old Index