/usr/include/linux/posix_types.h etc *do* exist, so I'm not sure why it can't find them... The running kernel lacks udev, as should the target one since --udev was not used. * udev: >> Compiling... COMMAND: make -j2 USE_KLIBC=true USE_LOG=false DEBUG=false udevdir=/dev all etc/ udev/udev.conf make -C klibc KERNEL_DIR=/lib/modules/2.6.7-gentoo-r11/build make[1]: Entering directory `/var/tmp/portage/gentoo-dev-linux-2.6.7-r11/temp/ge nkernel/udev-030/klibc' sed -e "s:@udevdir@:/dev:" < udev.8.in > udev.8 gcc -O2 -pipe -fweb -ftracer -pipe -Os -fomit-frame-pointer -D_GNU_SOURCE -Wall -nostdinc -Os -fomit-frame-pointer -falign-functions=0 -falign-jumps=0 -falign- loops=0 -D__KLIBC__ -fno-builtin-printf -I/var/tmp/portage/gentoo-dev-linux-2.6. 7-r11/temp/genkernel/udev-030/klibc/klibc/include -I/var/tmp/portage/gentoo-dev- linux-2.6.7-r11/temp/genkernel/udev-030/klibc/klibc/arch/x86_64/include -I/var/t mp/portage/gentoo-dev-linux-2.6.7-r11/temp/genkernel/udev-030/klibc/klibc/includ e/bits64 -I/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/include -I/lib/modules/2.6.7-g entoo-r11/build/include -I/var/tmp/portage/gentoo-dev-linux-2.6.7-r11/temp/genke rnel/udev-030/libsysfs -c -o udevsend.o udevsend.c In file included from udevsend.c:25: /var/tmp/portage/gentoo-dev-linux-2.6.7-r11/temp/genkernel/udev-030/klibc/klibc/ include/sys/types.h:14:31: linux/posix_types.h: No such file or directory /var/tmp/portage/gentoo-dev-linux-2.6.7-r11/temp/genkernel/udev-030/klibc/klibc/ include/sys/types.h:15:23: asm/types.h: No such file or directory (and many more like these)
If you look at the compiler message you see you have: -I/lib/modules/2.6.7-g entoo-r11/build/include. Does that exist? You're building this in a temporary tree and you'll probably want to patch the udev Makefile / set a variable for it to look in the right place. That's why you're getting the errors. This has nothing to do with udev not being on the system. To fix the udev getting compiled without it being requested issue though, change line 218 of the genkernel script to [ "${CMD_UDEV}" ] && compile_udev.
genkernel's configuration options should do whatever patching is neccesary to the Makefile to make it compile properly...
Created attachment 36416 [details, diff] Patch Tell me if this patch solves the compile issue - thanks!
Almost... Now the problem seems to be linking: gcc --static --nostdlib -nostartfiles -nodefaultlibs -o udevd /var/tmp/portage/g entoo-dev-linux-2.6.7-r11/temp/genkernel/udev-030/klibc/klibc/crt0.o udevd.o ude v_lib.o klibc_fixups.o /var/tmp/portage/gentoo-dev-linux-2.6.7-r11/temp/genkern el/udev-030/klibc/klibc/libc.a udevd.o(.text+0x2e3): In function `main': : undefined reference to `__FD_ZERO' udevd.o(.text+0x2f0): In function `main': : undefined reference to `__FD_SET' udevd.o(.text+0x300): In function `main': : undefined reference to `__FD_SET' udevd.o(.text+0x349): In function `main': : undefined reference to `__FD_ISSET' udevd.o(.text+0x362): In function `main': : undefined reference to `__FD_ISSET' collect2: ld returned 1 exit status make: *** [udevd] Error 1
Created attachment 36782 [details] Uses genkernel to compile a kernel in a sandbox
Works fine here...
*** Bug 59958 has been marked as a duplicate of this bug. ***
Hello Guys, What does the genral public do to fix this ? Thanks, Pieter
First patch alone works great for me. No need to sandbox or anything... To use the fix just edit "/usr/share/genkernel/gen_compile.sh" and on line #482 change the single quotes to double quotes, and add "KERNEL_DIR=$KERNEL_DIR " to the beginning of the text that is surrounded by the quotes. Or just "apply the diff" something I'm not sure how to do. I'd call this one fixed guys (but I'll leave it for you to resolve :).
The patch works for me also.
Actually, it seems to be a udev/amd64 issue.
I have installed genkernel-3.1.0, udev-030 and gentoo-dev-sources-2.6.9-r1 on amd64. I think the patch (in a attachment #1 [details]) is included in genkernel-3.1.0, but I can't compile initrd with udev support (like comment #4). host# genkernel --menuconfig --udev all and output: : undefined reference to `__FD_SET' udevd.o(.text+0x41a): In function `main': : undefined reference to `__FD_ISSET' udevd.o(.text+0x5ba): In function `main': : undefined reference to `__FD_ISSET' make: *** [udevd] Error 1 * Gentoo Linux Genkernel; Version 3.1.0 * ERROR: Failed to compile the "KERNEL_DIR=/usr/src/linux USE_KLIBC=true USE_LOG=false DEBUG=false udevdir=/dev all etc/udev/udev.conf" target... I think the second attachment is a solution, but I have no idea how to use, (apply?) it.
Same error, using (on AMD64): genkernel --udev all Produces: ----cut------------------ Compiling udevsend.c. gcc -Wp,-MD,./.snprintf.d -Os -fno-asynchronous-unwind-tables -fomit-frame-pointer -falign-functions=0 -falign-jumps=0 -falign-loops=0 -m64 -nostdinc -iwithprefix include -D__KLIBC__ -DBITSIZE=64 -I../include/arch/x86_64 -I../include/bits64 -I../include -I../linux/include -I../linux/include2 -DWITH_ERRLIST -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -c -o snprintf.o snprintf.c Compiling udevd.c. gcc -Wp,-MD,./.vsprintf.d -Os -fno-asynchronous-unwind-tables -fomit-frame-pointer -falign-functions=0 -falign-jumps=0 -falign-loops=0 -m64 -nostdinc -iwithprefix include -D__KLIBC__ -DBITSIZE=64 -I../include/arch/x86_64 -I../include/bits64 -I../include -I../linux/include -I../linux/include2 -DWITH_ERRLIST -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline -c -o vsprintf.o vsprintf.c udevd.c: In function `main': udevd.c:505: warning: implicit declaration of function `__FD_ZERO' udevd.c:506: warning: implicit declaration of function `__FD_SET' udevd.c:519: warning: implicit declaration of function `__FD_ISSET' -- ENOPKG (65) => "Package not installed" EREMOTE (66) => "Object is remote" ENOLINK (67) => "Link has been severed" EADV (68) => "Advertise error" ESRMNT (69) => "Srmount error" ECOMM (70) => "Communication error on send" -- : undefined reference to `__FD_SET' udevd.o(.text+0x876): In function `main': : undefined reference to `__FD_ISSET' udevd.o(.text+0x891): In function `main': : undefined reference to `__FD_ISSET' make: *** [udevd] Error 1 * Gentoo Linux Genkernel; Version 3.1.0a * ERROR: Failed to compile the "KERNEL_DIR=/usr/src/linux USE_KLIBC=true USE_LOG=false DEBUG=false udevdir=/dev all etc/udev/udev.conf" target... -----------cut------------- I have: sys-fs/udev-030 sys-kernel/genkernel-3.1.0a sys-kernel/gentoo-dev-sources-2.6.9-r1 I agree udev/amd64 seems likely... I see newer (testing) versions of udev in portage, is that a specific version that I should test? Greg? Thanks much.
Actually, I just built in udev successfully *manually* w/o using genkernel. It seems related to genkernel ;-)
This is a genkernel issue, not a udev issue from what I can tell.
*** Bug 65985 has been marked as a duplicate of this bug. ***
Ok, should be fixed in 3.1.0j; please reopen this bug if issues still persist.