To compile the vmhgfs VMwareTools on Linux kernel 2.6.22, it is needed to patch the source code, like explained there, from a tar.gz installation.
The same fix works from rpm installation, although the VMwareTools source code directory may be different (/usr/lib/vmware-tools/modules/source for me):
- move to /usr/lib/vmware-tools/modules/source/
- untar vmhgfs.tar and backup it
- then follow the same instructions:
"Now edit vmhgfs/driver.c and change lines 44 and 45 from
#define INODE_SET_II_P(inode, info) do { (inode)->u.generic_ip = (info); } while (0)
#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->u.generic_ip)
to
#define INODE_SET_II_P(inode, info) do { (inode)->i_private = (info); } while (0)
#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->i_private)
Also, remove line 763: inode->i_blksize = HGFS_BLOCKSIZE;
"
- create a new vmhgfs.tar with patched source code
- the compilation can now be fully performed -> launch /usr/bin/vmware-config-tools.pl again
sharing knowledge earned into design/development/technical delicate and/or difficult situations ...
Labels
Gnu/Linux
(95)
Administration
(83)
StorageHardware
(17)
Programming
(16)
WebBrowser
(15)
General
(11)
GNU/Bash
(7)
Solaris
(7)
Virtualization
(7)
C
(6)
Domotics
(6)
Musics
(5)
Raspberry
(5)
Desktop
(4)
Java
(4)
VersionControlSystems
(4)
ArtificialIntelligence
(2)
Optimization
(2)
multimedia
(2)
Arduino
(1)
Electronics
(1)
LTS
(1)
MacOS
(1)
Mechanics
(1)
Processing
(1)
Robotics
(1)
Ubuntu
(1)
Upgrade
(1)
ez-robot
(1)
Thanks. Here are the errors I got after following your instructions:
ReplyDeleteUsing 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmhgfs-only'
make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-14-generic'
CC [M] /tmp/vmware-config1/vmhgfs-only/cpName.o
CC [M] /tmp/vmware-config1/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/vmware-config1/vmhgfs-only/dev.o
CC [M] /tmp/vmware-config1/vmhgfs-only/driver.o
/tmp/vmware-config1/vmhgfs-only/driver.c:4249: warning: initialization from incompatible pointer type
/tmp/vmware-config1/vmhgfs-only/driver.c: In function 'HgfsGetSb':
/tmp/vmware-config1/vmhgfs-only/driver.c:4458: error: too few arguments to function 'get_sb_nodev'
/tmp/vmware-config1/vmhgfs-only/driver.c: At top level:
/tmp/vmware-config1/vmhgfs-only/driver.c:4504: warning: initialization from incompatible pointer type
make[2]: *** [/tmp/vmware-config1/vmhgfs-only/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-14-generic'
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmhgfs-only'
Unable to build the vmhgfs module.
What is your vmwareTools version ?
ReplyDeleteUnder which GNU/Linux distribution ?