PDA

View Full Version : errore compilazione VMware


mirkobob
03-06-2007, 18:53
Non riesco a risolvere l'errore e' il seguente :

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.20-16-386/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make -C /lib/modules/2.6.20-16-386/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-386'
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-386'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.

mirko@mirko-desktop:~/Desktop/vmware-server-distrib$



Non so' come fare ... perche' da errore di compilazione?

DOCXP
04-06-2007, 10:57
E' un problema negli script di configurazione del modulo che sorgono con i kernel 2.6.20 e superiori.
prima di lanciare vmware-config-pl devi scompattare il file vmmon.tar che solitamente si trova in /usr/lib/vmware/modules/source/ , aprire con un editor il file vmmon-only/include/compat_kernel.h, cerchi la riga
#define __NR_compat_exit __NR_exit
static inline _syscall1(int, compat_exit, int, exit_code);

e la commenti.
Poi reimpacchetti il tutto
tar -cf vmmon.tar vmmon-only

E quando rilanci lo script di configurazione non ti darà più l'errore.

EDIT: in teoria basta togliere le virgole dopo int
int, compat_exit, int, exit_code