HGFS does not compile on Linux ubuntu 3.16.0-28-generic (14.10) #21

Closed
LukeSkyw opened this Issue Jan 6, 2015 · 8 comments

Comments

Projects
None yet
3 participants

LukeSkyw commented Jan 6, 2015

Hi,
I have a compilation error when compiling VMwareTools-9.6.2-1688356.tar.gz on Ubuntu 14.10 kernel 3.16.0-28:


/tmp/modconfig-3Us57z/vmhgfs-only/inode.c: In function ‘HgfsPermission’:
/tmp/modconfig-3Us57z/vmhgfs-only/inode.c:1903:31: error: ‘union ’ has no member named ‘d_alias’
d_u.d_alias) {
^
include/linux/kernel.h:834:29: note: in definition of macro ‘container_of’
const typeof( ((type _)0)->member ) *__mptr = (ptr);
^
include/linux/list.h:698:15: note: in expansion of macro ‘hlist_entry’
____ptr ? hlist_entry(___ptr, type, member) : NULL;
^
include/linux/list.h:708:13: note: in expansion of macro ‘hlist_entry_safe’
for (pos = hlist_entry_safe((head)->first, typeof(
(pos)), member);
^
/tmp/modconfig-3Us57z/vmhgfs-only/inode.c:1898:7: note: in expansion of macro ‘hlist_for_each_entry’
hlist_for_each_entry(dentry,
^
include/linux/kernel.h:834:48: warning: initialization from incompatible pointer type
const typeof( ((type _)0)->member ) *__mptr = (ptr);
^
include/linux/list.h:687:40: note: in expansion of macro ‘container_of’
#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
^
include/linux/list.h:698:15: note: in expansion of macro ‘hlist_entry’
____ptr ? hlist_entry(___ptr, type, member) : NULL;
^
include/linux/list.h:708:13: note: in expansion of macro ‘hlist_entry_safe’
for (pos = hlist_entry_safe((head)->first, typeof(
(pos)), member);
^
/tmp/modconfig-3Us57z/vmhgfs-only/inode.c:1898:7: note: in expansion of macro ‘hlist_for_each_entry’
hlist_for_each_entry(dentry,


Apparently fixed on next kernel (3.17 and 3.18) but no patch for 3.16.

Luke

Contributor

liayn commented Jan 6, 2015

Which version of vmware-tools are you using?
Did you apply patches?

LukeSkyw commented Jan 6, 2015

Sorry, updated the issue text.

I followed the instruction of the front page:
git clone https://github.com/rasa/vmware-tools-patches.git
cp VMwareTools-*.tar.gz vmware-tools-patches/
cd vmware-tools-patches
./untar-and-patch-and-compile.sh

So I believe the patch are applied automatically. Some patches seem to correspond to the issue (vmhgfs-d_alias-kernel-3.17.7-tools-9.9.0.patch) but this is only for 3.17.7 although the issue seems also present on 3.16.0.

Contributor

liayn commented Jan 6, 2015

I think it's the other way 'round. The patch got applied, but shouldn't have. Don't know why though. Can you unpatch manually?
https://github.com/rasa/vmware-tools-patches/blob/master/patches/vmhgfs/vmhgfs-d_alias-kernel-3.17.7-tools-9.9.0.patch

LukeSkyw commented Jan 6, 2015

I removed:

  • vmhgfs-d_alias-kernel-3.17.7-tools-9.9.0.patch and
  • vmhgfs-d_alias-kernel-3.18.1-tools-9.6.1.patch

then I executed:
./untar-and-patch-and-compile.sh

No compile error and shared folder are working.
Thanks.

Contributor

liayn commented Jan 6, 2015

Great. Please close the issue then.

@LukeSkyw LukeSkyw closed this Jan 9, 2015

Owner

rasa commented Jan 9, 2015

It sounds like we need to update vmhgfs-d_alias-kernel-3.17.7-tools-9.9.0.patch and vmhgfs-d_alias-kernel-3.18.1-tools-9.6.1.patch and add a kernel version check, à la:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
Contributor

liayn commented Jan 9, 2015

indeed, good point

Owner

rasa commented Jan 12, 2015

I just added the kernel version checks mentioned above.

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