From 06655ebe50a1216bf425deac980297fba6797fa5 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sat, 19 Apr 2003 23:45:02 +0000 Subject: [PATCH] (mds) Christian Hammers wrote: > Hello > > I always got the following error when compiling lm_sensors-2.7.0: > > >> gcc -DMODVERSIONS -include /lib/modules/2.4.20-bigvideo-1/build/include/linux/modversions.h -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.20-bigvideo-1/build/include -O2 -c kernel/busses/i2c-amd8111.c -o kernel/busses/i2c-amd8111.o > > > >>> kernel/busses/i2c-amd8111.c:26:2: #error Your i2c is too old - i2c-2.7.0 or greater required! > > > > This is a compile problem as the include files of 2.7.0 are in > /usr/local/include/linux/. gcc-3.2.3 just puts /usr/local/include at the > end of the list although it is first on the command line and the info > page says the list is scanned left to right. > >> GNU CPP version 3.2.3 20030316 (Debian prerelease) (cpplib) >> (i386 Linux/ELF) >> GNU C version 3.2.3 20030316 (Debian prerelease) (i386-linux) >> compiled by GNU C version 3.2.3 20030316 (Debian prerelease). >> ignoring nonexistent directory "/usr/i386-linux/include" >> ignoring duplicate directory "/usr/local/include" >> as it is a non-system directory that duplicates a system directory >> #include "..." search starts here: >> #include <...> search starts here: >> . >> kernel/include >> /usr/local/include >> /usr/lib/gcc-lib/i386-linux/3.2.3/include >> /usr/include >> /lib/modules/2.4.20-bigvideo-1/build/include > > > > As a fix I suggest: > > # diff -u Makefile.orig Makefile > --- Makefile.orig 2003-03-19 18:20:38.000000000 +0100 > +++ Makefile 2003-03-19 18:21:08.000000000 +0100 > @@ -178,7 +178,7 @@ > # PROGCPPFLAGS/PROGCFLAGS is to create non-kernel object files (which are linked into executables). > # ARCPPFLAGS/ARCFLAGS are used to create archive object files (static libraries). > # LIBCPPFLAGS/LIBCFLAGS are for shared library objects. > -ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -I$(LINUX_HEADERS) > +ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -idirafter $(LINUX_HEADERS) > ALL_CFLAGS := -O2 > ifeq ($(DEBUG),1) > > > > bye, > > -christian- git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1735 7894878c-1315-0410-8ee3-d5d059ff63e0 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 35da7667..490e9258 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ GREP := grep # PROGCPPFLAGS/PROGCFLAGS is to create non-kernel object files (which are linked into executables). # ARCPPFLAGS/ARCFLAGS are used to create archive object files (static libraries). # LIBCPPFLAGS/LIBCFLAGS are for shared library objects. -ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -I$(LINUX_HEADERS) +ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -idirafter $(LINUX_HEADERS) ALL_CFLAGS := -O2 ifeq ($(DEBUG),1)