rasa/vmware-tools-patches

build fails on Debian 4.2 kernel

Opened this issue · 14 comments

Fixed up my gcc symlink and now building fails.

Kernel is:
Linux xxx 4.2.0-1-amd64 #1 SMP Debian 4.2.1-2 (2015-09-27) x86_64 GNU/Linux

make: Entering directory '/tmp/modconfig-OzPZt7/vmhgfs-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/4.2.0-1-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-1-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/backdoorGcc64.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/dir.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/request.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/cpName.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/rpcout.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/hgfsEscape.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/link.o
  CC [M]  /tmp/modconfig-OzPZt7/vmhgfs-only/bdhandler.o
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:59:4: warning: initialization from incompatible pointer type
    .follow_link   = HgfsFollowlink,
    ^
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:59:4: warning: (near initialization for ‘HgfsLinkInodeOperations.follow_link’)
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:61:4: warning: initialization from incompatible pointer type
    .put_link      = HgfsPutlink,
    ^
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:61:4: warning: (near initialization for ‘HgfsLinkInodeOperations.put_link’)
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c: In function ‘HgfsFollowlink’:
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:127:10: error: implicit declaration of function ‘nd_set_link’ [-Werror=implicit-function-declaration]
          nd_set_link(nd, fileName);
          ^
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c: In function ‘HgfsPutlink’:
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:276:4: error: implicit declaration of function ‘nd_get_link’ [-Werror=implicit-function-declaration]
    fileName = nd_get_link(nd);
    ^
/tmp/modconfig-OzPZt7/vmhgfs-only/link.c:276:13: warning: assignment makes pointer from integer without a cast
    fileName = nd_get_link(nd);
             ^
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.2.0-1-common/scripts/Makefile.build:263: recipe for target '/tmp/modconfig-OzPZt7/vmhgfs-only/link.o' failed
make[4]: *** [/tmp/modconfig-OzPZt7/vmhgfs-only/link.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/usr/src/linux-headers-4.2.0-1-common/Makefile:1403: recipe for target '_module_/tmp/modconfig-OzPZt7/vmhgfs-only' failed
make[3]: *** [_module_/tmp/modconfig-OzPZt7/vmhgfs-only] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-1-amd64'
Makefile:120: recipe for target 'vmhgfs.ko' failed
make: *** [vmhgfs.ko] Error 2
make: Leaving directory '/tmp/modconfig-OzPZt7/vmhgfs-only'

The filesystem driver (vmhgfs module) is used only for the shared folder 
feature. The rest of the software provided by VMware Tools is designed to work 
independently of this feature.
liayn commented

Same on Fedora 22, Kernel 4.2.3

liayn commented

https://lwn.net/Articles/648995/

The prototypes for the follow_link() and put_link() methods in struct inode_operations have changed to:

    const char *(*follow_link) (struct dentry *, void **);
    void (*put_link) (struct dentry *, void *);

In-tree filesystems have been changed accordingly. 
liayn commented

Patched version, which seems to work for me.
Please test. If ok, I'll create a patch.

https://gist.github.com/liayn/5fb184fcb5b45deda183

liayn commented

Args... does not work. Files are empty when written to a hgfs share, but not sure if this fix is really the cause, I doubt it.

I was getting almost exactly the same compile failure as seen in the first comment in this thread on KUbuntu v15.10. After the v8.0.2 tools were merged in (#77), I re-cloned the repo and it compiled fine for me.

liayn commented

Well, the latest vmware tools 10.0.1, shipped with vmware player 12.0.1, still cause the same compile error. The patch linked above fixes those errors and hgfs compiles again, still the bug remains that only empty files are written. This bug is not related to the compile error, since this is about symbolic links only.

tried the patched-open-vm-tools.sh on fusion 8.0.2 and its worked for me but ....

cat /etc/xdg/autostart/vmware-user.desktop

missing symlink /usr/lib/vmware-tools/bin32/vmware-user-suid-wrapper

and can't get full display resolution :(

Be VERY careful of the zero/empty files on write problem - I had symlinks to files that were in hgfs, and I didn't even think or notice that editing them effectively deleted the files! I don't remember what fixed the problem for me, I hit it about 12 months ago, I think getting updated patches (from this repo) might have fixed it.

If you hit the bug, do yourself a favor and unmount or don't use hgfs!

liayn commented

HGFS is working again with latest 10.0.5 vmware tools for VMware Player 12.1

@digininja Are you still hitting this issue? Would be great to close this out if its been resolved.

The VM I was trying it on is currently broken so can't retest it, close it
as by the time I get the VM back up I imagine all the versions will have
changed.
On 27 Jan 2016 01:15, "dragon788" notifications@github.com wrote:

@digininja https://github.com/digininja Are you still hitting this
issue? Would be great to close this out if its been resolved.


Reply to this email directly or view it on GitHub
#73 (comment)
.