11 Replies Latest reply on May 24, 2016 9:15 AM by puckhead1

    Linux 3.17-rc compatibility

    torocko Lurker

      Hi,

       

      To get dual monitors working with my dell latitude e7440 I had to install the 3.17-rc kernel in Ubuntu 14.04. which unfortunately does not work with VMware Player 6.0.3 (build-1895310). After installing vmplayer compiling vmnet fails in netif.c with error 'macro "alloc_netdev" requires 4 arguments, but only 3 given'. Is there a workaround? Complete output:

       

      Stopping VMware services:

         VMware Authentication Daemon                                        done

         VM communication interface socket family                            done

         Virtual machine communication interface                             done

         Virtual machine monitor                                             done

         Blocking file system                                                done

      Using 2.6.x kernel build system.

      make: Entering directory `/tmp/modconfig-xxBLCy/vmnet-only'

      /usr/bin/make -C /lib/modules/3.17.0-031700rc4-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

            MODULEBUILDDIR= modules

      make[1]: Entering directory `/usr/src/linux-headers-3.17.0-031700rc4-generic'

        CC [M]  /tmp/modconfig-xxBLCy/vmnet-only/driver.o

        CC [M]  /tmp/modconfig-xxBLCy/vmnet-only/hub.o

        CC [M]  /tmp/modconfig-xxBLCy/vmnet-only/userif.o

        CC [M]  /tmp/modconfig-xxBLCy/vmnet-only/netif.o

      In file included from /tmp/modconfig-xxBLCy/vmnet-only/monitorAction_exported.h:31:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnet.h:29,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnetInt.h:24,

                       from /tmp/modconfig-xxBLCy/vmnet-only/hub.c:43:

      /tmp/modconfig-xxBLCy/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined [enabled by default]

          #define DEPRECATED(_fix) do {} while (0)

      ^

      In file included from include/linux/kernel.h:13:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/hub.c:23:

      include/linux/printk.h:106:0: note: this is the location of the previous definition

      #define DEPRECATED "[Deprecated]: "

      ^

      In file included from /tmp/modconfig-xxBLCy/vmnet-only/monitorAction_exported.h:31:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnet.h:29,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnetInt.h:24,

                       from /tmp/modconfig-xxBLCy/vmnet-only/netif.c:42:

      /tmp/modconfig-xxBLCy/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined [enabled by default]

          #define DEPRECATED(_fix) do {} while (0)

      ^

      In file included from include/linux/kernel.h:13:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/netif.c:23:

      include/linux/printk.h:106:0: note: this is the location of the previous definition

      #define DEPRECATED "[Deprecated]: "

      ^

      In file included from /tmp/modconfig-xxBLCy/vmnet-only/monitorAction_exported.h:31:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnet.h:29,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnetInt.h:24,

                       from /tmp/modconfig-xxBLCy/vmnet-only/driver.c:51:

      /tmp/modconfig-xxBLCy/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined [enabled by default]

          #define DEPRECATED(_fix) do {} while (0)

      ^

      In file included from include/linux/kernel.h:13:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/driver.c:23:

      include/linux/printk.h:106:0: note: this is the location of the previous definition

      #define DEPRECATED "[Deprecated]: "

      ^

      /tmp/modconfig-xxBLCy/vmnet-only/netif.c: In function ‘VNetNetIf_Create’:

      /tmp/modconfig-xxBLCy/vmnet-only/netif.c:152:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given

          dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);

                                                                      ^

      /tmp/modconfig-xxBLCy/vmnet-only/netif.c:152:10: error: ‘alloc_netdev’ undeclared (first use in this function)

          dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);

                ^

      /tmp/modconfig-xxBLCy/vmnet-only/netif.c:152:10: note: each undeclared identifier is reported only once for each function it appears in

      /tmp/modconfig-xxBLCy/vmnet-only/netif.c: At top level:

      /tmp/modconfig-xxBLCy/vmnet-only/netif.c:85:1: warning: ‘VNetNetIfSetup’ defined but not used [-Wunused-function]

      VNetNetIfSetup(struct net_device *dev)  // IN:

      ^

      In file included from /tmp/modconfig-xxBLCy/vmnet-only/monitorAction_exported.h:31:0,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnet.h:29,

                       from /tmp/modconfig-xxBLCy/vmnet-only/vnetInt.h:24,

                       from /tmp/modconfig-xxBLCy/vmnet-only/userif.c:45:

      /tmp/modconfig-xxBLCy/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined [enabled by default]

          #define DEPRECATED(_fix) do {} while (0)

      ^

      In file included from include/linux/kernel.h:13:0,

                       from ./arch/x86/include/asm/percpu.h:44,

                       from ./arch/x86/include/asm/preempt.h:5,

                       from include/linux/preempt.h:18,

                       from include/linux/spinlock.h:50,

                       from include/linux/wait.h:8,

                       from include/linux/fs.h:6,

                       from include/linux/highmem.h:4,

                       from /tmp/modconfig-xxBLCy/vmnet-only/userif.c:26:

      include/linux/printk.h:106:0: note: this is the location of the previous definition

      #define DEPRECATED "[Deprecated]: "

      ^

      make[2]: *** [/tmp/modconfig-xxBLCy/vmnet-only/netif.o] Error 1

      make[2]: *** Waiting for unfinished jobs....

      make[1]: *** [_module_/tmp/modconfig-xxBLCy/vmnet-only] Error 2

      make[1]: Leaving directory `/usr/src/linux-headers-3.17.0-031700rc4-generic'

      make: *** [vmnet.ko] Error 2

      make: Leaving directory `/tmp/modconfig-xxBLCy/vmnet-only'

      Failed to build vmnet.  Failed to execute the build command.

      Starting VMware services:

         Virtual machine monitor                                             done

         Virtual machine communication interface                             done

         VM communication interface socket family                            done

         Blocking file system                                                done

         Virtual ethernet                                                   failed

         VMware Authentication Daemon                                        done

        • 1. Re: Linux 3.17-rc compatibility
          pLastikpLu Novice

          Change this line in netif.c in /usr/lib/vmware/modules/source/vmnet.tar:

           

          from

             dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);

           

           

          to

             dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_UNKNOWN, VNetNetIfSetup);

          • 2. Re: Linux 3.17-rc compatibility
            torocko Lurker

            Thanks, now it works!

            • 3. Re: Linux 3.17-rc compatibility
              Roger_Bergling Lurker

              Great !

              Works for Workstion 10.0.3 and ubuntu with kernel 3.17 also...nice work... // Roger

              • 4. Re: Linux 3.17-rc compatibility
                Pavlinux Enthusiast

                insmod vmblock ?

                • 5. Re: Linux 3.17-rc compatibility
                  lovetide Novice

                  Thanks, this works for VMware-Player-6.0.4-2249910.x86_64 on linux kernel 3.17.2 (Fedora 20)

                  • 6. Re: Linux 3.17-rc compatibility
                    hydenzhang Lurker

                    it works. great.

                    • 7. Re: Linux 3.17-rc compatibility
                      kevhead82 Lurker

                      How did you get the dual displays working!?  I just installed the 3.17.2 kernel and I still can't get them detected.

                      • 8. Re: Linux 3.17-rc compatibility
                        antus Novice

                        Works perfectly for fedora 20 kernel 3.17.7-200.fc20.x86_64 and vmware workstation 10.0.4 build-2249910

                        Thanks!

                        • 9. Re: Linux 3.17-rc compatibility
                          meheezen Lurker

                          It worked for VMware Workstation 10.0.5 build-2443746 on 3.17.8-200.fc20.x86_64.

                          Many thanks.

                          • 10. Re: Linux 3.17-rc compatibility
                            udsieg Lurker

                            Hi,

                             

                            I have the same problem installing Ws 9.0.4 at SUSE 13.2. I applied the patch above to netif.c , but the error is still there.

                             

                            In file included from /tmp/modconfig-7sLPDH/vmnet-only/monitorAction_exported.h:31:0,

                                             from /tmp/modconfig-7sLPDH/vmnet-only/vnet.h:29,

                                             from /tmp/modconfig-7sLPDH/vmnet-only/vnetInt.h:24,

                                             from /tmp/modconfig-7sLPDH/vmnet-only/bridge.c:52:

                            /tmp/modconfig-7sLPDH/vmnet-only/monitorAction_exported.h: In function ‘MonitorActionSet_AtomicInclude’:

                            /tmp/modconfig-7sLPDH/vmnet-only/vm_assert.h:320:20: warning: typedef ‘AssertOnCompileFailed’ locally defined but not used [-Wunused-local-typedefs]

                                   typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \

                                                ^

                            /tmp/modconfig-7sLPDH/vmnet-only/monitorAction_exported.h:91:4: note: in expansion of macro ‘ASSERT_ON_COMPILE’

                                ASSERT_ON_COMPILE((ACTION_WORD_SIZE & (ACTION_WORD_SIZE - 1)) == 0);

                                ^

                            /usr/src/linux-3.16.7-7/Makefile:1359: recipe for target '_module_/tmp/modconfig-7sLPDH/vmnet-only' failed

                            make[3]: *** [_module_/tmp/modconfig-7sLPDH/vmnet-only] Error 2

                            Makefile:195: recipe for target 'sub-make' failed

                            make[2]: *** [sub-make] Error 2

                            Makefile:24: recipe for target '__sub-make' failed

                            make[1]: *** [__sub-make] Error 2

                            make[1]: Leaving directory '/usr/src/linux-3.16.7-7-obj/x86_64/desktop'

                            Makefile:130: recipe for target 'vmnet.ko' failed

                            make: *** [vmnet.ko] Error 2

                            make: Leaving directory '/tmp/modconfig-7sLPDH/vmnet-only'

                            Failed to build vmnet.  Failed to execute the build command.

                            Starting VMware services:

                               Virtual machine monitor                                             done

                               Virtual machine communication interface                             done

                               VM communication interface socket family                            done

                               Blocking file system                                                done

                               Virtual ethernet                                                   failed

                               VMware Authentication Daemon                                        done

                            • 11. Re: Linux 3.17-rc compatibility
                              puckhead1 Lurker

                              Hi,

                               

                              I'm having the same issue with the netif.c requiring 4 or 3 arguments. The difference though is I'm running VMware 12.1.1 with Red Hat 6.x. Kernel 2.6.32-573.22 and this works and compiles just fine. As soon as I booted up the latest Red Hat Kernel (2.6.32-642) the vmnet.ko would no longer build properly. I was able to untar the source code and look at netif.c, but at or around line 153 we have issues again. Here's the catch, I'm not running a 3.x kernel, I'm running a 2.6.x kernel. I don't think I should even be in this part of the source code.  I tried the suggested fix, but was still unable to get netif.c to compile.  Without getting too crazy, is there a supported fix out there for this yet?  Perhaps I can compile the source code under the old kernel save it off and then add it to the new kernel, but what I don't know is A) how reliable this will be? and B) Will it corrupt my VM ins some way? I need a supported solution.