LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Trouble building VMware kernel module 8.0.3 on Slackware64-current with Linux 3.3.6 (http://www.linuxquestions.org/questions/slackware-14/trouble-building-vmware-kernel-module-8-0-3-on-slackware64-current-with-linux-3-3-6-a-947516/)

ack_iix 05-30-2012 12:28 AM

Trouble building VMware kernel module 8.0.3 on Slackware64-current with Linux 3.3.6
 
Hello Guys,

I have trouble building the VMware 8.0.3 kernel module (the vmmon one) in my Slackware64-current setup. I've built and install my custom kernel (linux 3.3.6 with pf patch) and I've also patched the VMware module source using the patch from here: http://weltall.heliohost.org

All other modules can be built successfully, except the vmmon one which always threw me errors during compilation. All other modules were successfully built when I issue the command:
Code:

vmware-modconfig --console --build-mod -k 3.3.6-pf <module_name> /usr/bin/gcc /lib/modules/source/include
Here's the error when I tried to build the vmmon module:
Code:

dwi@pavilion:source $ sudo vmware-modconfig --console --install-all
Password:
Stopping VMware services:
  VMware Authentication Daemon                            [  OK  ]
  VM communication interface socket family                [  OK  ]
  Virtual machine communication interface                [  OK  ]
  Virtual machine monitor                                [  OK  ]
  Blocking file system                                    [  OK  ]
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/3.3.6-pf/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-3.3.6-pf'
  CC [M]  /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/apic.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/vmx86.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/task.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/comport.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-root/modules/vmmon-only/vmcore/moduleloop.o
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIF_CallOnEachCPU’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:2823:4: error: too many arguments to function ‘smp_call_function’
In file included from include/linux/topology.h:33:0,
                from include/linux/gfp.h:7,
                from include/linux/mm.h:8,
                from /tmp/vmware-root/modules/vmmon-only/./include/compat_page.h:23,
                from /tmp/vmware-root/modules/vmmon-only/linux/hostif.c:32:
include/linux/smp.h:74:5: note: declared here
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIF_BrokenCPUHelper’:
/tmp/vmware-root/modules/vmmon-only/linux/hostif.c:2860:4: error: too many arguments to function ‘smp_call_function’
In file included from include/linux/topology.h:33:0,
                from include/linux/gfp.h:7,
                from include/linux/mm.h:8,
                from /tmp/vmware-root/modules/vmmon-only/./include/compat_page.h:23,
                from /tmp/vmware-root/modules/vmmon-only/linux/hostif.c:32:
include/linux/smp.h:74:5: note: declared here
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1319:4: error: too many arguments to function ‘smp_call_function’
In file included from include/linux/sched.h:78:0,
                from include/linux/freezer.h:6,
                from include/linux/fs.h:400,
                from include/linux/highmem.h:4,
                from /tmp/vmware-root/modules/vmmon-only/linux/driver.c:25:
include/linux/smp.h:74:5: note: declared here
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/hostif.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-3.3.6-pf'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon
dwi@pavilion:source $

I even switch to my other machine (Slackware64-current, stock kernel 3.2.13) and still get the same error. Tried to change my current kernel with Slackware64-current stock and it does not help either, I still got the same errors...

The patch I mentioned above does not touch the vmmon at all though, maybe the vmmon source needs to be patched as well? Or can I run vmware without this module, as the other modules built flawlessly.

I appreciate your help

willysr 05-30-2012 12:58 AM

Try read the solution on my SlackBlogs

ack_iix 05-30-2012 01:38 AM

Tried the patch on your blog and still got the same error, the vmmon module won't build (your patch is only for the vmnet source). I've spent some times googling and can't find a case similar to mine. I had this problem on my laptop and my desktop computer.

Frankly I'm confused now on what may be causing this, even reverting to stock kernel packages does not help. What I mean stock is every kernel packages is vanilla from Slackware64-current, the vmmon module still won't compile.

willysr 05-30-2012 02:59 AM

have you removed your VMWare installation and start a new installation?
Don't try to patch on top of another patch.

ack_iix 05-30-2012 05:55 AM

Yes, I've uninstall VMware and removed all previous VMware files in /etc/vmware and /usr/lib/vmware*

Still the same error

willysr 05-30-2012 08:46 AM

Mind trying this patch ?

ack_iix 05-30-2012 12:42 PM

-fPIC flag is the source
 
I've tried your patch, still the same errors. It's the vmmon module that won't compile, and from google search result I haven't seen any patch regarding the vmmon module for this vmware version.

Tried the patch again on a different computer (running Slackware64-current with stock kernel) and still same vmmon compile error.

I'm beginning to think that VMware won't play nice with Slackware, is this patch working fine in your system? Please share your configuration (Slackware version / kernel version)?

Update

This has giving me a headache all day long and the culprit is just because VMware modules source won't compile with -fPIC compiler flags :doh: I always have this line inside a script named slackbuild.sh in my /etc/profile.d directory:
Code:

export CFLAGS="-O2 -fPIC -march=native -pipe -fomit-frame-pointer"
It appears that VMware won't play nice with -fPIC, removing this flag enables all the modules to be compiled without problems.

Thanks to Willy for your assistance, I will mark this threas as solved.

willysr 05-30-2012 06:32 PM

Good to know that it's working since many people have reported that the patch is working on their systems :)
It's also working fine on my system of course because i tested it first before posting it to my blog


All times are GMT -5. The time now is 05:27 PM.