Ask Your Question
1

fedora 29 kernel 5.0.4-200 VMware workstation 15.0.4 player not working failed to compile modules

asked 2019-03-30 08:17:45 -0600

marck gravatar image

Dowloaded the lastest version ov VMware player 15.0.4 with the latest kernel on fedora 5.0.4-200. When I install VMware it works fine, But has he needs to build modules it fails. The error: Unable to start services See log file /tmp/vmware-root/vmware-9528.log for details

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2019-04-05 06:40:38 -0600

marck gravatar image

updated 2019-04-09 13:06:26 -0600

I wrote a script for people in need.

  1. Install VMware 15.0.4 normaly: ./VMware-Player-15.0.4-12990004.x86_64.bundle Should work fine
  2. Use this script put it in a file i.e : vmware.sh

Blockquote

cd /usr/lib/vmware/modules/source/
tar -xvf vmmon.tar && tar -xvf vmnet.tar;
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 46 a "#include <media/v4l2-common.h>;" . w q)

ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1642 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1641 a "unsigned int totalPhysicalPages = totalram_pages();" . w q)

ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1788 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1787 a "v4l2_get_timestamp(&tv);" . w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1902 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1901 a "v4l2_get_timestamp(&tv);" . w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 3409 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 3408 a "if (!access_ok(p, size)) {" . w q)

ed -s /usr/lib/vmware/modules/source/vmnet-only/userif.c < <(printf '%s\n' 145 d w q)
ed -s /usr/lib/vmware/modules/source/vmnet-only/userif.c < <(printf '%s\n' 144 a "if (!access_ok((void *)uAddr, size) ||" . w q)
mv vmmon.tar old.vmmon.tar;
mv vmnet.tar old.vmnet.tar;
tar -cf vmmon.tar vmmon-only;
tar -cf vmnet.tar vmnet-only
  • become supperuser : su or sudo

  • chmod +x vmware.sh

  • bash vmware.sh
  • start WMware player
edit flag offensive delete link more
0

answered 2019-04-19 14:24:47 -0600

opratr gravatar image

marck,

Thank you for the script! It made the process much quicker. I did notice an error where the totalram_pages definition was still in the code so I modified your script to remove it and adjusted the code to compensate for one fewer line. Also made a minor syntax fix on the #include line. I tested the resulting script and it works perfectly.

cd /usr/lib/vmware/modules/source/
tar -xvf vmmon.tar && tar -xvf vmnet.tar;
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 46 a "#include <media/v4l2-common.h>" . w q)

ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1642 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1643 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1642 a "unsigned int totalPhysicalPages = totalram_pages();" . w q)

ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1787 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1786 a "v4l2_get_timestamp(&tv);" . w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1901 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 1900 a "v4l2_get_timestamp(&tv);" . w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 3408 d w q)
ed -s /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c < <(printf '%s\n' 3407 a "if (!access_ok(p, size)) {" . w q)

ed -s /usr/lib/vmware/modules/source/vmnet-only/userif.c < <(printf '%s\n' 145 d w q)
ed -s /usr/lib/vmware/modules/source/vmnet-only/userif.c < <(printf '%s\n' 144 a "if (!access_ok((void *)uAddr, size) ||" . w q)
mv vmmon.tar old.vmmon.tar;
mv vmnet.tar old.vmnet.tar;
tar -cf vmmon.tar vmmon-only;
tar -cf vmnet.tar vmnet-only
edit flag offensive delete link more
0

answered 2019-03-31 13:53:05 -0600

xdje42 gravatar image

Hi. Googling, I found this page.

The access_ok changes are good AFAICT.

I wouldn't suggest commenting out a function call that initializes a local variable. Instead of commenting out calls to do_gettimeofday I found a reference suggesting replacing it with a call to v4l2_get_timestamp.

#include <media/v4l2-common.h

then replace

do_gettimeofday(&tv)

with

v4l2_get_timestamp(&tv)

Also, totalram_pages is now an inline function. Comment out the decl, but also change it to a function call:

unsigned int totalPhysicalPages = totalram_pages();

Lastly, for reference sake, instead of manually invoking make, one can just repackage up the tarballs after making the changes. Then vmware will take care of compiling and installing the modules for you.

edit flag offensive delete link more

Comments

Your solution is more functional. Thanks ;)

marck gravatar imagemarck ( 2019-03-31 17:49:30 -0600 )edit

I'm having trouble compiling vmmon with kernel 5.0.5 with above steps. Could you please confirm the location of #include <media v4l2-common.h=""> in /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c? I tried very first include and before vmware.h entry. No luck.

Thanks. gs

gsun gravatar imagegsun ( 2019-04-03 11:11:50 -0600 )edit

What I did is to put this "#include <media v4l2-common.h="">" on line 45 of the file /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c

marck gravatar imagemarck ( 2019-04-04 17:56:39 -0600 )edit

Thanks Marc. Unfortunately it didn't work. I have to use commented alternative solution for now.

gsun gravatar imagegsun ( 2019-04-05 20:41:21 -0600 )edit
0

answered 2019-03-30 13:37:21 -0600

marck gravatar image

I found a solution, I had to make by hand but someone can write a script if they want. The issue was of the use of some deprecated function due to kernel 5.0.4 Function incriminated are : ==> do_gettimeofday() Macro incriminated : ==> access_ok() The step I did to fix it:

1) Install VMware 15.0.4 normaly: ./VMware-Player-15.0.4-12990004.x86_64.bundle Should work fine

2) Go to the directory : /usr/lib/vmware/modules/source/

3) Extract two .tar files : vmmon.tar and vmnet.tar

            ==> **tar -xvf vmmon.tar**  --> create a directory called **vmmon-only**
            ==> **tar -xvf vmnet.tar**  --> create a directory called **vmnet-only**

4) Go into the directory vmmon-only : cd vmmon-only

4.1) comment the line 1641 in the file /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c ==> // extern unsigned long totalram_pages;

4.2) comment also line 1787 in the file /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c ==> // do_gettimeofday(&tv); which is deprecated

4.3) comment also line 1901 in the file /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c ==> // do_gettimeofday(&tv);

4.4) modify the macro access_ok which only accept two arguments, in the file /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c line 3408 ==> if (!access_ok(p, size)) {

5) compile : make -j4 -C ../vmmon-only auto-build HEADER_DIR=/lib/modules/5.0.4-200.fc29.x86_64/build/include CC=/usr/bin/gcc IS_GCC_3=no

6) copy your vmmon.ko file into the directory /lib/modules/5.0.4-200.fc29.x86_64/misc/ ==> cp vmmon.ko /lib/modules/5.0.4-200.fc29.x86_64/misc/

7) go into the directory vmnet-only : cd vmnet-only

7.1) modify the macro access_ok on line 145 of the file /usr/lib/vmware/modules/source/vmnet-only/userif.c ==> if (!access_ok((void *)uAddr, size) ||

8) compile : make -j4 -C ../vmnet-only auto-build HEADER_DIR=/lib/modules/5.0.4-200.fc29.x86_64/build/include CC=/usr/bin/gcc IS_GCC_3=no

9) copy vmnet.ko file into the directory /lib/modules/5.0.4-200.fc29.x86_64/misc/ ==> cp vmnet.ko /lib/modules/5.0.4-200.fc29.x86_64/misc/

10)start WMware player it will ask for your password and failed to compile, it's OK because you did it manually.

Bye

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-03-30 08:17:45 -0600

Seen: 1,383 times

Last updated: Apr 09 '19