On Sun, 2004-05-16 at 23:56, Steven Kenny wrote:
> The location of the kernel header files has to be specified in the make file
> accompanying the driver or included in the command line. I was just
> specifying the location in the make file and the resulting error is what I
> posted. I was looking to find out about the symbolic link mentioned in the
> error message. Looks to me like the kernel header files should not be
> accessed directly. Here is the error extracted from the rubbish.
>> You should not include /usr/include/{linux,asm}/ header files directly for
> the compilation of kernel modules. glibc now uses kernel header files from a
> well-definedworking kernel version (as recommended by Linus Torvalds)"These
> files are glibc internal and may not match the"currently running kernel.
> They should only be included via other system header files - user space
> programs should not directly include <linux/*.h> or <asm/*.h> as well. To
> build kernel modules please do the following: Have the kernel sources
> installed Make sure that the
> symbolic link"/lib/modules/`uname -r`/build exists and points to the
> matching kernel source
> directory. Now copy /boot/vmlinuz.version.h to
> /lib/modules/`uname -r`/build/include/linux/version.h When compiling, make
> sure to use the following compiler option to use the correct include
> iles: -I/lib/modules/`uname -r`/build/include instead
> f -I/usr/include/linux. Please adjust the Makefile accordingly."
>> Don't know if I have kernel sources installed (how do I check)
> Know nowt about symbolic links (newbie like I said :-)
> Will I have to do this manually?
> Cheers for the replies, wasn't expecting much on a sunday.
> Steve
Hi Steve,
First thing you need to do is check if you have the kernel sources
installed. Do a 'uname -r' at the command line, and it should give you
back something like '2.4.22-10mdk'.
Then type 'rpm -qa |grep kernel-source'. This should return something
like "kernel-source-2.4.22-10mdk". The 2.4.22-10mdk is the version of
the kernel source, this should match what is returned by the 'uname -r'
command above.
If this is okay, then you have the kernel source installed. If not, as
root, type 'urpmi kernel-source' and Mandrake will prompt you for the
relevant CD and install it.
Once the kernel-source package is installed, also as root type 'ln -s
/lib/modules/2.4.22-10mdk/build /usr/src/linux-2.4.22-10mdk'
(substituting the correct version numbers of course, if yours are
different - they may be if you have installed the updates).
Then go back and attempt to rebuild your winmodem drivers, it should
hopefully work now. Incidentally, to create an RPM from the package,
you will need a .spec file which should be included in the driver
package you have.
To create the RPM, the following may work. This should be done as root
unless you have 'sudo' installed, which is a good idea (if not, 'urpmi
sudo', 'man sudo', and 'man sudoers' should help you out.
Firstly, copy the archive into /usr/src/RPM/SOURCES/. Then, in your
home directory or wherever you choose to work, untar it and cd into the
directory new directory, then run 'rpmbuild -ba <spec file>', where
<spec file> is the name of the file ending in .spec, or .spec.in
supplied in this directory.
Hopefully others will correct any mistakes I've made here, or possibly
point out more efficient ways of accomplishing this, as it's 1am here
and I've just got back from the pub :)
Regards,
Ruairí
--
"I want peace on Earth, and goodwill toward men."
"We are the United States government. We don't do that sort of thing."
-- David Strathairn & James Earl Jones, "Sneakers".
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!