|
Größe: 31067
Kommentar:
|
Größe: 33465
Kommentar: added gcc call / postscript
|
| Gelöschter Text ist auf diese Art markiert. | Hinzugefügter Text ist auf diese Art markiert. |
| Zeile 9: | Zeile 9: |
| {{{... mon -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=inode -c -o inode.o inode.c |
{{{make all_targets make[3]: Entering directory `/data/src/linux-2.4.22/drivers/usb' gcc -D__KERNEL__ -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=usb -DEXPORT_SYMTAB -c usb.c gcc -D__KERNEL__ -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=usb_debug -c -o usb-debug.o usb-debug.c gcc -D__KERNEL__ -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=hub -c -o hub.o hub.c gcc -D__KERNEL__ -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=devio -c -o devio.o devio.c gcc -D__KERNEL__ -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-comon -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=inode -c -o inode.o inode.c |
| Zeile 115: | Zeile 120: |
Postscript: Now, I set ext3 to "module", and another error cancels the compilation: {{{make -C fat make[2]: Entering directory `/data/src/linux-2.4.22/fs/fat' make all_targets make[3]: Entering directory `/data/src/linux-2.4.22/fs/fat' gcc -D__KERNEL__ -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=inode -c -o inode.o inode.c inode.c: In function `fat_read_super': inode.c:773: error: `CONFIG_NLS_DEFAULT' undeclared (first use in this function) inode.c:773: error: (Each undeclared identifier is reported only once inode.c:773: error: for each function it appears in.) make[3]: *** [inode.o] Error 1 make[3]: Leaving directory `/data/src/linux-2.4.22/fs/fat' make[2]: *** [first_rule] Error 2 make[2]: Leaving directory `/data/src/linux-2.4.22/fs/fat' make[1]: *** [_subdir_fat] Error 2 make[1]: Leaving directory `/data/src/linux-2.4.22/fs' make: *** [_dir_fs] Error 2}}} |
Documentation of Errors that Prevent Kernel Compilation
(2003 - 11 - 25)
I just downloaded the kernel source of version 2.4.22. My gcc's verion is 3.3.2 (Debian). The config file for the compilation is quoted below. After {{{make dep make clean }}} I started 'make vmlinuz' and got a first error in usb.h: {{{make all_targets make[3]: Entering directory `/data/src/linux-2.4.22/drivers/usb' gcc -DKERNEL -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=usb -DEXPORT_SYMTAB -c usb.c gcc -DKERNEL -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=usb_debug -c -o usb-debug.o usb-debug.c gcc -DKERNEL -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=hub -c -o hub.o hub.c gcc -DKERNEL -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=devio -c -o devio.o devio.c gcc -DKERNEL -I/data/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-comon -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=inode -c -o inode.o inode.c inode.c:681: error: redefinition of `usbdevfs_add_bus' /data/src/linux-2.4.22/include/linux/usb.h:1119: error: `usbdevfs_add_bus' previously defined here inode.c:693: error: redefinition of `usbdevfs_remove_bus' /data/src/linux-2.4.22/include/linux/usb.h:1120: error: `usbdevfs_remove_bus' previously defined here inode.c:703: error: redefinition of `usbdevfs_add_device' /data/src/linux-2.4.22/include/linux/usb.h:1121: error: `usbdevfs_add_device' previously defined here inode.c:715: error: redefinition of `usbdevfs_remove_device' /data/src/linux-2.4.22/include/linux/usb.h:1122: error: `usbdevfs_remove_device' previously defined here inode.c:750: error: redefinition of `usbdevfs_init' /data/src/linux-2.4.22/include/linux/usb.h:1124: error: `usbdevfs_init' previously defined here inode.c:775: error: redefinition of `usbdevfs_cleanup' /data/src/linux-2.4.22/include/linux/usb.h:1125: error: `usbdevfs_cleanup' previously defined here make[3]: *** [inode.o] Error 1 make[3]: Leaving directory `/data/src/linux-2.4.22/drivers/usb' make[2]: *** [first_rule] Error 2 make[2]: Leaving directory `/data/src/linux-2.4.22/drivers/usb' make[1]: *** [_subdir_usb] Error 2 make[1]: Leaving directory `/data/src/linux-2.4.22/drivers' make: *** [_dir_drivers] Error 2 }}} As this seemed due to a non-working #ifdef/#else fork in the header file, now I commented out the affected lines 1119 to 1125: {{{#ifdef CONFIG_USB_DEVICEFS
extern void usbdevfs_add_bus(struct usb_bus *bus); extern void usbdevfs_remove_bus(struct usb_bus *bus); extern void usbdevfs_add_device(struct usb_device *dev); extern void usbdevfs_remove_device(struct usb_device *dev);
extern int usbdevfs_init(void); extern void usbdevfs_cleanup(void);
#else