O VMware Workstation 12 não compilará módulos no kernel do Linux 4.6

4

Recentemente eu tive que instalar o kernel 4.6 no meu Ubuntu 16.04 para parar as falhas aleatórias de "suspensão".

Após a instalação, corri:

sudo vmware-modconfig --console --install-all

e recebi o erro:

<snip>

from /tmp/modconfig-VKdGcJ/vmmon-only/linux/hostif.c:32:
/tmp/modconfig-VKdGcJ/vmmon-only/linux/hostif.c: In function ‘HostIFGetUserPages’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
 #define current get_current()


<snip>
from /tmp/modconfig-VKdGcJ/vmmon-only/linux/hostif.c:32:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()

<snip>

from /tmp/modconfig-VKdGcJ/vmnet-only/userif.c:26:
/tmp/modconfig-VKdGcJ/vmnet-only/userif.c: In function ‘UserifLockPage’:
./arch/x86/include/asm/current.h:17:17: warning: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Wint-conversion]
#define current get_current()

<snip>
scripts/Makefile.build:291: recipe for target '/tmp/modconfig-VKdGcJ/vmnet-only/userif.o' failed
make[2]: *** [/tmp/modconfig-VKdGcJ/vmnet-only/userif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1434: recipe for target '_module_/tmp/modconfig-VKdGcJ/vmnet-only' failed
make[1]: *** [_module_/tmp/modconfig-VKdGcJ/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-040600-generic'
Makefile:120: recipe for target 'vmnet.ko' failed
make: *** [vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-VKdGcJ/vmnet-only'
Unable to install all modules.  See log for details.

As VMs não seriam executadas com um erro sobre não conseguir carregar o vmmon

    
por Rqomey 09.08.2016 / 16:40

1 resposta

1

Parece que get_user_pages foi substituído por get_user_pages_remote

Com este patch: link

Para resolver:

(do wiki do linux do arco:)

link

cd /usr/lib/vmware/modules/source
tar xf vmmon.tar
mv vmmon.tar vmmon.old.tar
sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmmon-only/linux/hostif.c
tar cf vmmon.tar vmmon-only
rm -r vmmon-only
tar xf vmnet.tar
mv vmnet.tar vmnet.old.tar
sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmnet-only/userif.c
tar cf vmnet.tar vmnet-only
rm -r vmnet-only

Para mim, parece que este é um patch linux quebrando o espaço do usuário, estou errado?

    
por Rqomey 09.08.2016 / 16:40