par JeanKik » 05 Fév 2004 05:05
<BR>Quelqu'una une idée. Je n'arrive pas à m'en sortir.
<BR>
<BR>L'histoire ce passe sous mandrake 9.2
<BR>
<BR>Comme c'est expliqué dans le message d'erreur dont voici un extrait :
<BR>
<BR>/usr/include/linux/modversions.h:17:2: #error " o Make sure that the symbolic link"
<BR>/usr/include/linux/modversions.h:18:2: #error " /lib/modules/`uname -r`/build exists and points to"
<BR>/usr/include/linux/modversions.h:19:2: #error " the matching kernel source directory"
<BR>
<BR>J'ai créé un symlink /lib/modules/2.4.22-10mdk/build pointant vers /usr/src/linux-2.4.22
<BR>
<BR>Dans le prog /lib/modules/2.4.22-10mdk/build/include/linux/module.h
<BR>qui en fait est (à cause du lien) /usr/src/linux-2.4.22/include/linux/module.h
<BR>il y a un include du prog modversions.h
<BR>
<BR>Comme vous pouvez le voir dans le resultat de la compile ci-après, gcc va chercher l'include dans /usr/include/linux/ au lieux de suivre le symlink alors qu'en paramètre on a -I/lib/modules/2.4.22-10mdk/build/include (le lien)
<BR>
<BR>
<BR>Aaaaaaaa l'aiiiideeee !!!
<BR>
<BR>
<BR>[root@newton nvnet]# make
<BR>cc -c -Wall -DLINUX -DMODULE -DEXPORT_SYMTAB -D__KERNEL__ -O -Wstrict-prototypes -DCONFIG_PM -fno-strict-aliasing -mpreferred-stack-boundary=2 -march=i686 -falign-functions=4 -DMODULE -I/lib/modules/2.4.22-10mdk/build/include nvnet.c
<BR>In file included from /lib/modules/2.4.22-10mdk/build/include/linux/module.h:21,
<BR> from nvnet.h:20,
<BR> from nvnet.c:21:
<BR>/usr/include/linux/modversions.h:1:2: #error "======================================================="
<BR>/usr/include/linux/modversions.h:2:2: #error "You should not include /usr/include/{linux,asm}/ header"
<BR>/usr/include/linux/modversions.h:3:2: #error "files directly for the compilation of kernel modules."
<BR>/usr/include/linux/modversions.h:4:2: #error ""
<BR>/usr/include/linux/modversions.h:5:2: #error "glibc now uses kernel header files from a well-defined"
<BR>/usr/include/linux/modversions.h:6:2: #error "working kernel version (as recommended by Linus Torvalds)"
<BR>/usr/include/linux/modversions.h:7:2: #error "These files are glibc internal and may not match the"
<BR>/usr/include/linux/modversions.h:8:2: #error "currently running kernel. They should only be"
<BR>/usr/include/linux/modversions.h:9:2: #error "included via other system header files - user space"
<BR>/usr/include/linux/modversions.h:10:2: #error "programs should not directly include <linux/*.h> or"
<BR>/usr/include/linux/modversions.h:11:2: #error "<asm/*.h> as well."
<BR>/usr/include/linux/modversions.h:12:2: #error ""
<BR>/usr/include/linux/modversions.h:13:2: #error "To build kernel modules please do the following:"
<BR>/usr/include/linux/modversions.h:14:2: #error ""
<BR>/usr/include/linux/modversions.h:15:2: #error " o Have the kernel sources installed"
<BR>/usr/include/linux/modversions.h:16:2: #error ""
<BR>/usr/include/linux/modversions.h:17:2: #error " o Make sure that the symbolic link"
<BR>/usr/include/linux/modversions.h:18:2: #error " /lib/modules/`uname -r`/build exists and points to"
<BR>/usr/include/linux/modversions.h:19:2: #error " the matching kernel source directory"
<BR>/usr/include/linux/modversions.h:20:2: #error ""
<BR>/usr/include/linux/modversions.h:21:2: #error " o Now copy /boot/vmlinuz.version.h to"
<BR>/usr/include/linux/modversions.h:22:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
<BR>/usr/include/linux/modversions.h:23:2: #error ""
<BR>/usr/include/linux/modversions.h:24:2: #error " o When compiling, make sure to use the following"
<BR>/usr/include/linux/modversions.h:25:2: #error " compiler option to use the correct include files:"
<BR>/usr/include/linux/modversions.h:26:2: #error ""
<BR>/usr/include/linux/modversions.h:27:2: #error " -I/lib/modules/`uname -r`/build/include"
<BR>/usr/include/linux/modversions.h:28:2: #error ""
<BR>/usr/include/linux/modversions.h:29:2: #error " instead of"
<BR>/usr/include/linux/modversions.h:30:2: #error ""
<BR>/usr/include/linux/modversions.h:31:2: #error " -I/usr/include/linux"
<BR>/usr/include/linux/modversions.h:32:2: #error ""
<BR>/usr/include/linux/modversions.h:33:2: #error " Please adjust the Makefile accordingly."
<BR>/usr/include/linux/modversions.h:34:2: #error "======================================================="
<BR>
<BR>
Sauvons les rousses !