Hi,

I'm packaging the RDAC (http://www.lsi.com/rdac/ds4000.html) module for different versions of suse in the OBS.

(http://build.opensuse.org/package/show?package=rdac&project=home%3Aleo_eraly)

I made my spec file according to the Novell Guidelines but the build fails
with the following error

gcc -D__KERNEL__ -I/lib/modules/2.6.16.46-0.7-xen/build/include mppLnx26_spinlock_size.c -o mppLnx_Spinlock_Size
In file included from mppLnx26_spinlock_size.c:46:
/usr/include/linux/version.h:2:2: error: #error "=======================================================" /usr/include/linux/version.h:3:2: error: #error "You should not include /usr/include/{linux,asm}/ header" /usr/include/linux/version.h:4:2: error: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: error: #error ""
/usr/include/linux/version.h:6:2: error: #error "glibc now uses kernel header files from a well-defined" /usr/include/linux/version.h:7:2: error: #error "working kernel version (as recommended by Linus Torvalds)" /usr/include/linux/version.h:8:2: error: #error "These files are glibc internal and may not match the" /usr/include/linux/version.h:9:2: error: #error "currently running kernel. They should only be" /usr/include/linux/version.h:10:2: error: #error "included via other system header files - user space" /usr/include/linux/version.h:11:2: error: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: error: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: error: #error ""
/usr/include/linux/version.h:14:2: error: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: error: #error ""
/usr/include/linux/version.h:16:2: error: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: error: #error ""
/usr/include/linux/version.h:18:2: error: #error " o Make sure that the symbolic link" /usr/include/linux/version.h:19:2: error: #error " /lib/modules/`uname -r`/build exists and points to" /usr/include/linux/version.h:20:2: error: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: error: #error ""
/usr/include/linux/version.h:22:2: error: #error " o Configure kernel sources:"
/usr/include/linux/version.h:23:2: error: #error " - cd /usr/src/linux"
/usr/include/linux/version.h:24:2: error: #error " - make mrproper"
/usr/include/linux/version.h:25:2: error: #error " - make cloneconfig"
/usr/include/linux/version.h:26:2: error: #error " - make dep"
/usr/include/linux/version.h:27:2: error: #error ""
/usr/include/linux/version.h:28:2: error: #error " o When compiling, make sure to use the following" /usr/include/linux/version.h:29:2: error: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:30:2: error: #error ""
/usr/include/linux/version.h:31:2: error: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:32:2: error: #error ""
/usr/include/linux/version.h:33:2: error: #error " instead of"
/usr/include/linux/version.h:34:2: error: #error ""
/usr/include/linux/version.h:35:2: error: #error " -I/usr/include/linux"
/usr/include/linux/version.h:36:2: error: #error ""
/usr/include/linux/version.h:37:2: error: #error " Please adjust the Makefile accordingly." /usr/include/linux/version.h:38:2: error: #error "=======================================================" mppLnx26_spinlock_size.c:47:42: error: missing binary operator before token "(" mppLnx26_spinlock_size.c:51:28: error: linux/autoconf.h: No such file or directory
make: *** [mppLnx_Spinlock_Size] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.88521 (%build)


This seems to be related to an include in some of the source files.

On SLES 10/OpenSUSE 10.2 the /lib/modules/`uname -r`/build points to /usr/src/linux-`uname -r`-obj/arch/flavour but this seems to be wrong according to message in version.h .

If I change this symlink to /usr/src/linux-`uname -`/include (which is in the kernel-src package) the compile works.

What is the correct way to solve this more permanent? Submit a patch upstream? Fix the package ? .... ?


Thx in advance


Kind regards,

Leo
--
Leo Eraly
<leo at unstable dot be>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to