Ubuntu 14.04.02 vmhgfs compile failure (VMwareTools-9.9.2-2496486) #29

Closed
eborshch opened this Issue Feb 25, 2015 · 49 comments

Comments

Projects
None yet
@eborshch

Hello!

I cannot compile the latest VMwareTools-9.9.2-2496486 (neither patched not original) on Ubuntu 14.04.02 with latest Linux kernel (3.13.0-46). It raises the following error:

 from /tmp/modconfig-qqjwHn/vmhgfs-only/inode.c:29:
/tmp/modconfig-qqjwHn/vmhgfs-only/inode.c: In function ‘HgfsPermission’:
include/linux/kernel.h:793:27: error: ‘struct dentry’ has no member named ‘d_alias’
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \

The complete output can be found here https://gist.github.com/eborshch/cd6f430bf6771e33e5cf. I've noticed that there is a recent fix (#27) for the similar issue, though it does not solve this particular issue as it has been already merged into the master when I've tried it.

Any hints?

Thank you in advance!

Best,
Eugene

p.s. it looks like this issue has been already reported to VMWare https://communities.vmware.com/message/2477575

@rasa

This comment has been minimized.

Show comment
Hide comment
@rasa

rasa Feb 25, 2015

Owner

I'm looking into this now, and will let you know what I discover.

Owner

rasa commented Feb 25, 2015

I'm looking into this now, and will let you know what I discover.

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Feb 27, 2015

Same issue for me on Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux

I try to use your patch install but the problem still persist.

(I already commented for another issue)

Same issue for me on Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux

I try to use your patch install but the problem still persist.

(I already commented for another issue)

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Feb 27, 2015

Ok so I succeed with hgfs installation.

I uncompressed the "vmware-tools-distrib/lib/modules/source/vmhgfs.tar" with "tar cvf" command
then I used this command in my vim editor : ":%s/d_alias/d_u.d_alias/g" to replace any d_alias with his own new structure. The file to edit is 'inode.c'
And finally just compress back the folder with : "tar cvf vmhgfs.tar vmhgfs-only" command

I restart the installer from the vmware-tools-distrib folder and now I can access to my shared folder.

Don't worry if just after the compilation the HGFS service display as failed, it's (normally) because you didn't add any share to your vmware settings. Add it and it will show up in your /mnt/hgfs/ folder

The VMwareTools version is : VMwareTools-9.9.2-2496486.tar.gz

Hope It could help some of you :)

Ok so I succeed with hgfs installation.

I uncompressed the "vmware-tools-distrib/lib/modules/source/vmhgfs.tar" with "tar cvf" command
then I used this command in my vim editor : ":%s/d_alias/d_u.d_alias/g" to replace any d_alias with his own new structure. The file to edit is 'inode.c'
And finally just compress back the folder with : "tar cvf vmhgfs.tar vmhgfs-only" command

I restart the installer from the vmware-tools-distrib folder and now I can access to my shared folder.

Don't worry if just after the compilation the HGFS service display as failed, it's (normally) because you didn't add any share to your vmware settings. Add it and it will show up in your /mnt/hgfs/ folder

The VMwareTools version is : VMwareTools-9.9.2-2496486.tar.gz

Hope It could help some of you :)

@anodynos

This comment has been minimized.

Show comment
Hide comment
@anodynos

anodynos Feb 28, 2015

I have the same here problem Kubuntu 14.04 (3.13.0-46-generic) & VMWare Workstation 11.1 & VMwareTools-9.9.2-2496486.tar.gz
With the previous kernel 3.13.0-45 & VMwareTools-9.9.0 hgfs was working just fine (having applied the patch back in December).

I have the same here problem Kubuntu 14.04 (3.13.0-46-generic) & VMWare Workstation 11.1 & VMwareTools-9.9.2-2496486.tar.gz
With the previous kernel 3.13.0-45 & VMwareTools-9.9.0 hgfs was working just fine (having applied the patch back in December).

@eborshch

This comment has been minimized.

Show comment
Hide comment
@eborshch

eborshch Mar 2, 2015

@vschoener thanks a bunch! It works!

eborshch commented Mar 2, 2015

@vschoener thanks a bunch! It works!

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Mar 2, 2015

@eborshch You're welcome, I forgot to mention the file to edit "inode.c" But you found out :)

@eborshch You're welcome, I forgot to mention the file to edit "inode.c" But you found out :)

@anodynos

This comment has been minimized.

Show comment
Hide comment
@anodynos

anodynos Mar 2, 2015

@vschoener

I used this command in my vim editor : ":%s/d_alias/d_u.d_alias/g" to replace any d_alias with his own new structure. The file to edit is 'inode.c'

Can you please elaborate with his own new structure ? What string did you replace d_alias with ?

anodynos commented Mar 2, 2015

@vschoener

I used this command in my vim editor : ":%s/d_alias/d_u.d_alias/g" to replace any d_alias with his own new structure. The file to edit is 'inode.c'

Can you please elaborate with his own new structure ? What string did you replace d_alias with ?

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Mar 2, 2015

I replaced d_alias to d_u.d_alias because this variable has been moved the "dentry" structure.

I replaced d_alias to d_u.d_alias because this variable has been moved the "dentry" structure.

@LukeMauldin

This comment has been minimized.

Show comment
Hide comment
@LukeMauldin

LukeMauldin Mar 2, 2015

Following @vschoener instructions worked for me on Ubuntu 14.10.

Following @vschoener instructions worked for me on Ubuntu 14.10.

@anodynos

This comment has been minimized.

Show comment
Hide comment
@anodynos

anodynos Mar 2, 2015

Thanks @vschoener - it worked great!
FYI I did it on Kubuntu 14.10 x64 with kernel 3.16.0-31-generic.

BTW I cant believe that such a small change escapes VMWare's attention and break the whole product.

anodynos commented Mar 2, 2015

Thanks @vschoener - it worked great!
FYI I did it on Kubuntu 14.10 x64 with kernel 3.16.0-31-generic.

BTW I cant believe that such a small change escapes VMWare's attention and break the whole product.

@henrylee18

This comment has been minimized.

Show comment
Hide comment
@henrylee18

henrylee18 Mar 3, 2015

@vschoener thanks for the tip and it works!

@vschoener thanks for the tip and it works!

@bentoner

This comment has been minimized.

Show comment
Hide comment
@bentoner

bentoner Mar 3, 2015

Thank you. This fixes shared folders for me on Ubuntu 14.04 with VMwareTools-9.9.0-2304977 on Workstation 11.0.0.

bentoner commented Mar 3, 2015

Thank you. This fixes shared folders for me on Ubuntu 14.04 with VMwareTools-9.9.0-2304977 on Workstation 11.0.0.

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Mar 4, 2015

Thanks you all, I'm glad this fix is helping everyone :)

Thanks you all, I'm glad this fix is helping everyone :)

@tuongngoc

This comment has been minimized.

Show comment
Hide comment
@tuongngoc

tuongngoc Mar 5, 2015

Thanks! It works fine for me too.

I run this

#!/bin/sh -x
cd /usr/lib/vmware-tools/modules/source
tar xf vmhgfs.tar
grep -q d_u.d_alias vmhgfs-only/inode.c && echo "already patched" && exit 0
sed -i -e s/d_alias/d_u.d_alias/ vmhgfs-only/inode.c
cp -p vmhgfs.tar vmhgfs.tar.orig
tar cf vmhgfs.tar vmhgfs-only
vmware-config-tools.pl -d -m

NOTE: this makes the tools incompatible with older kernel versions, i.e. 3.13.0-45.

Thanks! It works fine for me too.

I run this

#!/bin/sh -x
cd /usr/lib/vmware-tools/modules/source
tar xf vmhgfs.tar
grep -q d_u.d_alias vmhgfs-only/inode.c && echo "already patched" && exit 0
sed -i -e s/d_alias/d_u.d_alias/ vmhgfs-only/inode.c
cp -p vmhgfs.tar vmhgfs.tar.orig
tar cf vmhgfs.tar vmhgfs-only
vmware-config-tools.pl -d -m

NOTE: this makes the tools incompatible with older kernel versions, i.e. 3.13.0-45.

@rasa

This comment has been minimized.

Show comment
Hide comment
Owner

rasa commented Mar 6, 2015

@eborshch: How did you get kernel 3.13.0, as 3.16.0 is the default, per https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes#Linux_kernel_3.16 .

Also, I've installed both
http://releases.ubuntu.com/trusty/ubuntu-14.04.2-server-amd64.iso and
http://cdimage.ubuntu.com/ubuntu-server/trusty/daily/current/trusty-server-amd64.iso
using VMwareTools-9.9.2-2496486.tar.gz, and always get kernel 3.16.0 and did not encounter any issues.

@rasa rasa closed this in 6fbf7a0 Mar 7, 2015

@ashb

This comment has been minimized.

Show comment
Hide comment
@ashb

ashb Mar 7, 2015

This fix still didn't work for me on Ubuntu 12.02 with linux-generic-lts-trusty (kernel 3.13.0-46) and I had to just hack the patch by adding a custom patch like this:

cat > patches/vmhgfs/99-vmhgfs-inode-hack-hack-bodge.patch   <<EOF
--- vmhgfs-only/inode.c.oirg    2015-03-06 14:56:04.344130628 +0000
+++ vmhgfs-only/inode.c 2015-03-06 14:56:14.583830707 +0000
@@ -1922,11 +1922,7 @@
                            p,
 #endif
                            &inode->i_dentry,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 1) && !defined(__GENKSYMS__) && !defined(D_ALIAS_IS_A_MEMBER_OF_UNION_D_U)
-                           d_alias) {
-#else
                            d_u.d_alias) {
-#endif
          int dcount = hgfs_d_count(dentry);
          if (dcount) {
             LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
@@ -1979,11 +1975,7 @@
       /* Find a dentry with valid d_count. Refer bug 587879. */
       list_for_each(pos, &inode->i_dentry) {
          int dcount;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 1) && !defined(__GENKSYMS__) && !defined(D_ALIAS_IS_A_MEMBER_OF_UNION_D_U)
-         struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
-#else
          struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
-#endif
          dcount = hgfs_d_count(dentry);
          if (dcount) {
             LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
EOF

With this done I get the vmhgfs module compiled and loaded.

ashb commented Mar 7, 2015

This fix still didn't work for me on Ubuntu 12.02 with linux-generic-lts-trusty (kernel 3.13.0-46) and I had to just hack the patch by adding a custom patch like this:

cat > patches/vmhgfs/99-vmhgfs-inode-hack-hack-bodge.patch   <<EOF
--- vmhgfs-only/inode.c.oirg    2015-03-06 14:56:04.344130628 +0000
+++ vmhgfs-only/inode.c 2015-03-06 14:56:14.583830707 +0000
@@ -1922,11 +1922,7 @@
                            p,
 #endif
                            &inode->i_dentry,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 1) && !defined(__GENKSYMS__) && !defined(D_ALIAS_IS_A_MEMBER_OF_UNION_D_U)
-                           d_alias) {
-#else
                            d_u.d_alias) {
-#endif
          int dcount = hgfs_d_count(dentry);
          if (dcount) {
             LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
@@ -1979,11 +1975,7 @@
       /* Find a dentry with valid d_count. Refer bug 587879. */
       list_for_each(pos, &inode->i_dentry) {
          int dcount;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 1) && !defined(__GENKSYMS__) && !defined(D_ALIAS_IS_A_MEMBER_OF_UNION_D_U)
-         struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
-#else
          struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
-#endif
          dcount = hgfs_d_count(dentry);
          if (dcount) {
             LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
EOF

With this done I get the vmhgfs module compiled and loaded.

@rasa

This comment has been minimized.

Show comment
Hide comment
@rasa

rasa Mar 8, 2015

Owner

@ashb That's weird. What VMware Tools version did you use?

Owner

rasa commented Mar 8, 2015

@ashb That's weird. What VMware Tools version did you use?

@ashb

This comment has been minimized.

Show comment
Hide comment
@ashb

ashb Mar 8, 2015

I thought it was 9.6.2, but vmware-toolbox-cmd --version says 9.9.2 so I'm trying again.

ashb commented Mar 8, 2015

I thought it was 9.6.2, but vmware-toolbox-cmd --version says 9.9.2 so I'm trying again.

@cty12

This comment has been minimized.

Show comment
Hide comment
@cty12

cty12 Mar 9, 2015

@vschoener

So just replace the 'd_alias' will be fine? Do I have to patch the code using the patch provided in this repo first?

Many thanks.

cty12 commented Mar 9, 2015

@vschoener

So just replace the 'd_alias' will be fine? Do I have to patch the code using the patch provided in this repo first?

Many thanks.

@frol

This comment has been minimized.

Show comment
Hide comment
@frol

frol Mar 9, 2015

@rasa It seems that Ubuntu team has backported some features from 3.17+ to LTS kernels (3.13.0-46, 3.16.0-31 and probably some other). I can confirm that applying the patch without a check for 3.18.1 kernel works for me on 3.13.0-46 (3.13.0-45 worker well without the patch).

frol commented Mar 9, 2015

@rasa It seems that Ubuntu team has backported some features from 3.17+ to LTS kernels (3.13.0-46, 3.16.0-31 and probably some other). I can confirm that applying the patch without a check for 3.18.1 kernel works for me on 3.13.0-46 (3.13.0-45 worker well without the patch).

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Mar 9, 2015

@cty12 I didn't patch anything according to the available patch here.
I just replaced the 'd_alias' and everything works fine.
(My kernel is 3.2.X)

@cty12 I didn't patch anything according to the available patch here.
I just replaced the 'd_alias' and everything works fine.
(My kernel is 3.2.X)

@rasa

This comment has been minimized.

Show comment
Hide comment
@rasa

rasa Mar 9, 2015

Owner

Fixed in 192e3b7

Owner

rasa commented Mar 9, 2015

Fixed in 192e3b7

@130s

This comment has been minimized.

Show comment
Hide comment
@130s

130s Mar 9, 2015

Confirmed that 192e3b7 works. Thank you for the work @rasa and all.

3.13.0-46-generic
Host: Ubuntu 14.04 64b
Guest: Ubuntu 12.04 64b

130s commented Mar 9, 2015

Confirmed that 192e3b7 works. Thank you for the work @rasa and all.

3.13.0-46-generic
Host: Ubuntu 14.04 64b
Guest: Ubuntu 12.04 64b

@mouse07410

This comment has been minimized.

Show comment
Hide comment
@mouse07410

mouse07410 Mar 24, 2015

@vschoener, you're great! Thank you for saving my Ubuntu 14.10 LTS!

@vschoener, you're great! Thank you for saving my Ubuntu 14.10 LTS!

@suntong

This comment has been minimized.

Show comment
Hide comment
@suntong

suntong Mar 25, 2015

Thank you @vschoener, works great for

VMwareTools-9.9.2-2496486 for
guest Ubuntu 14.10
with kernel 3.16.0-33-generic x86_64
under VMware Workstation for Windows v11.1.0.2496824

suntong commented Mar 25, 2015

Thank you @vschoener, works great for

VMwareTools-9.9.2-2496486 for
guest Ubuntu 14.10
with kernel 3.16.0-33-generic x86_64
under VMware Workstation for Windows v11.1.0.2496824

@pscorrigan

This comment has been minimized.

Show comment
Hide comment
@pscorrigan

pscorrigan Apr 1, 2015

@vschoener -
Many thanks for this ... your fix saved me time ... and a headache ! ...

This fix works perfectly for
VMware Tools 9.6.2.31837 (build-1688356)
guest Ubuntu 12.04.5 LTS
with kernel 3.13.0-48-generic x86_64
under VMware Player 6.0.4 build-2249910 for Windows 7 Ultimate

@vschoener -
Many thanks for this ... your fix saved me time ... and a headache ! ...

This fix works perfectly for
VMware Tools 9.6.2.31837 (build-1688356)
guest Ubuntu 12.04.5 LTS
with kernel 3.13.0-48-generic x86_64
under VMware Player 6.0.4 build-2249910 for Windows 7 Ultimate

@pscorrigan

This comment has been minimized.

Show comment
Hide comment
@pscorrigan

pscorrigan Apr 2, 2015

@vschoener -

Further note ...

This fix works also works perfectly for:
VMware Tools 9.6.2.31837 (build-1688356)
guest Ubuntu 14.04.2 LTS (trusty)
with kernel 3.13.0-48-generic x86_64
under VMware Player 6.0.4 build-2249910 for Windows 7 Ultimate

... thanks again!

@vschoener -

Further note ...

This fix works also works perfectly for:
VMware Tools 9.6.2.31837 (build-1688356)
guest Ubuntu 14.04.2 LTS (trusty)
with kernel 3.13.0-48-generic x86_64
under VMware Player 6.0.4 build-2249910 for Windows 7 Ultimate

... thanks again!

@phlegx

This comment has been minimized.

Show comment
Hide comment
@phlegx

phlegx Apr 3, 2015

@tuongngoc thx! Yout shell script works for me.

phlegx commented Apr 3, 2015

@tuongngoc thx! Yout shell script works for me.

@yakovkeselman

This comment has been minimized.

Show comment
Hide comment
@yakovkeselman

yakovkeselman Apr 14, 2015

@tuongngoc: many thanks! Your shell script worked for me too! Great job!

@tuongngoc: many thanks! Your shell script worked for me too! Great job!

@papabasile

This comment has been minimized.

Show comment
Hide comment
@papabasile

papabasile Apr 15, 2015

@tuongngoc Thanks! The script worked fine for me too!

@tuongngoc Thanks! The script worked fine for me too!

@rasa

This comment has been minimized.

Show comment
Hide comment
@rasa

rasa Apr 16, 2015

Owner

Is everyone implying that master is broken?

Owner

rasa commented Apr 16, 2015

Is everyone implying that master is broken?

@jverhoeven

This comment has been minimized.

Show comment
Hide comment
@jverhoeven

jverhoeven Apr 22, 2015

@vschoener

Great stuff. Fix works fine! Shame on VMWare for not fixing this immediately. Really: 2 replaces in one inode.c file?

@vschoener

Great stuff. Fix works fine! Shame on VMWare for not fixing this immediately. Really: 2 replaces in one inode.c file?

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Apr 22, 2015

@jverhoeven : You're welcome :) Indeed, it's shame to let this broken.. But now there is a great community to fix the problem and make people happy :)

@jverhoeven : You're welcome :) Indeed, it's shame to let this broken.. But now there is a great community to fix the problem and make people happy :)

@ethanlu2

This comment has been minimized.

Show comment
Hide comment
@ethanlu2

ethanlu2 Apr 23, 2015

@vschoener Thanks a lot. It helped!

@vschoener Thanks a lot. It helped!

@Cyber4

This comment has been minimized.

Show comment
Hide comment
@Cyber4

Cyber4 May 6, 2015

Hopefully this works for me when I get home. Have to reinstall my entire VM after screwing up the boot trying to fix this problem. Using Ubuntu 15.04

Cyber4 commented May 6, 2015

Hopefully this works for me when I get home. Have to reinstall my entire VM after screwing up the boot trying to fix this problem. Using Ubuntu 15.04

@armanshahrisa

This comment has been minimized.

Show comment
Hide comment
@armanshahrisa

armanshahrisa May 18, 2015

Thanks a lot! It worked for me! I was getting crazy!!

Thanks a lot! It worked for me! I was getting crazy!!

@au10tic

This comment has been minimized.

Show comment
Hide comment
@au10tic

au10tic Jun 11, 2015

followed the instructions found here: https://github.com/rasa/vmware-tools-patches/ on "Lubuntu 14.04.2 LTS, Trusty Tahr" and vmhgfs and copy/paste works, drag and drop works from guest to host, not vice-versa. Lubuntu is running 3.16.0-30-generic

the patch would not work on "lubuntu 15.04 (vivid vervet)" running kernel 3.19.0-18 generic, [vmhgfs works, copy/paste, drag and drop dont work]

also restarting vmware-user gives this error:
/usr/share/themes/Lubuntu-default/gtk-2.0/apps/thunar.rc:55: error: invalid string constant "thunar-statusbar", expected valid string constant

output below after running,/untar-and-patch.sh
*** Applying vmblock/01-vmblock.3.10.patch ...
patching file linux/control.c
*** Applying vmblock/02-vmblock.3.11.patch ...
patching file linux/file.c
*** Applying vmblock/03-vmblock.3.12.patch ...
patching file linux/control.c
patching file linux/dentry.c
patching file linux/inode.c
*** Applying vmblock/04-vmblock-vfs_readlink-kernel-3.15-tools-9.6.2.patch ...
patching file linux/inode.c
Hunk #1 succeeded at 177 (offset -1 lines).
*** Applying vsock/01-vsock-sk_data_ready-kernel-3.15-tools-9.6.2.patch ...
patching file linux/notify.c
patching file linux/notifyQState.c
*** Applying vmci/01-vmware9.k3.8rc4.patch ...
patching file linux/driver.c
Reversed (or previously applied) patch detected! Assuming -R.
Hunk #1 succeeded at 128 with fuzz 1 (offset 4 lines).
Hunk #2 succeeded at 1745 (offset -5 lines).
Hunk #3 succeeded at 1976 (offset -2 lines).
*** Skipping vmhgfs/01-compat_dcache.h.patch: did not apply cleanly
*** Skipping vmhgfs/02-patch_inode.c.patch: did not apply cleanly
*** Applying vmhgfs/03-vmhgfs-3.15-vfs_readlink.patch ...
patching file link.c
Hunk #1 succeeded at 160 (offset 9 lines).
Hunk #2 succeeded at 200 (offset 11 lines).
*** Applying vmhgfs/04-vmhgfs-d_alias-kernel-3.18.1-tools-9.9.0.patch ...
patching file inode.c
patching file Makefile.kernel
patching file shared/autoconf/d_alias.c
*** Skipping vmhgfs/05-vmhgfs-d_count-kernel-3.11-tools-9.6.0.patch: did not apply cleanly
*** Skipping vmhgfs/06-vmhgfs-d_set_type-kernel-3.18.1-tools-9.6.1.patch: did not apply cleanly
*** Skipping vmhgfs/07-vmhgfs-rename_deprecated-kernel-3.18.1-tools-9.6.1.patch: did not apply cleanly
*** Applying vmhgfs/08-vmhgfs-smp_mb_before_clear_bit-3.18-tools-9.9.0.patch ...
patching file page.c
*** Skipping vmhgfs/09-vmhgfs-uid-gid-kernel-3.12-tools-9.6.1.patch: did not apply cleanly
*** Skipping vmhgfs/10-vmhgfs-vfs_readlink-kernel-3.16-tools-9.6.2.patch: did not apply cleanly
*** Skipping vmhgfs/11-vmhgfs-wait_on_bit-kernel-3.17-tools-9.6.2.patch: did not apply cleanly
*** Skipping vmhgfs/12-vmware9.compat_mm.patch: did not apply cleanly
*** Applying vmhgfs/13-vmhgfs-f_dentry-kernel-3.19-tools-9.9.2.patch ...
patching file dir.c
patching file file.c
patching file fsutil.c
patching file shared/compat_dentry.h
*** Skipping vmhgfs/14-vmhgfs-d_alias-kernel-3.18.1-tools-9.6.2.patch: did not apply cleanly
*** Applying vmhgfs/15-vmhgfs-bdi-kernel-4.0-tools-9.9.2.patch ...
patching file filesystem.c
patching file module.h
patching file super.c
*** Skipping vmhgfs/16-vmhgfs-f_dentry-kernel-3.19.0-15-tools-9.6.2.patch: did not apply cleanly

au10tic commented Jun 11, 2015

followed the instructions found here: https://github.com/rasa/vmware-tools-patches/ on "Lubuntu 14.04.2 LTS, Trusty Tahr" and vmhgfs and copy/paste works, drag and drop works from guest to host, not vice-versa. Lubuntu is running 3.16.0-30-generic

the patch would not work on "lubuntu 15.04 (vivid vervet)" running kernel 3.19.0-18 generic, [vmhgfs works, copy/paste, drag and drop dont work]

also restarting vmware-user gives this error:
/usr/share/themes/Lubuntu-default/gtk-2.0/apps/thunar.rc:55: error: invalid string constant "thunar-statusbar", expected valid string constant

output below after running,/untar-and-patch.sh
*** Applying vmblock/01-vmblock.3.10.patch ...
patching file linux/control.c
*** Applying vmblock/02-vmblock.3.11.patch ...
patching file linux/file.c
*** Applying vmblock/03-vmblock.3.12.patch ...
patching file linux/control.c
patching file linux/dentry.c
patching file linux/inode.c
*** Applying vmblock/04-vmblock-vfs_readlink-kernel-3.15-tools-9.6.2.patch ...
patching file linux/inode.c
Hunk #1 succeeded at 177 (offset -1 lines).
*** Applying vsock/01-vsock-sk_data_ready-kernel-3.15-tools-9.6.2.patch ...
patching file linux/notify.c
patching file linux/notifyQState.c
*** Applying vmci/01-vmware9.k3.8rc4.patch ...
patching file linux/driver.c
Reversed (or previously applied) patch detected! Assuming -R.
Hunk #1 succeeded at 128 with fuzz 1 (offset 4 lines).
Hunk #2 succeeded at 1745 (offset -5 lines).
Hunk #3 succeeded at 1976 (offset -2 lines).
*** Skipping vmhgfs/01-compat_dcache.h.patch: did not apply cleanly
*** Skipping vmhgfs/02-patch_inode.c.patch: did not apply cleanly
*** Applying vmhgfs/03-vmhgfs-3.15-vfs_readlink.patch ...
patching file link.c
Hunk #1 succeeded at 160 (offset 9 lines).
Hunk #2 succeeded at 200 (offset 11 lines).
*** Applying vmhgfs/04-vmhgfs-d_alias-kernel-3.18.1-tools-9.9.0.patch ...
patching file inode.c
patching file Makefile.kernel
patching file shared/autoconf/d_alias.c
*** Skipping vmhgfs/05-vmhgfs-d_count-kernel-3.11-tools-9.6.0.patch: did not apply cleanly
*** Skipping vmhgfs/06-vmhgfs-d_set_type-kernel-3.18.1-tools-9.6.1.patch: did not apply cleanly
*** Skipping vmhgfs/07-vmhgfs-rename_deprecated-kernel-3.18.1-tools-9.6.1.patch: did not apply cleanly
*** Applying vmhgfs/08-vmhgfs-smp_mb_before_clear_bit-3.18-tools-9.9.0.patch ...
patching file page.c
*** Skipping vmhgfs/09-vmhgfs-uid-gid-kernel-3.12-tools-9.6.1.patch: did not apply cleanly
*** Skipping vmhgfs/10-vmhgfs-vfs_readlink-kernel-3.16-tools-9.6.2.patch: did not apply cleanly
*** Skipping vmhgfs/11-vmhgfs-wait_on_bit-kernel-3.17-tools-9.6.2.patch: did not apply cleanly
*** Skipping vmhgfs/12-vmware9.compat_mm.patch: did not apply cleanly
*** Applying vmhgfs/13-vmhgfs-f_dentry-kernel-3.19-tools-9.9.2.patch ...
patching file dir.c
patching file file.c
patching file fsutil.c
patching file shared/compat_dentry.h
*** Skipping vmhgfs/14-vmhgfs-d_alias-kernel-3.18.1-tools-9.6.2.patch: did not apply cleanly
*** Applying vmhgfs/15-vmhgfs-bdi-kernel-4.0-tools-9.9.2.patch ...
patching file filesystem.c
patching file module.h
patching file super.c
*** Skipping vmhgfs/16-vmhgfs-f_dentry-kernel-3.19.0-15-tools-9.6.2.patch: did not apply cleanly

@william-dowling

This comment has been minimized.

Show comment
Hide comment
@william-dowling

william-dowling Jun 11, 2015

@tuongngoc and @vschoener Your tweak worked great for me with this guest setup
$ uname -a
Linux desktop 3.2.0-85-generic #122-Ubuntu SMP Tue May 26 16:15:25 UTC 2015 i686 i686 i386 GNU/Linux
Thanks!

@tuongngoc and @vschoener Your tweak worked great for me with this guest setup
$ uname -a
Linux desktop 3.2.0-85-generic #122-Ubuntu SMP Tue May 26 16:15:25 UTC 2015 i686 i686 i386 GNU/Linux
Thanks!

@ehallander9591

This comment has been minimized.

Show comment
Hide comment
@ehallander9591

ehallander9591 Jun 18, 2015

I am glad I found this thread of discussion. It worked for me.

I am glad I found this thread of discussion. It worked for me.

@pgiu

This comment has been minimized.

Show comment
Hide comment
@pgiu

pgiu Jun 23, 2015

Happened the same to me today.
My configurations:
Windows 7 Host
Ubuntu 14.04 w/ 3.13.0-52 kernel
Vmware 10.0.6 with Tools 9.6.5

I had the "d_alias" issue but the patches on the "patches" directory didn't solve the problem.
Instead I got a new problem saying that there was a problem with a structure called DENTRY.

I ended up looking for a patch that had to do with the DENTRY struct and copied to the same patch directory with a name that matched my vmware tools version. I don't know how if that's the proper way to do it but it appears to be working now.

This is my two cents just in case anyone bumps into the same problem.

cd patches/vmhgfs
cp -p 16-vmhgfs-f_dentry-kernel-3.19.0-15-tools-9.6.2.patch 16-vmhgfs-f_dentry-kernel-3.13.0-15-tools-9.6.5.patch

And I can now see the windows drive mounted at /mnt
Thanks for all the hard work!!

pgiu commented Jun 23, 2015

Happened the same to me today.
My configurations:
Windows 7 Host
Ubuntu 14.04 w/ 3.13.0-52 kernel
Vmware 10.0.6 with Tools 9.6.5

I had the "d_alias" issue but the patches on the "patches" directory didn't solve the problem.
Instead I got a new problem saying that there was a problem with a structure called DENTRY.

I ended up looking for a patch that had to do with the DENTRY struct and copied to the same patch directory with a name that matched my vmware tools version. I don't know how if that's the proper way to do it but it appears to be working now.

This is my two cents just in case anyone bumps into the same problem.

cd patches/vmhgfs
cp -p 16-vmhgfs-f_dentry-kernel-3.19.0-15-tools-9.6.2.patch 16-vmhgfs-f_dentry-kernel-3.13.0-15-tools-9.6.5.patch

And I can now see the windows drive mounted at /mnt
Thanks for all the hard work!!

@rasa

This comment has been minimized.

Show comment
Hide comment
@rasa

rasa Jun 25, 2015

Owner

Wow. Running

cp -p 16-vmhgfs-f_dentry-kernel-3.19.0-15-tools-9.6.2.patch 16-vmhgfs-f_dentry-kernel-3.13.0-15-tools-9.6.5.patch

should not have fixed your issue as the filenames are meaningless, other than the sort order. I have no idea how that fixed your issue.

Owner

rasa commented Jun 25, 2015

Wow. Running

cp -p 16-vmhgfs-f_dentry-kernel-3.19.0-15-tools-9.6.2.patch 16-vmhgfs-f_dentry-kernel-3.13.0-15-tools-9.6.5.patch

should not have fixed your issue as the filenames are meaningless, other than the sort order. I have no idea how that fixed your issue.

@pgiu

This comment has been minimized.

Show comment
Hide comment
@pgiu

pgiu Jun 25, 2015

Hi @rasa I thought that was what solved my problem but It seems that I was wrong. I just assumed that the script would patch depending on the vmware tools version so I decided to copy that patch. I was in a rush trying to make it work so I might have not payed full attention to it.
I see that you're the owner of the project so feel free to disregard/delete my comment if you find it inappropriate. Anyway, thanks for sharing this.

pgiu commented Jun 25, 2015

Hi @rasa I thought that was what solved my problem but It seems that I was wrong. I just assumed that the script would patch depending on the vmware tools version so I decided to copy that patch. I was in a rush trying to make it work so I might have not payed full attention to it.
I see that you're the owner of the project so feel free to disregard/delete my comment if you find it inappropriate. Anyway, thanks for sharing this.

@asoc

This comment has been minimized.

Show comment
Hide comment
@asoc

asoc Jul 6, 2015

I ran into this issue today with the following:

Ubuntu 12.04 w/ 3.5.0-41
VMware Fusion 7.1.2 and Tools 9.9.3-2759765

The included dalias patches weren't being applied because VMware's moved the relevant d_alias lines to a #define hgfs_d_alias() statement which caused shared/autoconf/dalias.c to fail to be patched.

I created a new patch, I've pasted it below so hopefully someone else will get some use out of it. It can probably be rewritten to just replace the file outright without caring about old contents, but it works for me as is...

patches/vmhgfs/18-vmhgfs-d_alias-kernel-3.18.1-tools-9.9.3.patch

diff -uwNr vmhgfs-only.orig/shared/autoconf/dalias.c vmhgfs-only/shared/autoconf/dalias.c
--- vmhgfs-only.orig/shared/autoconf/dalias.c   1969-12-31 16:00:00.000000000 -0800
+++ vmhgfs-only/shared/autoconf/dalias.c        2015-03-18 19:14:44.751231007 -0700
@@ -1,45 +1,21 @@
 /*********************************************************
- * Copyright (C) 2015 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 and no later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Copyright (C) 2015 Ross Smith II. MIT Licensed.
  *
  *********************************************************/

 #include "compat_version.h"
 #include "compat_autoconf.h"

-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
 #include <linux/dcache.h>
-#include <linux/list.h>

 /*
- * After 3.19.0, the dentry d_alias field was moved. Fedora
- * backported this behavior into a 3.18.0 kernel.
+ * After 3.18.1, the dentry d_alias field was moved to struct d_u.
  *
  * This test will fail on a kernel with such a patch.
  */
 void test(void)
 {
-   struct dentry aliasDentry;
+   struct dentry dentry;

-   INIT_HLIST_NODE(&aliasDentry.d_alias);
+   dentry.d_alias.next = NULL;
 }
-
-#else
-/* Intentionally passes for earlier than 3.9.0 kernels as d_alias is valid. */
-#endif
-#else
-#error "This test intentionally fails on 3.19.0 or newer kernels."
-#endif

asoc commented Jul 6, 2015

I ran into this issue today with the following:

Ubuntu 12.04 w/ 3.5.0-41
VMware Fusion 7.1.2 and Tools 9.9.3-2759765

The included dalias patches weren't being applied because VMware's moved the relevant d_alias lines to a #define hgfs_d_alias() statement which caused shared/autoconf/dalias.c to fail to be patched.

I created a new patch, I've pasted it below so hopefully someone else will get some use out of it. It can probably be rewritten to just replace the file outright without caring about old contents, but it works for me as is...

patches/vmhgfs/18-vmhgfs-d_alias-kernel-3.18.1-tools-9.9.3.patch

diff -uwNr vmhgfs-only.orig/shared/autoconf/dalias.c vmhgfs-only/shared/autoconf/dalias.c
--- vmhgfs-only.orig/shared/autoconf/dalias.c   1969-12-31 16:00:00.000000000 -0800
+++ vmhgfs-only/shared/autoconf/dalias.c        2015-03-18 19:14:44.751231007 -0700
@@ -1,45 +1,21 @@
 /*********************************************************
- * Copyright (C) 2015 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2 and no later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * Copyright (C) 2015 Ross Smith II. MIT Licensed.
  *
  *********************************************************/

 #include "compat_version.h"
 #include "compat_autoconf.h"

-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
 #include <linux/dcache.h>
-#include <linux/list.h>

 /*
- * After 3.19.0, the dentry d_alias field was moved. Fedora
- * backported this behavior into a 3.18.0 kernel.
+ * After 3.18.1, the dentry d_alias field was moved to struct d_u.
  *
  * This test will fail on a kernel with such a patch.
  */
 void test(void)
 {
-   struct dentry aliasDentry;
+   struct dentry dentry;

-   INIT_HLIST_NODE(&aliasDentry.d_alias);
+   dentry.d_alias.next = NULL;
 }
-
-#else
-/* Intentionally passes for earlier than 3.9.0 kernels as d_alias is valid. */
-#endif
-#else
-#error "This test intentionally fails on 3.19.0 or newer kernels."
-#endif
@rasa

This comment has been minimized.

Show comment
Hide comment
@rasa

rasa Jul 7, 2015

Owner

I added your patch in cb6bce5, but I haven't tested it yet.

Owner

rasa commented Jul 7, 2015

I added your patch in cb6bce5, but I haven't tested it yet.

@russt

This comment has been minimized.

Show comment
Hide comment
@russt

russt Jul 26, 2015

@tuongngoc Thanks! Used your script to patch debian 8.1.0, VMwareTools-9.9.2-2496486.tar.gz
I had to re-run vmware-config-tools.pl manually to re-select hgfs option, compiled fine the second time.

russt commented Jul 26, 2015

@tuongngoc Thanks! Used your script to patch debian 8.1.0, VMwareTools-9.9.2-2496486.tar.gz
I had to re-run vmware-config-tools.pl manually to re-select hgfs option, compiled fine the second time.

@dkxl

This comment has been minimized.

Show comment
Hide comment
@dkxl

dkxl Sep 9, 2015

@asoc - Thanks, your patch to dalias.c also works for debian wheezy (3.2.0-4-amd64) and VMwareTools 9.9.3.47419 (build-2759765)

dkxl commented Sep 9, 2015

@asoc - Thanks, your patch to dalias.c also works for debian wheezy (3.2.0-4-amd64) and VMwareTools 9.9.3.47419 (build-2759765)

@LivioCzar

This comment has been minimized.

Show comment
Hide comment
@LivioCzar

LivioCzar Oct 14, 2015

@vschoener - thanks for the simple solution - works for me with
Windows 7 (Host)
Xubuntu 14.04.03 LTS (Guest)
Kernel 3.13.0-65-generic
VMWare 10.0.3
VMWareTools 9.6.2.31837

@vschoener - thanks for the simple solution - works for me with
Windows 7 (Host)
Xubuntu 14.04.03 LTS (Guest)
Kernel 3.13.0-65-generic
VMWare 10.0.3
VMWareTools 9.6.2.31837

@tracyzhen

This comment has been minimized.

Show comment
Hide comment
@tracyzhen

tracyzhen Jan 3, 2016

@vschoener thanks a lot, it works !

@vschoener thanks a lot, it works !

@vschoener

This comment has been minimized.

Show comment
Hide comment
@vschoener

vschoener Jan 3, 2016

You're welcome :)

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment