it appears that somewhere along the way, the need to add "-I/lib/modules/2.6.30.9-96.fc11.x86_64/build/arch/x86/include" to a compile line was born. ( x86 being replaced with whatever architecture is the target ). This change comes for free if people reference the "scripts/Makefile.build" to create their kernel modules. However, in my case below, "scripts/Makefile.build" is not used. Thus the error ... wr -----Original Message----- From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of William Reich Sent: Tuesday, November 24, 2009 3:39 PM To: General Red Hat Linux discussion list; General Red Hat Linux discussion list; redhat-list@xxxxxxxxxx Subject: kernel module compile question on Fedora 11/12 Using Fedora 11 with all the latest patches, I am trying to compile a simple kernel module. ( I also get the same error on Fedora 12 ) This is a 64 bit machine. # uname -a Linux fedora-11a 2.6.30.9-96.fc11.x86_64 #1 SMP Wed Nov 4 00:02:04 EST 2009 x86_64 x86_64 x86_64 GNU/Linux When I compile, I get an error message that asm/bitops.h can not be found. This compile worked fine on RedHat 5.4 and earlier ( but now I am trying Fedora... ) cc -D__KERNEL__ -DKBUILD_BASENAME="" -I/lib/modules/2.6.30.9-96.fc11.x86_64/build/include -c locksizes.c In file included from /lib/modules/2.6.30.9-96.fc11.x86_64/build/include/linux/thread_info.h:5 4, from /lib/modules/2.6.30.9-96.fc11.x86_64/build/include/linux/preempt.h:9, from /lib/modules/2.6.30.9-96.fc11.x86_64/build/include/linux/spinlock.h:50, from locksizes.c:3: /lib/modules/2.6.30.9-96.fc11.x86_64/build/include/linux/bitops.h:17:24: error: asm/bitops.h: No such file or directory ... Can someone please point me in the right direction to determine why this worked on the stable stuff but not the bleeding edge stuff ? thanks wr Extra info below... The source is simple... ************************************************ # cat locksizes.c #include <linux/autoconf.h> #include <linux/spinlock.h> /* this is line 3 */ int spinlock_size (void) { return (sizeof (spinlock_t)); } int rwlock_size (void) { return (sizeof (rwlock_t)); } /************************************************/ # ls -l /usr/bin/cc lrwxrwxrwx 1 root root 3 2009-11-24 08:26 /usr/bin/cc -> gcc # gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) # ls -l /lib/modules/2.6.30.9-96.fc11.x86_64/build/include | more total 128 drwxr-xr-x. 3 root root 4096 2009-11-24 03:25 acpi lrwxrwxrwx. 1 root root 7 2009-11-24 03:25 asm -> asm-x86 drwxr-xr-x. 3 root root 4096 2009-11-24 03:25 asm-generic drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 asm-x86 drwxr-xr-x. 483 root root 20480 2009-11-24 03:25 config drwxr-xr-x. 3 root root 4096 2009-11-24 03:25 crypto drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 drm drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 keys drwxr-xr-x. 33 root root 36864 2009-11-24 03:25 linux drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 math-emu drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 media drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 mtd drwxr-xr-x. 12 root root 4096 2009-11-24 03:25 net drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 pcmcia drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 rdma drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 rxrpc drwxr-xr-x. 3 root root 4096 2009-11-24 03:25 scsi drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 sound drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 trace drwxr-xr-x. 2 root root 4096 2009-11-24 03:25 video # ls -l /lib/modules/2.6.30.9-96.fc11.x86_64/build/include/asm-x86 total 12 -rw-r--r--. 1 root root 4799 2009-11-03 23:57 asm-offsets.h -rw-r--r--. 1 root root 1773 2009-11-03 23:27 crash.h # cd /lib/modules/2.6.30.9-96.fc11.x86_64/build [root@fedora-11a build]# find . -name bitops.h ./include/linux/bitops.h ./include/asm-generic/bitops.h ./arch/x86/include/asm/bitops.h -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=subscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list