rasa / vmware-tools-patches

Patch and build VMware tools automatically
https://github.com/rasa/vmware-tools-patches/wiki
MIT License
1.19k stars 198 forks source link

build fails on Debian 4.2 kernel #73

Open digininja opened 8 years ago

digininja commented 8 years ago

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 8 years ago

Same on Fedora 22, Kernel 4.2.3

liayn commented 8 years ago

Possible solution: https://communities.vmware.com/message/2546788

liayn commented 8 years ago

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 8 years ago

The important commits: https://github.com/torvalds/linux/commit/680baacbca69d18a6d7315374ad83d05ac9c0977 https://github.com/torvalds/linux/commit/6e77137b363b8d866ac29c5a0c95e953614fb2d8 https://github.com/torvalds/linux/commit/5f2c4179e129bdc47870a81a65d0aff85aa18293

liayn commented 8 years ago

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 8 years ago

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.

liayn commented 8 years ago

Nevertheless, the patch https://github.com/liayn/vmware-tools-patches/commit/613992f3317b87f7c3c590f84efba8a8c6f8ebfb

swilson62 commented 8 years ago

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 (https://github.com/rasa/vmware-tools-patches/pull/77), I re-cloned the repo and it compiled fine for me.

liayn commented 8 years ago

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.

fenris commented 8 years ago

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 :(

patmans commented 8 years ago

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 8 years ago

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

dragon788 commented 8 years ago

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

digininja commented 8 years ago

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 https://github.com/rasa/vmware-tools-patches/issues/73#issuecomment-175325477 .