[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Error building lm-sensors (can't find i2c headers) - More info



Phew.  Let's see...

Jeronimo Pellegrini <pellegrini@mpcnet.com.br> writes:
JP> So... Even though I set MODULE_LOC correctly, it is unset by the
JP> script. heodd thing is that KSRC is not changed. The only part of the
JP> script that seems to change these variables is in the tpo of the file:
JP> 
JP> KSRC:=/usr/src/linux
JP> MODULE_LOC:=/usr/src/modules

Can you try locally changing the second line to
'MODULE_LOC?=/usr/src/modules'?  If that works, I can make the change
in the package, too.

JP> gcc -M -MG -I. -Ikernel/include -I/home/jeronimo/Linux/kernel/modules/i2c \
JP> [...]
JP> make[2]: *** No rule to make target `linux/i2c-proc.h', needed by `kernel/chips/via686a.d'.  Stop.
JP> make[2]: Leaving directory `/home/jeronimo/Linux/kernel/modules/lm-sensors'
JP> make[1]: *** [build-modules] Error 2
JP> make[1]: Leaving directory `/home/jeronimo/Linux/kernel/modules/lm-sensors'
JP> Module /home/jeronimo/Linux/kernel/modules/lm-sensors failed.
JP> 
JP> 
JP> Because it is loking for headers in the i2c dir, and not in i2c/linux,
JP> and I'd expect (that's where the headers are).

No, that doesn't seem right; it's looking for <linux/i2c-proc.h> under 
$(MODULE_LOC)/i2c, so if you concatenate these two pieces in the
correct order, you should find the header file.

It looks like what's actually happening here is that the
dependency-detecting code[1] is losing.  Does running 'make clean'
before trying the build fix this?  (Should probably add a comment to
README.Debian about this, since it seems a not-too-infrequent failure
mode.)  (And I checked, the .d files aren't included in the source
tarball.)

JP> What's going on? I feel like I missed something really basic and I
JP> shouldn't need to change the rules script, but things don't seem to
JP> work here...

Errm, yeah, it's pretty clear that there's a bug with
not-in-the-default-place module building.  :-(

[1] As much as it's a pain to put all of your header file dependencies 
in both your source file *and* the Makefile, as far as I can tell,
this sort of automated dependency checking causes insane amounts of
pain when it doesn't realize that its assumptions about the world are
completely wrong, because the source is being built on a different
machine or it guessed wrong the first or something like that.  *sigh*

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: