Messages in this thread | | | Date | Sat, 23 Jan 1999 07:10:51 +0000 | From | Matthew Gabeler-Lee <> | Subject | Possible small bug in 2.2.0-pre9 |
| |
I'm not an experienced kernel hacker, nor am I subscribed to this list, but I think my findings might be of some importance....
While trying to compile and install lm_sensors-2.1.2 (hardware temperature, etc. monitoring), I ran into a compile error in one of the kernel header files. Here is gcc's output: *** begin gcc output *** gcc -I. -Ii2c -O2 -DLM_SENSORS -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -DI2C -D__KERNEL__ -DMODULE -fomit-frame-pointer -D__SMP__ -c src/smbus.c -o src/smbus.o /usr/include/asm/semaphore.h: In function `waking_non_zero': In file included from i2c/i2c.h:33, from src/i2c.h:26, from src/smbus.c:25: /usr/include/asm/semaphore.h:141: `PAGE_MASK' undeclared (first use this function) /usr/include/asm/semaphore.h:141: (Each undeclared identifier is reported only once /usr/include/asm/semaphore.h:141: for each function it appears in.) make: *** [src/smbus.o] Error 1 *** end gcc output *** it is generating an error, because the function waking_non_zero references a macro defined earlier in the file, which references a constant (PAGE_MASK) which is not defined. after a bit of grepping, I found that this constant is defined in <asm/page.h> after much finding and grepping and whatnot, I concluded that none of the files that semaphore.h includes include <asm/page.h>. By inserting a #include <asm/page.h> at line 25 in semaphore.h (just after all the other includes), the compile error was resolved, and the program built without errors.
another item of some interest to note: the comments at the beginning of semaphore.h look to be identical in the 2.0.36 kernel tree and in the 2.2.0-pre9 tree, including the "modified" date (a date in 1996). However, the rest of the files seem to be COMPLETELY different, not even declaring the same functions.
Like I said, I'm not an experienced kernel hacker, so I will leave the analysis of what really should be done with this (perhaps some other file is supposed to include page.h?) to those that are experienced.
Again, I'm not subscribed to the list, so if you have any questions, please e-mail me directly
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |