LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2003, 03:29 PM   #1
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
editing lm_sensors Makefile for Mandrake


Hi,
I will shortly be attempting ( ) to install lm_sensors on my computer, as it's been overheating of late and I'd rather like to keep an eye on it. However, reading through the lm_sensors' website FAQ I came across this:
Code:
3.8 make install fails on Mandrake kernels
Mandrake uses a non-standard version.h file which confuses our Makefile. 
Edit our Makefile on the MODDIR := line to hard-code the module directory.
The relevant section in their Makefile currently reads:

Code:
# This is the directory into which the modules will be installed.
# The magic invocation will return something like this:
#   /lib/modules/2.2.15-ac9/misc
#MODDIR := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`/misc
MODPREF := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`
#MODPREF := /lib/modules/$(KERNELVERSION)
Since I'm running Mandy 9.0, I'm assuming that I'm to uncomment MODDIR and comment out MODPREF (?), but the real question is what am I supposed to change the MODDIR line to?? I was under the impression that the default module directory was /lib/modules, and I'm not quite good enough with commandline syntax and commands yet to understand what the rest of the command on that line does.
If anyone's done this before, please help.
Thanks!

~Laura
 
Old 02-03-2003, 04:23 PM   #2
Nu-Bee
Member
 
Registered: Dec 2002
Location: USA
Distribution: Mandrake 9.2
Posts: 269

Rep: Reputation: 30
Re: editing lm_sensors Makefile for Mandrake

Quote:
Originally posted by rose_bud4201
Hi,
I will shortly be attempting ( ) to install lm_sensors on my computer, as it's been overheating of late and I'd rather like to keep an eye on it. However, reading through the lm_sensors' website FAQ I came across this:
Code:
3.8 make install fails on Mandrake kernels
Mandrake uses a non-standard version.h file which confuses our Makefile. 
Edit our Makefile on the MODDIR := line to hard-code the module directory.


I am running Mandrake 9.0...vanilla.

I didn't have any problem installing lm_sensors...it works fine.

I didn't have to edit anything. It is likely talking about previous kernels.

Last edited by Nu-Bee; 02-03-2003 at 04:27 PM.
 
Old 02-03-2003, 04:49 PM   #3
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Nu-bee - did you install a Mandy package or from source?

rosebud - which version are you installing? I came across a newer one the other day which requires several patches before building.
 
Old 02-03-2003, 08:22 PM   #4
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
I downloaded what looked to be the most current version - v. 2.7.0. I tried compiling it, just to make sure, and sure enough, it had problems with the module paths.
Here's the full output of 'make'...I know it's ridiculously long and repetitious...sorry :-/
Code:
grep: /lib/modules/2.4.19-16mdk/build/Makefile: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/include/linux/autoconf.h: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
grep: /lib/modules/2.4.19-16mdk/build/.config: No such file or directory
gcc  -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.19-16mdk/build/include   -O2   -c kernel/busses/i2c-ali1535.c -o kernel/busses/i2c-ali1535.o
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning:   as it has already been specified as a non-system directory
In file included from kernel/busses/i2c-ali1535.c:56:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error "   /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error "   the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error "   /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error "   compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error "   -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error "   instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error "   -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error "   Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from /usr/include/linux/prefetch.h:13,
                 from /usr/include/linux/list.h:6,
                 from /usr/include/linux/module.h:11,
                 from kernel/busses/i2c-ali1535.c:57:
/usr/include/asm/processor.h:55: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:55: requested alignment is not a constant
In file included from /usr/include/linux/module.h:20,
                 from kernel/busses/i2c-ali1535.c:57:
/usr/include/linux/modversions.h:1:2: #error "======================================================="
/usr/include/linux/modversions.h:2:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/modversions.h:3:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/modversions.h:4:2: #error ""
/usr/include/linux/modversions.h:5:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/modversions.h:6:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/modversions.h:7:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/modversions.h:8:2: #error "currently running kernel. They should only be"
/usr/include/linux/modversions.h:9:2: #error "included via other system header files - user space"
/usr/include/linux/modversions.h:10:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/modversions.h:11:2: #error "<asm/*.h> as well."
/usr/include/linux/modversions.h:12:2: #error ""
/usr/include/linux/modversions.h:13:2: #error "To build kernel modules please do the following:"
/usr/include/linux/modversions.h:14:2: #error ""
/usr/include/linux/modversions.h:15:2: #error " o Have the kernel sources installed"
/usr/include/linux/modversions.h:16:2: #error ""
/usr/include/linux/modversions.h:17:2: #error " o Make sure that the symbolic link"
/usr/include/linux/modversions.h:18:2: #error "   /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/modversions.h:19:2: #error "   the matching kernel source directory"
/usr/include/linux/modversions.h:20:2: #error ""
/usr/include/linux/modversions.h:21:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/modversions.h:22:2: #error "   /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/modversions.h:23:2: #error ""
/usr/include/linux/modversions.h:24:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/modversions.h:25:2: #error "   compiler option to use the correct include files:"
/usr/include/linux/modversions.h:26:2: #error ""
/usr/include/linux/modversions.h:27:2: #error "   -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/modversions.h:28:2: #error ""
/usr/include/linux/modversions.h:29:2: #error "   instead of"
/usr/include/linux/modversions.h:30:2: #error ""
/usr/include/linux/modversions.h:31:2: #error "   -I/usr/include/linux"
/usr/include/linux/modversions.h:32:2: #error ""
/usr/include/linux/modversions.h:33:2: #error "   Please adjust the Makefile accordingly."
/usr/include/linux/modversions.h:34:2: #error "======================================================="
In file included from /usr/include/linux/module.h:296,
                 from kernel/busses/i2c-ali1535.c:57:
/usr/include/linux/version.h:2:2: #error "======================================================="
That block of error messages/output was repeated 3 or 4 times, at a guess...there didn't seem to be any difference between the repetitions.

Nu-Bee, which version of lm_sensors worked for you???

thanks,
Laura
 
Old 02-03-2003, 09:06 PM   #5
gg4
LQ Newbie
 
Registered: Jan 2003
Posts: 9

Rep: Reputation: 0
Off topic I know... But I love your sig rose_bud.
 
Old 02-03-2003, 09:48 PM   #6
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
hehe...thanks!
 
Old 02-03-2003, 11:34 PM   #7
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Just to check up here - you do actually hav a 'build' directory under you modules path, right?

And did you run (or are you supposed to run as per install docs) the ./configure script first?
 
Old 02-04-2003, 12:42 AM   #8
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
The directory heirarchy goes something like this:
/lib/modules/2.4.19-16mdk/<symlink to build> , if that's what you mean. I'm getting the feeling that yeah, Mandy did screw with this a bit.
And there is no configure file - the first command needed (per the install doc) is make install.

Does there need to be an actual directory in that path, or will the symlink suffice?
 
Old 02-04-2003, 09:01 AM   #9
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Did you install the newer i2c modules yet?

Does the <symlink to build> point to the actual location of your current kernel source?

Last edited by mcleodnine; 02-04-2003 at 09:10 AM.
 
Old 02-04-2003, 10:35 AM   #10
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
I'm not sure if I'm oversimplifying your case but try this:
open a console and type:
Code:
ls /lib/modules
it should list something like this:
Code:
2.4.18-4m
then open up the Makefile and use that number in the path:
Code:
MODPREF := /lib/modules/2.4.18-4m
 
Old 02-04-2003, 04:41 PM   #11
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
mcleodnine, good thought - I checked that symlink....and it doesn't go anywhere...! The path it supposedly points to is (from /lib/modules/2.4.19-16mdk) ../../../usr/src/2.4.19-16mdk. However,
Code:
la /usr/src
returns only
Code:
./ ../ RPM
What would be the point of a bogus link like that, and how do I find out where the kernel source really is?

Quote:
Did you install the newer i2c modules yet?
No, I didn't install any modules that didn't come with mandrake - what's the difference, and should I need to install them, where can I find them?

I really appreciate your help...!

Darin, I tried that, but since it still looks for (I think) the build directory under /lib/modules/ and there's nothing there, even hardcoding the path in the makefile didn't help. Still trying, though!

Laura
 
Old 02-04-2003, 05:08 PM   #12
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Looks like you have no kernel source. Perhaps an easier method would be to get the package (does Mandrake use RPMs?) from mandrake or a (hopefully) cpompatible RPM from a red hat build.
 
Old 02-04-2003, 06:40 PM   #13
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
yeah, I think Mandrake did throw one into their disk....I prefer compiling my own stuff over RPMing it, but at this point it's becoming more trouble than it's worth.
Thanks very much, though...!

Laira
 
Old 02-04-2003, 07:05 PM   #14
Nu-Bee
Member
 
Registered: Dec 2002
Location: USA
Distribution: Mandrake 9.2
Posts: 269

Rep: Reputation: 30
Quote:
Originally posted by mcleodnine
Nu-bee - did you install a Mandy package or from source?

rosebud - which version are you installing? I came across a newer one the other day which requires several patches before building.
I installed the one from Mandrake Update.

About two weeks or so ago I did an update, and lm_sensors was on the list.

I would include a screnshot but I see there's no place for attachments.

Last edited by Nu-Bee; 02-04-2003 at 07:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
editing a makefile scotoma Linux - Newbie 2 10-03-2004 01:50 PM
lm_sensors Mandrake 10? tsw Mandriva 5 08-09-2004 04:46 PM
Mandrake 10 Kernel 2.6 - lm_sensors? martinreichl Mandriva 4 04-16-2004 07:30 PM
editing makefile ahjamm Linux - Software 2 10-25-2003 11:59 AM
lm_sensors...anyone got it working with Mandrake 9.0? discipledoc Linux - Software 3 01-20-2003 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration