最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】VMware Workstation 8下Ubuntu 13.04中安装VMware Tools出错:/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]

VMWare crifan 3176浏览 0评论

【问题】

折腾:

【记录】继续折腾VMWare Workstation 8下的虚拟机Ubuntu 13.04中的文件夹共享

期间,在安装VMWare Tools时出错:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root/modules/vmci-only/driverLog.o
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: initializer element is not constant
/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: (near initialization for ‘vmci_driver.remove’)
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1745:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1973:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c: At top level:
/tmp/vmware-root/modules/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2054:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:2128:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/vmware-root/modules/vmci-only/linux/driver.c:1708:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vmware-root/modules/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/vmware-root/modules/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmci-only'

 

【解决过程】

1.看到编译的时候,用的是:

/tmp/vmware-root/modules/vmci-only/linux/driver.c

所以,去给其打patch,看看是否可行:

crifan@ubuntu:source$ cd /tmp/vmware-root/modules/vmci-only/
bash: cd: /tmp/vmware-root/modules/vmci-only/: Permission denied
crifan@ubuntu:source$ sudo cd /tmp/vmware-root/modules/vmci-only/
sudo: cd: command not found
crifan@ubuntu:source$ sudo
usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid]
            [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ...
crifan@ubuntu:source$ chown --help
Usage: chown [OPTION]... [OWNER][:[GROUP]] FILE...
  or:  chown [OPTION]... --reference=RFILE FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP.
With --reference, change the owner and group of each FILE to those of RFILE.

  -c, --changes          like verbose but report only when a change is made
  -f, --silent, --quiet  suppress most error messages
  -v, --verbose          output a diagnostic for every file processed
      --dereference      affect the referent of each symbolic link (this is
                         the default), rather than the symbolic link itself
  -h, --no-dereference   affect symbolic links instead of any referenced file
                         (useful only on systems that can change the
                         ownership of a symlink)
      --from=CURRENT_OWNER:CURRENT_GROUP
                         change the owner and/or group of each file only if
                         its current owner and/or group match those specified
                         here.  Either may be omitted, in which case a match
                         is not required for the omitted attribute
      --no-preserve-root  do not treat '/' specially (the default)
      --preserve-root    fail to operate recursively on '/'
      --reference=RFILE  use RFILE's owner and group rather than
                         specifying OWNER:GROUP values
  -R, --recursive        operate on files and directories recursively

The following options modify how a hierarchy is traversed when the -R
option is also specified.  If more than one is specified, only the final
one takes effect.

  -H                     if a command line argument is a symbolic link
                         to a directory, traverse it
  -L                     traverse every symbolic link to a directory
                         encountered
  -P                     do not traverse any symbolic links (default)

      --help     display this help and exit
      --version  output version information and exit

Owner is unchanged if missing.  Group is unchanged if missing, but changed
to login group if implied by a ':' following a symbolic OWNER.
OWNER and GROUP may be numeric as well as symbolic.

Examples:
  chown root /u        Change the owner of /u to "root".
  chown root:staff /u  Likewise, but also change its group to "staff".
  chown -hR root /u    Change the owner of /u and subfiles to "root".

Report chown bugs to [email protected]
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'chown invocation'
crifan@ubuntu:source$ chown -R crifan /tmp/vmware-root/modules/vmci-only/
chown: cannot access ‘/tmp/vmware-root/modules/vmci-only/’: Permission denied
crifan@ubuntu:source$ sudo chown -R crifan /tmp/vmware-root/modules/vmci-only/
chown: cannot access ‘/tmp/vmware-root/modules/vmci-only/’: No such file or directory
crifan@ubuntu:source$ sudo chown -R crifan /tmp/vmware-root/
crifan@ubuntu:source$ cd /tmp/vmware-root/modules/vmci-only/
bash: cd: /tmp/vmware-root/modules/vmci-only/: No such file or directory
crifan@ubuntu:source$ cd /tmp/vmware-root/
crifan@ubuntu:vmware-root$ ls
apploader-1231.log   apploader-17601.log  apploader-25528.log  apploader-5290.log   modconfig-17649.log  modconfig-5260.log
apploader-12522.log  apploader-17607.log  apploader-25552.log  apploader-5671.log   modconfig-17671.log  modconfig-5275.log
apploader-12530.log  apploader-17622.log  apploader-25561.log  apploader-5676.log   modconfig-18249.log  modconfig-5290.log
apploader-12543.log  apploader-17628.log  apploader-25572.log  apploader-6058.log   modconfig-18254.log  modconfig-5671.log
apploader-12614.log  apploader-17634.log  apploader-25645.log  apploader-6063.log   modconfig-19006.log  modconfig-5676.log
apploader-12618.log  apploader-17649.log  apploader-25649.log  apploader-6293.log   modconfig-19011.log  modconfig-6058.log
apploader-1390.log   apploader-17671.log  apploader-5222.log   apploader-6298.log   modconfig-19241.log  modconfig-6063.log
apploader-1402.log   apploader-18249.log  apploader-5227.log   modconfig-17596.log  modconfig-19246.log  modconfig-6293.log
apploader-1436.log   apploader-18254.log  apploader-5233.log   modconfig-17601.log  modconfig-5222.log   modconfig-6298.log
apploader-1440.log   apploader-19006.log  apploader-5248.log   modconfig-17607.log  modconfig-5227.log
apploader-1505.log   apploader-19011.log  apploader-5254.log   modconfig-17622.log  modconfig-5233.log
apploader-1511.log   apploader-19241.log  apploader-5260.log   modconfig-17628.log  modconfig-5248.log
apploader-17596.log  apploader-19246.log  apploader-5275.log   modconfig-17634.log  modconfig-5254.log
crifan@ubuntu:vmware-root$ ls -la
total 392
drwx------  2 crifan root 4096 Aug 14 19:46 .
drwxrwxrwt 11 root   root 4096 Aug 14 19:58 ..
-rw-r--r--  1 crifan root 4183 Aug 14 19:03 apploader-1231.log
-rw-r--r--  1 crifan root 4187 Aug 14 19:46 apploader-12522.log
-rw-r--r--  1 crifan root 4117 Aug 14 19:46 apploader-12530.log
-rw-r--r--  1 crifan root 4215 Aug 14 19:46 apploader-12543.log
-rw-r--r--  1 crifan root 2224 Aug 14 19:46 apploader-12614.log
-rw-r--r--  1 crifan root 2211 Aug 14 19:46 apploader-12618.log
-rw-r--r--  1 crifan root 4113 Aug 14 19:03 apploader-1390.log
-rw-r--r--  1 crifan root 4211 Aug 14 19:03 apploader-1402.log
-rw-r--r--  1 crifan root 2223 Aug 14 19:03 apploader-1436.log
-rw-r--r--  1 crifan root 2210 Aug 14 19:03 apploader-1440.log
-rw-------  1 crifan lp   2379 Aug 14 19:03 apploader-1505.log
-rw-------  1 crifan lp   2379 Aug 14 19:03 apploader-1511.log
-rw-r--r--  1 crifan root 4030 Aug 14 19:25 apploader-17596.log
-rw-r--r--  1 crifan root 4008 Aug 14 19:25 apploader-17601.log
-rw-r--r--  1 crifan root 4070 Aug 14 19:25 apploader-17607.log
-rw-r--r--  1 crifan root 4044 Aug 14 19:25 apploader-17622.log
-rw-r--r--  1 crifan root 4044 Aug 14 19:25 apploader-17628.log
-rw-r--r--  1 crifan root 4168 Aug 14 19:25 apploader-17634.log
-rw-r--r--  1 crifan root 4168 Aug 14 19:25 apploader-17649.log
-rw-r--r--  1 crifan root 4196 Aug 14 19:28 apploader-17671.log
-rw-r--r--  1 crifan root 4032 Aug 14 19:39 apploader-18249.log
-rw-r--r--  1 crifan root 4200 Aug 14 19:39 apploader-18254.log
-rw-r--r--  1 crifan root 4034 Aug 14 19:39 apploader-19006.log
-rw-r--r--  1 crifan root 4204 Aug 14 19:39 apploader-19011.log
-rw-r--r--  1 crifan root 4036 Aug 14 19:40 apploader-19241.log
-rw-r--r--  1 crifan root 4208 Aug 14 19:40 apploader-19246.log
-rw-r--r--  1 crifan root 2925 Aug 14 19:40 apploader-25528.log
-rw-r--r--  1 crifan root 4187 Aug 14 19:40 apploader-25552.log
-rw-r--r--  1 crifan root 4117 Aug 14 19:40 apploader-25561.log
-rw-r--r--  1 crifan root 4215 Aug 14 19:40 apploader-25572.log
-rw-r--r--  1 crifan root 2224 Aug 14 19:40 apploader-25645.log
-rw-r--r--  1 crifan root 2211 Aug 14 19:40 apploader-25649.log
-rw-r--r--  1 crifan root 4029 Aug 14 19:44 apploader-5222.log
-rw-r--r--  1 crifan root 4007 Aug 14 19:44 apploader-5227.log
-rw-r--r--  1 crifan root 4069 Aug 14 19:44 apploader-5233.log
-rw-r--r--  1 crifan root 4043 Aug 14 19:44 apploader-5248.log
-rw-r--r--  1 crifan root 4043 Aug 14 19:44 apploader-5254.log
-rw-r--r--  1 crifan root 4167 Aug 14 19:44 apploader-5260.log
-rw-r--r--  1 crifan root 4167 Aug 14 19:44 apploader-5275.log
-rw-r--r--  1 crifan root 4195 Aug 14 19:44 apploader-5290.log
-rw-r--r--  1 crifan root 4031 Aug 14 19:46 apploader-5671.log
-rw-r--r--  1 crifan root 4199 Aug 14 19:46 apploader-5676.log
-rw-r--r--  1 crifan root 4033 Aug 14 19:46 apploader-6058.log
-rw-r--r--  1 crifan root 4203 Aug 14 19:46 apploader-6063.log
-rw-r--r--  1 crifan root 4035 Aug 14 19:46 apploader-6293.log
-rw-r--r--  1 crifan root 4207 Aug 14 19:46 apploader-6298.log
-rw-r--r--  1 crifan root 2794 Aug 14 19:25 modconfig-17596.log
-rw-r--r--  1 crifan root 2677 Aug 14 19:25 modconfig-17601.log
-rw-r--r--  1 crifan root 3427 Aug 14 19:25 modconfig-17607.log
-rw-r--r--  1 crifan root 2607 Aug 14 19:25 modconfig-17622.log
-rw-r--r--  1 crifan root 2607 Aug 14 19:25 modconfig-17628.log
-rw-r--r--  1 crifan root 3041 Aug 14 19:25 modconfig-17634.log
-rw-r--r--  1 crifan root 3041 Aug 14 19:25 modconfig-17649.log
-rw-r--r--  1 crifan root 3629 Aug 14 19:28 modconfig-17671.log
-rw-r--r--  1 crifan root 2794 Aug 14 19:39 modconfig-18249.log
-rw-r--r--  1 crifan root 4135 Aug 14 19:39 modconfig-18254.log
-rw-r--r--  1 crifan root 2794 Aug 14 19:39 modconfig-19006.log
-rw-r--r--  1 crifan root 3637 Aug 14 19:39 modconfig-19011.log
-rw-r--r--  1 crifan root 2794 Aug 14 19:40 modconfig-19241.log
-rw-r--r--  1 crifan root 3712 Aug 14 19:40 modconfig-19246.log
-rw-r--r--  1 crifan root 2793 Aug 14 19:44 modconfig-5222.log
-rw-r--r--  1 crifan root 2676 Aug 14 19:44 modconfig-5227.log
-rw-r--r--  1 crifan root 3426 Aug 14 19:44 modconfig-5233.log
-rw-r--r--  1 crifan root 2606 Aug 14 19:44 modconfig-5248.log
-rw-r--r--  1 crifan root 2606 Aug 14 19:44 modconfig-5254.log
-rw-r--r--  1 crifan root 3040 Aug 14 19:44 modconfig-5260.log
-rw-r--r--  1 crifan root 3040 Aug 14 19:44 modconfig-5275.log
-rw-r--r--  1 crifan root 3628 Aug 14 19:44 modconfig-5290.log
-rw-r--r--  1 crifan root 2793 Aug 14 19:46 modconfig-5671.log
-rw-r--r--  1 crifan root 3628 Aug 14 19:46 modconfig-5676.log
-rw-r--r--  1 crifan root 2793 Aug 14 19:46 modconfig-6058.log
-rw-r--r--  1 crifan root 3636 Aug 14 19:46 modconfig-6063.log
-rw-r--r--  1 crifan root 2793 Aug 14 19:46 modconfig-6293.log
-rw-r--r--  1 crifan root 3711 Aug 14 19:46 modconfig-6298.log
crifan@ubuntu:vmware-root$ 

很明显,tmp文件夹下面的东西,是在安装期间,临时拷贝过去的。

2.所以,应该还是去看看,之前针对linux/driver.c打的那个补丁vmware-vmci.patch,是否真的生效了,以后打补丁的内容本身,是否是对的。

crifan@ubuntu:source$ ls
legacy      vmblock.tar  vmci.tar        vmhgfs-only  vmhgfs.tar.old.0  vmsync.tar  vmxnet3_npa.tar  vmxnet.tar
pvscsi.tar  vmci-only    vmci.tar.old.0  vmhgfs.tar   vmmemctl.tar      vmwgfx.tar  vmxnet3.tar      vsock.tar
crifan@ubuntu:source$ ls -lha
total 13M
drwxr-xr-x 5 root root 4.0K Aug 14 19:44 .
drwxr-xr-x 4 root root 4.0K Aug 14 19:44 ..
drwxr-xr-x 2 root root 4.0K Aug 14 19:44 legacy
-rw-r--r-- 1 root root 800K Aug 14 19:44 pvscsi.tar
-rw-r--r-- 1 root root 710K Aug 14 19:44 vmblock.tar
drwxr-xr-x 5 root root 4.0K Feb 28 22:06 vmci-only
-rw-r--r-- 1 root root 1.1M Aug 14 19:44 vmci.tar
-rw-r--r-- 1 root root 1.2M Aug 14 19:44 vmci.tar.old.0
drwxr-xr-x 3 root root 4.0K Feb 28 22:06 vmhgfs-only
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar.old.0
-rw-r--r-- 1 root root 700K Aug 14 19:44 vmmemctl.tar
-rw-r--r-- 1 root root 640K Aug 14 19:44 vmsync.tar
-rw-r--r-- 1 root root 1.8M Aug 14 19:44 vmwgfx.tar
-rw-r--r-- 1 root root 970K Aug 14 19:44 vmxnet3_npa.tar
-rw-r--r-- 1 root root 920K Aug 14 19:44 vmxnet3.tar
-rw-r--r-- 1 root root 810K Aug 14 19:44 vmxnet.tar
-rw-r--r-- 1 root root 930K Aug 14 19:44 vsock.tar
crifan@ubuntu:source$ 

看到,有对应的vmci.tar.old.0和vmhgfs.tar.old.0,很明显,对应着之前的:

File /usr/lib/vmware-tools/modules/source/vmhgfs.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmhgfs.tar.old.0.
...
File /usr/lib/vmware-tools/modules/source/vmci.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmci.tar.old.0.

好像是:

vmware tools安装脚本,发现我们改动了那两个tar,所以就另存为old.0,而不用了?

3.还是先去remove旧的open-vm-tools:

crifan@ubuntu:vmware-tools-distrib$ sudo apt-get autoremove open-vm-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'open-vm-tools' is not installed, so not removed
The following packages will be REMOVED:
  dkms libdumbnet1 zerofree
0 upgraded, 0 newly installed, 3 to remove and 13 not upgraded.
After this operation, 494 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 189520 files and directories currently installed.)
Removing dkms ...
Removing libdumbnet1 ...
Removing zerofree ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

再把我们打了补丁的包的,弄过来:

crifan@ubuntu:vmware-tools-distrib$ ls /usr/lib/vmware-tools/
bin/          configurator/ include/      lib64/        plugins/      sbin/         share/        
bin32/        hlp/          lib/          libconf/      plugins32/    sbin32/       
bin64/        icu/          lib32/        modules/      plugins64/    sbin64/       
crifan@ubuntu:vmware-tools-distrib$ ls /usr/lib/vmware-tools/modules/source/
legacy      vmblock.tar  vmci.tar        vmhgfs-only  vmhgfs.tar.old.0  vmsync.tar  vmxnet3_npa.tar  vmxnet.tar
pvscsi.tar  vmci-only    vmci.tar.old.0  vmhgfs.tar   vmmemctl.tar      vmwgfx.tar  vmxnet3.tar      vsock.tar
crifan@ubuntu:vmware-tools-distrib$ cd /usr/lib/vmware-tools/modules/source/
crifan@ubuntu:source$ mv vmhgfs.tar vmhgfs.tar_backup
mv: cannot move ‘vmhgfs.tar’ to ‘vmhgfs.tar_backup’: Permission denied
crifan@ubuntu:source$ sudo mv vmhgfs.tar vmhgfs.tar_backup
crifan@ubuntu:source$ sudo cp vmhgfs.tar.old.0 vmhgfs.tar
crifan@ubuntu:source$ sudo mv vmci.tar
vmci.tar        vmci.tar.old.0  
crifan@ubuntu:source$ sudo mv vmci.tar vmci.tar_backup
crifan@ubuntu:source$ sudo cp vmci.tar.old.0 vmci.tar
crifan@ubuntu:source$ 

然后再重新安装此vmware tools:

然后发现,安装到这一步:

crifan@ubuntu:vmware-tools-distrib$ sudo ./vmware-install.pl 
The installer found the following conflicting packages installed on the system and will now remove them:

open-vm-tools

dpkg: warning: ignoring request to remove open-vm-tools, only the config
 files of which are on the system; use --purge to remove them too
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will 
first uninstall the currently installed version.  Do you wish to continue? 
(yes/no) [yes]  

Uninstalling the tar installation of VMware Tools.

Stopping services for VMware Tools

vmware-tools stop/waiting
File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders is 
backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders.old.12.

File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc.old.12.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/pango/pangorc, and was about to remove it.  
Somebody else apparently did it already.

File /etc/vmware-tools/vmware-user.desktop is backed up to 
/etc/vmware-tools/vmware-user.desktop.old.12.

File /usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf.old.10.

File /usr/lib/vmware-tools/modules/source/vmhgfs.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmhgfs.tar.old.1.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pango.modules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gdk-pixbuf.loaders, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules.old.12.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gtk.immodules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/modules/source/vmci.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmci.tar.old.1.

update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-19-generic
The removal of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

时,已经又把我们的tar包,弄成old.1了:

File /usr/lib/vmware-tools/modules/source/vmhgfs.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmhgfs.tar.old.1.
File /usr/lib/vmware-tools/modules/source/vmci.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmci.tar.old.1.

4.不过,发现此时,还没有去解压出来:

crifan@ubuntu:source$ pwd
/usr/lib/vmware-tools/modules/source
crifan@ubuntu:source$ ls /tmp/vmware-
vmware-config0/ vmware-config1/ vmware-crifan/  vmware-root/    
crifan@ubuntu:source$ ls /tmp/vmware-root/
apploader-1231.log   apploader-17601.log  apploader-25528.log  apploader-5290.log   modconfig-17649.log  modconfig-5260.log
apploader-12522.log  apploader-17607.log  apploader-25552.log  apploader-5671.log   modconfig-17671.log  modconfig-5275.log
apploader-12530.log  apploader-17622.log  apploader-25561.log  apploader-5676.log   modconfig-18249.log  modconfig-5290.log
apploader-12543.log  apploader-17628.log  apploader-25572.log  apploader-6058.log   modconfig-18254.log  modconfig-5671.log
apploader-12614.log  apploader-17634.log  apploader-25645.log  apploader-6063.log   modconfig-19006.log  modconfig-5676.log
apploader-12618.log  apploader-17649.log  apploader-25649.log  apploader-6293.log   modconfig-19011.log  modconfig-6058.log
apploader-1390.log   apploader-17671.log  apploader-5222.log   apploader-6298.log   modconfig-19241.log  modconfig-6063.log
apploader-1402.log   apploader-18249.log  apploader-5227.log   modconfig-17596.log  modconfig-19246.log  modconfig-6293.log
apploader-1436.log   apploader-18254.log  apploader-5233.log   modconfig-17601.log  modconfig-5222.log   modconfig-6298.log
apploader-1440.log   apploader-19006.log  apploader-5248.log   modconfig-17607.log  modconfig-5227.log   
apploader-1505.log   apploader-19011.log  apploader-5254.log   modconfig-17622.log  modconfig-5233.log   
apploader-1511.log   apploader-19241.log  apploader-5260.log   modconfig-17628.log  modconfig-5248.log   
apploader-17596.log  apploader-19246.log  apploader-5275.log   modconfig-17634.log  modconfig-5254.log   
crifan@ubuntu:source$ ls /tmp/vmware-root/ -lha
total 392K
drwx------  2 crifan root 4.0K Aug 14 19:46 .
drwxrwxrwt 11 root   root 4.0K Aug 14 20:09 ..
-rw-r--r--  1 crifan root 4.1K Aug 14 19:03 apploader-1231.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:46 apploader-12522.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:46 apploader-12530.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:46 apploader-12543.log
-rw-r--r--  1 crifan root 2.2K Aug 14 19:46 apploader-12614.log
-rw-r--r--  1 crifan root 2.2K Aug 14 19:46 apploader-12618.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:03 apploader-1390.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:03 apploader-1402.log
-rw-r--r--  1 crifan root 2.2K Aug 14 19:03 apploader-1436.log
-rw-r--r--  1 crifan root 2.2K Aug 14 19:03 apploader-1440.log
-rw-------  1 crifan lp   2.4K Aug 14 19:03 apploader-1505.log
-rw-------  1 crifan lp   2.4K Aug 14 19:03 apploader-1511.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:25 apploader-17596.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:25 apploader-17601.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:25 apploader-17607.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:25 apploader-17622.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:25 apploader-17628.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:25 apploader-17634.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:25 apploader-17649.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:28 apploader-17671.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:39 apploader-18249.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:39 apploader-18254.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:39 apploader-19006.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:39 apploader-19011.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:40 apploader-19241.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:40 apploader-19246.log
-rw-r--r--  1 crifan root 2.9K Aug 14 19:40 apploader-25528.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:40 apploader-25552.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:40 apploader-25561.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:40 apploader-25572.log
-rw-r--r--  1 crifan root 2.2K Aug 14 19:40 apploader-25645.log
-rw-r--r--  1 crifan root 2.2K Aug 14 19:40 apploader-25649.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:44 apploader-5222.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:44 apploader-5227.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:44 apploader-5233.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:44 apploader-5248.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:44 apploader-5254.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:44 apploader-5260.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:44 apploader-5275.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:44 apploader-5290.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:46 apploader-5671.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:46 apploader-5676.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:46 apploader-6058.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:46 apploader-6063.log
-rw-r--r--  1 crifan root 4.0K Aug 14 19:46 apploader-6293.log
-rw-r--r--  1 crifan root 4.2K Aug 14 19:46 apploader-6298.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:25 modconfig-17596.log
-rw-r--r--  1 crifan root 2.7K Aug 14 19:25 modconfig-17601.log
-rw-r--r--  1 crifan root 3.4K Aug 14 19:25 modconfig-17607.log
-rw-r--r--  1 crifan root 2.6K Aug 14 19:25 modconfig-17622.log
-rw-r--r--  1 crifan root 2.6K Aug 14 19:25 modconfig-17628.log
-rw-r--r--  1 crifan root 3.0K Aug 14 19:25 modconfig-17634.log
-rw-r--r--  1 crifan root 3.0K Aug 14 19:25 modconfig-17649.log
-rw-r--r--  1 crifan root 3.6K Aug 14 19:28 modconfig-17671.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:39 modconfig-18249.log
-rw-r--r--  1 crifan root 4.1K Aug 14 19:39 modconfig-18254.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:39 modconfig-19006.log
-rw-r--r--  1 crifan root 3.6K Aug 14 19:39 modconfig-19011.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:40 modconfig-19241.log
-rw-r--r--  1 crifan root 3.7K Aug 14 19:40 modconfig-19246.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:44 modconfig-5222.log
-rw-r--r--  1 crifan root 2.7K Aug 14 19:44 modconfig-5227.log
-rw-r--r--  1 crifan root 3.4K Aug 14 19:44 modconfig-5233.log
-rw-r--r--  1 crifan root 2.6K Aug 14 19:44 modconfig-5248.log
-rw-r--r--  1 crifan root 2.6K Aug 14 19:44 modconfig-5254.log
-rw-r--r--  1 crifan root 3.0K Aug 14 19:44 modconfig-5260.log
-rw-r--r--  1 crifan root 3.0K Aug 14 19:44 modconfig-5275.log
-rw-r--r--  1 crifan root 3.6K Aug 14 19:44 modconfig-5290.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:46 modconfig-5671.log
-rw-r--r--  1 crifan root 3.6K Aug 14 19:46 modconfig-5676.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:46 modconfig-6058.log
-rw-r--r--  1 crifan root 3.6K Aug 14 19:46 modconfig-6063.log
-rw-r--r--  1 crifan root 2.8K Aug 14 19:46 modconfig-6293.log
-rw-r--r--  1 crifan root 3.7K Aug 14 19:46 modconfig-6298.log
crifan@ubuntu:source$ 

所以,试试去手动,再次去把我们的打了补丁的包,弄成当前的:

结果却发现已经没了tar了,只有解压后的了:

crifan@ubuntu:source$ ls -lha
total 7.2M
drwxr-xr-x 4 root root 4.0K Aug 14 20:08 .
drwxr-xr-x 3 root root 4.0K Aug 14 20:08 ..
drwxr-xr-x 5 root root 4.0K Feb 28 22:06 vmci-only
-rw-r--r-- 1 root root 1.1M Aug 14 19:44 vmci.tar_backup
-rw-r--r-- 1 root root 1.2M Aug 14 19:44 vmci.tar.old.0
-rw-r--r-- 1 root root 1.2M Aug 14 20:08 vmci.tar.old.1
drwxr-xr-x 3 root root 4.0K Feb 28 22:06 vmhgfs-only
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar_backup
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar.old.0
-rw-r--r-- 1 root root 1.3M Aug 14 20:08 vmhgfs.tar.old.1
crifan@ubuntu:source$ cd ..
crifan@ubuntu:modules$ ls
source
crifan@ubuntu:modules$ pwd
/usr/lib/vmware-tools/modules
crifan@ubuntu:modules$ cd source/
crifan@ubuntu:source$ ls
vmci-only  vmci.tar_backup  vmci.tar.old.0  vmci.tar.old.1  vmhgfs-only  vmhgfs.tar_backup  vmhgfs.tar.old.0  vmhgfs.tar.old.1
crifan@ubuntu:source$ cd ls -a
bash: cd: ls: No such file or directory
crifan@ubuntu:source$ ls -a
.  ..  vmci-only  vmci.tar_backup  vmci.tar.old.0  vmci.tar.old.1  vmhgfs-only  vmhgfs.tar_backup  vmhgfs.tar.old.0  vmhgfs.tar.old.1
crifan@ubuntu:source$ 

5.所以,那就去手动打patch:

结果发现竟然是,已经打过了:

crifan@ubuntu:source$ cd vmci-only/
crifan@ubuntu:vmci-only$ ls -lha
total 60K
drwxr-xr-x 5 root root 4.0K Feb 28 22:06 .
drwxr-xr-x 4 root root 4.0K Aug 14 20:08 ..
drwxr-xr-x 2 root root 4.0K Feb 28 22:06 common
-r--r--r-- 1 root root  18K Feb 28 21:40 COPYING
drwxr-xr-x 2 root root 4.0K Aug 14 19:39 linux
-rw-r--r-- 1 root root 4.3K Feb 28 21:40 Makefile
-r--r--r-- 1 root root 2.2K Feb 28 21:40 Makefile.kernel
-r--r--r-- 1 root root 4.4K Feb 28 21:40 Makefile.normal
drwxr-xr-x 3 root root 4.0K Feb 28 22:06 shared
crifan@ubuntu:vmci-only$ sudo patch -p1 < /home/crifan/develop/vmwaretools/patches/vmware-vmci.patch 
patching file linux/driver.c
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file linux/driver.c.rej
crifan@ubuntu:vmci-only$ 

6.那就只能继续去编译安装vmware tools了,根据之前的错误,找到参考资料:

ubuntu 13.04 vmware-tools【失效】

去手动修改vmci-only/shared/compat_mm.h:

改为:

/*
 * In 2.4.10, vmtruncate was changed from returning void to returning int.
 */
//#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 10)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
#define compat_vmtruncate(inode, size)                                        \
({                                                                            \
   int result = 0;                                                            \
   vmtruncate(inode, size);                                                   \
   result;                                                                    \
})
#else
//#define compat_vmtruncate(inode, size) vmtruncate(inode, size)
#define compat_vmtruncate(inode, size)                                        \
({                                                                            \
   result = inode_newsize_ok(inode, size);                                    \
   if (!result)                                                               \
   {                                                                          \
      truncate_setsize(inode, size);                                          \
   }                                                                          \
   result;                                                                    \
})
#endif

(等弄好后,再去整理出来一个patch)

然后再去继续编译安装vmci试试,结果还是出错:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-1988730176/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root-1988730176/modules/vmci-only/driverLog.o
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:127:4: error: initializer element is not constant
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:127:4: error: (near initialization for ‘vmci_driver.remove’)
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:1745:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:1973:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c: At top level:
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:2054:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:2128:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.c:1708:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/vmware-root-1988730176/modules/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/vmware-root-1988730176/modules/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/vmware-root-1988730176/modules/vmci-only'

7.此刻再去看看:

/tmp/vmware-root-1988730176/modules/vmci-only/linux/

的内容,是否是已经打了patch的:

结果还是,tmp下其实是没有解压出来的vmci的:

crifan@ubuntu:shared$ ls /tmp/vmware-root-1988730176/
ls: cannot open directory /tmp/vmware-root-1988730176/: Permission denied
crifan@ubuntu:shared$ sudo ls /tmp/vmware-root-1988730176/
apploader-25373.log  apploader-25399.log  apploader-25426.log  modconfig-25378.log  modconfig-25405.log  modconfig-25441.log
apploader-25378.log  apploader-25405.log  apploader-25441.log  modconfig-25384.log  modconfig-25411.log
apploader-25384.log  apploader-25411.log  modconfig-25373.log  modconfig-25399.log  modconfig-25426.log
crifan@ubuntu:shared$ sudo chown -R crifan /tmp/vmware-root-1988730176/
crifan@ubuntu:shared$ ls /tmp/vmware-root-1988730176/
apploader-25373.log  apploader-25399.log  apploader-25426.log  modconfig-25378.log  modconfig-25405.log  modconfig-25441.log
apploader-25378.log  apploader-25405.log  apploader-25441.log  modconfig-25384.log  modconfig-25411.log
apploader-25384.log  apploader-25411.log  modconfig-25373.log  modconfig-25399.log  modconfig-25426.log
crifan@ubuntu:shared$ 

8.所以,只能去/usr/lib下看看了:

crifan@ubuntu:source$ ls
legacy       vmci-only        vmci.tar.old.0  vmhgfs.tar         vmhgfs.tar.old.1  vmwgfx.tar       vmxnet.tar
pvscsi.tar   vmci.tar         vmci.tar.old.1  vmhgfs.tar_backup  vmmemctl.tar      vmxnet3_npa.tar  vsock.tar
vmblock.tar  vmci.tar_backup  vmhgfs-only     vmhgfs.tar.old.0   vmsync.tar        vmxnet3.tar
crifan@ubuntu:source$ cd vmci-only/shared/
crifan@ubuntu:shared$ ls
autoconf            compat_ioport.h      compat_pci_mapping.h  compat_version.h       vm_basic_asm_x86.h     vmciQueue.h
backdoor_def.h      compat_kernel.h      compat_pgtable.h      compat_workqueue.h     vm_basic_defs.h        vm_device_version.h
backdoor_types.h    compat_log2.h        compat_sched.h        dbllnklst.h            vm_basic_math.h        vmware.h
circList.h          compat_mm.h          compat_scsi.h         driver-config.h        vm_basic_types.h       vmware_pack_begin.h
community_source.h  compat_mm.h~         compat_semaphore.h    driverLog.c            vmci_call_defs.h       vmware_pack_end.h
compat_autoconf.h   compat_module.h      compat_skbuff.h       driverLog.h            vmci_defs.h            vmware_pack_init.h
compat_cred.h       compat_mutex.h       compat_slab.h         guest_msg_def.h        vmci_handle_array.h    x86cpuid_asm.h
compat_dcache.h     compat_namei.h       compat_sock.h         includeCheck.h         vmci_infrastructure.h  x86cpuid.h
compat_ethtool.h    compat_netdevice.h   compat_spinlock.h     pgtbl.h                vmci_iocontrols.h
compat_fs.h         compat_page-flags.h  compat_statfs.h       vm_assert.h            vmciKernelAPI1.h
compat_highmem.h    compat_page.h        compat_string.h       vm_atomic.h            vmciKernelAPI2.h
compat_init.h       compat_pagemap.h     compat_timer.h        vm_basic_asm.h         vmciKernelAPI.h
compat_interrupt.h  compat_pci.h         compat_uaccess.h      vm_basic_asm_x86_64.h  vmci_kernel_if.h
crifan@ubuntu:shared$ cd ..
crifan@ubuntu:vmci-only$ ls
common  COPYING  linux  Makefile  Makefile.kernel  Makefile.normal  shared
crifan@ubuntu:vmci-only$ cd linux/
crifan@ubuntu:linux$ ls
driver.c  driver.c.orig  driver.c.rej  vmciKernelIf.c  vmci_version.h
crifan@ubuntu:linux$ gedit driver.c

结果确认driver.c中,是修改过的:

static struct pci_driver vmci_driver = {
   .name     = "vmci",
   .id_table = vmci_ids,
   .probe = vmci_probe_device,
   .remove = vmci_remove_device,
};

所以,应该是安装过程中用的代码,没有用到正确的内容。

9.然后去手动删除掉当前的vmci-only,重新解压vmci.tar出来:

crifan@ubuntu:source$ ls
legacy       vmci-only        vmci.tar.old.0  vmhgfs.tar         vmhgfs.tar.old.1  vmwgfx.tar       vmxnet.tar
pvscsi.tar   vmci.tar         vmci.tar.old.1  vmhgfs.tar_backup  vmmemctl.tar      vmxnet3_npa.tar  vsock.tar
vmblock.tar  vmci.tar_backup  vmhgfs-only     vmhgfs.tar.old.0   vmsync.tar        vmxnet3.tar
crifan@ubuntu:source$ sudo rm vmci-only/ -rf
crifan@ubuntu:source$ ls -lha
total 18M
drwxr-xr-x 4 root root 4.0K Aug 14 22:09 .
drwxr-xr-x 4 root root 4.0K Aug 14 21:52 ..
drwxr-xr-x 2 root root 4.0K Aug 14 21:52 legacy
-rw-r--r-- 1 root root 800K Aug 14 21:52 pvscsi.tar
-rw-r--r-- 1 root root 710K Aug 14 21:52 vmblock.tar
-rw-r--r-- 1 root root 1.1M Aug 14 21:52 vmci.tar
-rw-r--r-- 1 root root 1.1M Aug 14 19:44 vmci.tar_backup
-rw-r--r-- 1 root root 1.2M Aug 14 19:44 vmci.tar.old.0
-rw-r--r-- 1 root root 1.2M Aug 14 20:08 vmci.tar.old.1
drwxr-xr-x 3 root root 4.0K Feb 28 22:06 vmhgfs-only
-rw-r--r-- 1 root root 1.3M Aug 14 21:52 vmhgfs.tar
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar_backup
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar.old.0
-rw-r--r-- 1 root root 1.3M Aug 14 20:08 vmhgfs.tar.old.1
-rw-r--r-- 1 root root 700K Aug 14 21:52 vmmemctl.tar
-rw-r--r-- 1 root root 640K Aug 14 21:52 vmsync.tar
-rw-r--r-- 1 root root 1.8M Aug 14 21:52 vmwgfx.tar
-rw-r--r-- 1 root root 970K Aug 14 21:52 vmxnet3_npa.tar
-rw-r--r-- 1 root root 920K Aug 14 21:52 vmxnet3.tar
-rw-r--r-- 1 root root 810K Aug 14 21:52 vmxnet.tar
-rw-r--r-- 1 root root 930K Aug 14 21:52 vsock.tar
crifan@ubuntu:source$ sudo tar xf vmci.tar 
crifan@ubuntu:source$ ls -lha
total 18M
drwxr-xr-x 5 root root 4.0K Aug 14 22:09 .
drwxr-xr-x 4 root root 4.0K Aug 14 21:52 ..
drwxr-xr-x 2 root root 4.0K Aug 14 21:52 legacy
-rw-r--r-- 1 root root 800K Aug 14 21:52 pvscsi.tar
-rw-r--r-- 1 root root 710K Aug 14 21:52 vmblock.tar
drwxr-xr-x 5 root root 4.0K Feb 28 22:06 vmci-only
-rw-r--r-- 1 root root 1.1M Aug 14 21:52 vmci.tar
-rw-r--r-- 1 root root 1.1M Aug 14 19:44 vmci.tar_backup
-rw-r--r-- 1 root root 1.2M Aug 14 19:44 vmci.tar.old.0
-rw-r--r-- 1 root root 1.2M Aug 14 20:08 vmci.tar.old.1
drwxr-xr-x 3 root root 4.0K Feb 28 22:06 vmhgfs-only
-rw-r--r-- 1 root root 1.3M Aug 14 21:52 vmhgfs.tar
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar_backup
-rw-r--r-- 1 root root 1.3M Aug 14 19:44 vmhgfs.tar.old.0
-rw-r--r-- 1 root root 1.3M Aug 14 20:08 vmhgfs.tar.old.1
-rw-r--r-- 1 root root 700K Aug 14 21:52 vmmemctl.tar
-rw-r--r-- 1 root root 640K Aug 14 21:52 vmsync.tar
-rw-r--r-- 1 root root 1.8M Aug 14 21:52 vmwgfx.tar
-rw-r--r-- 1 root root 970K Aug 14 21:52 vmxnet3_npa.tar
-rw-r--r-- 1 root root 920K Aug 14 21:52 vmxnet3.tar
-rw-r--r-- 1 root root 810K Aug 14 21:52 vmxnet.tar
-rw-r--r-- 1 root root 930K Aug 14 21:52 vsock.tar
crifan@ubuntu:source$ sudo gedit vmci-only/linux/driver.c 

然后发现果然是内容没有修改掉:

static struct pci_driver vmci_driver = {
   .name     = "vmci",
   .id_table = vmci_ids,
   .probe = vmci_probe_device,
   .remove = __devexit_p(vmci_remove_device),
};

所以,想办法,让vmware安装脚本,能够用到当前真正的打了补丁的这个vmci.tar。

不要再去生成old.X的文件。

再去看看,之前旧的:

crifan@ubuntu:source$ sudo rm vmci.tar
crifan@ubuntu:source$ sudo cp vmci.tar.old.0 vmci.tar
crifan@ubuntu:source$ sudo rm vmci-only/ -rf
crifan@ubuntu:source$ sudo tar xf vmci.tar 
crifan@ubuntu:source$ sudo gedit vmci-only/linux/driver.c

果然是修改过后的:

static struct pci_driver vmci_driver = {
   .name     = "vmci",
   .id_table = vmci_ids,
   .probe = vmci_probe_device,
   .remove = vmci_remove_device,
};

所以,保持现在已经解压后的vmci-only文件夹,然后待会重新安装vmware tools,或许就可以直接用这个文件夹了?

而不再弄出个old.x了?

10.去看了看那个安装脚本,貌似是每次uninstall的时候,去备份的文件。

所以,此处去:

先手动卸载掉vmware tools:

crifan@ubuntu:vmware-tools-distrib$ sudo vmware-uninstall-tools.pl 
Uninstalling the tar installation of VMware Tools.

Stopping services for VMware Tools

initctl: Unknown instance: 
File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders is 
backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders.old.13.

File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc.old.13.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/pango/pangorc, and was about to remove it.  
Somebody else apparently did it already.

File /etc/vmware-tools/vmware-user.desktop is backed up to 
/etc/vmware-tools/vmware-user.desktop.old.13.

File /usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf is backed up to 
/usr/lib/vmware-tools/lib32/libconf/etc/fonts/fonts.conf.old.11.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pango.modules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gdk-pixbuf.loaders, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules.old.13.

This program previously created the file 
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gtk.immodules, and was about to 
remove it.  Somebody else apparently did it already.

This program previously created the file 
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases, and was about to 
remove it.  Somebody else apparently did it already.

File /usr/lib/vmware-tools/modules/source/vmci.tar is backed up to 
/usr/lib/vmware-tools/modules/source/vmci.tar.old.2.

update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-19-generic
The removal of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully.  Thank you for having tried this software.

crifan@ubuntu:vmware-tools-distrib$ 

再重新打包:

crifan@ubuntu:source$ ls 
legacy       vmci-only        vmci.tar.old.0  vmhgfs.tar         vmhgfs.tar.old.1  vmwgfx.tar       vmxnet.tar
pvscsi.tar   vmci.tar         vmci.tar.old.1  vmhgfs.tar_backup  vmmemctl.tar      vmxnet3_npa.tar  vsock.tar
vmblock.tar  vmci.tar_backup  vmhgfs-only     vmhgfs.tar.old.0   vmsync.tar        vmxnet3.tar
crifan@ubuntu:source$ pwd
/usr/lib/vmware-tools/modules/source
crifan@ubuntu:source$ ls
vmci-only        vmci.tar.old.0  vmci.tar.old.2  vmhgfs.tar_backup  vmhgfs.tar.old.1
vmci.tar_backup  vmci.tar.old.1  vmhgfs-only     vmhgfs.tar.old.0
crifan@ubuntu:source$ sudo cp vmci.tar.old.0 vmci.tar
crifan@ubuntu:source$ sudo cp vmhgfs.tar.old.0 vmhgfs.tar
crifan@ubuntu:source$ ls
vmci-only  vmci.tar_backup  vmci.tar.old.1  vmhgfs-only  vmhgfs.tar_backup  vmhgfs.tar.old.1
vmci.tar   vmci.tar.old.0   vmci.tar.old.2  vmhgfs.tar   vmhgfs.tar.old.0
crifan@ubuntu:source$ 

再重新安装:

然后安装过程中问是否覆盖vmhgfs.tar和vmci.tar,当然选择no了:

The file /usr/lib/vmware-tools/modules/source/vmhgfs.tar that this program was 
about to install already exists. Overwrite? [yes] no

The file /usr/lib/vmware-tools/modules/source/vmci.tar that this program was 
about to install already exists. Overwrite? [yes] no

然后后面就可以正常编译和安装vmci和vmhgfs了,只是vmxnet有错误,暂且不理会。

完整log如下:

crifan@ubuntu:vmware-tools-distrib$ sudo ./vmware-install.pl 
The installer found the following conflicting packages installed on the system and will now remove them:

open-vm-tools

dpkg: warning: ignoring request to remove open-vm-tools, only the config
 files of which are on the system; use --purge to remove them too
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc] 

What is the directory that contains the init scripts? 
[/etc/init.d] 

In which directory do you want to install the daemon files? 
[/usr/sbin] 

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

The file /usr/lib/vmware-tools/modules/source/vmhgfs.tar that this program was 
about to install already exists. Overwrite? [yes] no

The file /usr/lib/vmware-tools/modules/source/vmci.tar that this program was 
about to install already exists. Overwrite? [yes] no

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

The installation of VMware Tools 8.8.6 build-1035889 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 

Initializing...


Making sure services for VMware Tools are stopped.



[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base 
for more details on this capability. Do you wish to enable this feature? 
[no] 


Before you can compile modules, you need to have the following installed... 

make
gcc
kernel headers of the running kernel


Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
Detected the kernel headers at "/lib/modules/3.8.0-27-generic/build/include".
The path "/lib/modules/3.8.0-27-generic/build/include" appears to be a valid 
path to the 3.8.0-27-generic kernel headers.
Would you like to change it? [no] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/driverLog.o
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
  LD [M]  /tmp/vmware-root-207801624/modules/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root-207801624/modules/vmci-only/vmci.mod.o
  LD [M]  /tmp/vmware-root-207801624/modules/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root-207801624/modules/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root-207801624/modules/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-root-207801624/modules/vmci-only'

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/driverLog.o
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
  LD [M]  /tmp/vmware-root-207801624/modules/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root-207801624/modules/vmci-only/vmci.mod.o
  LD [M]  /tmp/vmware-root-207801624/modules/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root-207801624/modules/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root-207801624/modules/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-root-207801624/modules/vmci-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vsock-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/linux/af_vsock.o
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/linux/notify.o
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/linux/notifyQState.o
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/linux/stats.o
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/linux/util.o
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/linux/vsockAddr.o
  CC [M]  /tmp/vmware-root-207801624/modules/vsock-only/driverLog.o
  LD [M]  /tmp/vmware-root-207801624/modules/vsock-only/vsock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root-207801624/modules/vsock-only/vsock.mod.o
  LD [M]  /tmp/vmware-root-207801624/modules/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root-207801624/modules/vsock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root-207801624/modules/vsock-only'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/vmware-root-207801624/modules/vsock-only'

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=pvscsi to override.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.  Use the flag 
--clobber-kernel-modules=vmmemctl to override.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [yes] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vmci-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/linux/driver.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciContext.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciResource.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmci-only/driverLog.o
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_host’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2498:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_guest’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2501:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msi’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2504:1: warning: return from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c: In function ‘__check_disable_msix’:
/tmp/vmware-root-207801624/modules/vmci-only/linux/driver.c:2507:1: warning: return from incompatible pointer type [enabled by default]
  LD [M]  /tmp/vmware-root-207801624/modules/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root-207801624/modules/vmci-only/vmci.mod.o
  LD [M]  /tmp/vmware-root-207801624/modules/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root-207801624/modules/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root-207801624/modules/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/vmware-root-207801624/modules/vmci-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vmhgfs-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/backdoor.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/backdoorGcc32.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/bdhandler.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/cpName.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/cpNameLite.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/dentry.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/dir.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/file.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/filesystem.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/fsutil.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/hgfsBd.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/hgfsEscape.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/inode.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/link.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/message.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/module.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/page.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/request.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/rpcout.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/stubs.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/super.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/tcp.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/transport.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/vmci.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/kernelStubsLinux.o
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c:131:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c:131:4: warning: (near initialization for ‘HgfsDirInodeOperations.create’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c:134:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c:134:4: warning: (near initialization for ‘HgfsDirInodeOperations.mkdir’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c: In function ‘HgfsPermission’:
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c:1755:8: warning: ‘dentry’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/tmp/vmware-root-207801624/modules/vmhgfs-only/inode.c:1813:22: note: ‘dentry’ was declared here
  LD [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/vmhgfs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-root-207801624/modules/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/vmware-root-207801624/modules/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root-207801624/modules/vmhgfs-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root-207801624/modules/vmhgfs-only'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-root-207801624/modules/vmhgfs-only'

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vmxnet-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.o
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:525:4: error: unknown field ‘get_rx_csum’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:525:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:525:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_eeprom_len’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:526:4: error: unknown field ‘set_rx_csum’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:526:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:526:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_eeprom’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:527:4: error: unknown field ‘get_tx_csum’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:527:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:527:4: warning: (near initialization for ‘vmxnet_ethtool_ops.set_eeprom’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:528:4: error: unknown field ‘set_tx_csum’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:528:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:528:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_coalesce’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:529:4: error: unknown field ‘get_sg’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:529:27: error: ‘ethtool_op_get_sg’ undeclared here (not in a function)
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:530:4: error: unknown field ‘set_sg’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:530:27: error: ‘ethtool_op_set_sg’ undeclared here (not in a function)
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:532:4: error: unknown field ‘get_tso’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:532:27: error: ‘ethtool_op_get_tso’ undeclared here (not in a function)
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:533:4: error: unknown field ‘set_tso’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:533:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:533:4: warning: (near initialization for ‘vmxnet_ethtool_ops.get_pauseparam’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:535:4: error: unknown field ‘get_ufo’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:535:27: error: ‘ethtool_op_get_ufo’ undeclared here (not in a function)
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_probe_device’:
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:1008:7: error: unknown field ‘ndo_set_multicast_list’ specified in initializer
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:1008:7: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:1008:7: warning: (near initialization for ‘vmxnet_netdev_ops.ndo_vlan_rx_add_vid’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_map_pkt’:
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:2085:32: error: incompatible type for argument 2 of ‘pci_map_page’
In file included from /usr/src/linux-headers-3.8.0-27-generic/arch/x86/include/asm/pci.h:148:0,
                 from include/linux/pci.h:1422,
                 from /tmp/vmware-root-207801624/modules/vmxnet-only/./shared/compat_pci.h:27,
                 from /tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:31:
include/asm-generic/pci-dma-compat.h:43:1: note: expected ‘struct page *’ but argument is of type ‘struct <anonymous>’
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:2104:26: error: incompatible type for argument 2 of ‘pci_map_page’
In file included from /usr/src/linux-headers-3.8.0-27-generic/arch/x86/include/asm/pci.h:148:0,
                 from include/linux/pci.h:1422,
                 from /tmp/vmware-root-207801624/modules/vmxnet-only/./shared/compat_pci.h:27,
                 from /tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:31:
include/asm-generic/pci-dma-compat.h:43:1: note: expected ‘struct page *’ but argument is of type ‘struct <anonymous>’
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c: In function ‘vmxnet_rx_frags’:
/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.c:2599:48: error: incompatible types when assigning to type ‘struct <anonymous>’ from type ‘struct page *’
make[2]: *** [/tmp/vmware-root-207801624/modules/vmxnet-only/vmxnet.o] Error 1
make[1]: *** [_module_/tmp/vmware-root-207801624/modules/vmxnet-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make: *** [vmxnet.ko] Error 2
make: Leaving directory `/tmp/vmware-root-207801624/modules/vmxnet-only'

The fast network device driver (vmxnet module) is used only for our fast 
networking interface. The rest of the software provided by VMware Tools is 
designed to work independently of this feature.
If you wish to have the fast network driver enabled, you can install the driver
by running vmware-config-tools.pl again after making sure that gcc, binutils, 
make and the kernel sources for your running kernel are installed on your 
machine. These packages are available on your distribution's installation CD.
[ Press Enter key to continue ] 

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root-207801624/modules/vmblock-only'
make -C /lib/modules/3.8.0-27-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/block.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/control.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/dbllnklst.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/dentry.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/file.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/filesystem.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/inode.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/module.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/stubs.o
  CC [M]  /tmp/vmware-root-207801624/modules/vmblock-only/linux/super.o
/tmp/vmware-root-207801624/modules/vmblock-only/linux/control.c: In function ‘ExecuteBlockOp’:/tmp/vmware-root-207801624/modules/vmblock-only/linux/dentry.c:38:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmblock-only/linux/dentry.c:38:4: warning: (near initialization for ‘LinkDentryOps.d_revalidate’) [enabled by default]
/tmp/vmware-root-207801624/modules/vmblock-only/linux/dentry.c: In function ‘DentryOpRevalidate’:
/tmp/vmware-root-207801624/modules/vmblock-only/linux/dentry.c:104:7: warning: passing argument 2 of ‘actualDentry->d_op->d_revalidate’ makes integer from pointer without a cast [enabled by default]
/tmp/vmware-root-207801624/modules/vmblock-only/linux/dentry.c:104:7: note: expected ‘unsigned int’ but argument is of type ‘struct nameidata *’

/tmp/vmware-root-207801624/modules/vmblock-only/linux/control.c:285:9: warning: assignment from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmblock-only/linux/control.c:296:4: warning: passing argument 1 of ‘putname’ from incompatible pointer type [enabled by default]
In file included from include/linux/proc_fs.h:5:0,
                 from /tmp/vmware-root-207801624/modules/vmblock-only/linux/control.c:28:
include/linux/fs.h:2052:13: note: expected ‘struct filename *’ but argument is of type ‘char *’
/tmp/vmware-root-207801624/modules/vmblock-only/linux/inode.c:49:4: warning: initialization from incompatible pointer type [enabled by default]
/tmp/vmware-root-207801624/modules/vmblock-only/linux/inode.c:49:4: warning: (near initialization for ‘RootInodeOps.lookup’) [enabled by default]
  LD [M]  /tmp/vmware-root-207801624/modules/vmblock-only/vmblock.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "putname" [/tmp/vmware-root-207801624/modules/vmblock-only/vmblock.ko] undefined!
  CC      /tmp/vmware-root-207801624/modules/vmblock-only/vmblock.mod.o
  LD [M]  /tmp/vmware-root-207801624/modules/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
make -C $PWD SRCROOT=$PWD/. \
	  MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/vmware-root-207801624/modules/vmblock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/vmware-root-207801624/modules/vmblock-only'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/vmware-root-207801624/modules/vmblock-only'

!!! [EXPERIMENTAL] !!!
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot they are not already present.  By selecting yes,
you will be enabling this experimental feature.  You can always disable this
feature by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no] 


Disabling timer-based audio scheduling in pulseaudio.



Detected X server version 1.13.3



Distribution provided drivers for Xorg X server are used.

Skipping X configuration because X drivers are not included.

Creating a new initrd boot image for the kernel.
update-initramfs: Generating /boot/initrd.img-3.8.0-27-generic
vmware-tools start/running
The configuration of VMware Tools 8.8.6 build-1035889 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line or by invoking "/usr/bin/vmware-toolbox" from the command line 
during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

crifan@ubuntu:vmware-tools-distrib$ 

再去试试是否可以看到共享文件夹,结果是可以了:

crifan@ubuntu:vmware-tools-distrib$ ls /mnt/hgfs/
crosstool_ng
crifan@ubuntu:vmware-tools-distrib$ 

 

 

【总结】

注意,直接参考:

Patching VMware Tools to fix multiple installation errors on Ubuntu 13.04

的话,在我此处,好像是不行的。

因为:

(1)没有安装vmware tools之前的话,在:

/usr/lib/vmware-tools/modules/source

中是没有对应的源码,没法去打补丁的。

(2)而去运行安装vmware tools的话,其又会自动检测到

/usr/lib/vmware-tools/modules/source

存在了vmci.tar和vmhgfs.tar,和其原始的文件不一样,而会去给你变成vmci.tar.old.0和vmhgfs.tar.old.0

而不用你这两个打了补丁的文件,导致打了补丁也白打。

 

所以,最后的可行的办法,目前是:

0.参考那人方法:

Patching VMware Tools to fix multiple installation errors on Ubuntu 13.04

建立一个version.h的软连接

1.先安装一遍vmware tools

其中编译vmci会出错(就更不会编译vmhgfs了)

但是可以使得

/usr/lib/vmware-tools/modules/source

中会有vmci.tar和vmhgfs.tar

2.然后再参考那人的方法:

Patching VMware Tools to fix multiple installation errors on Ubuntu 13.04

去建立一个修改打补丁现存的vmci.tar和vmhgfs.tar

记得保留一份打了补丁后的vmci.tar和vmhgfs.tar

3.然后再卸载掉vmware tools:

sudo vmware-uninstall-tools.pl

4.再重新安装vmware tools,其会检测到已有vmci.tar和vmhgfs.tar,问你是否覆盖,输入no不覆盖

然后继续安装,期间会编译vmci和vmhgfs,才能正常编译。

期间,vmxnet没编译成功,不理会。

5.最终至正常安装完毕,使得:

剪贴板共享(复制和粘贴)都可用;

文件夹共享也可用了

转载请注明:在路上 » 【已解决】VMware Workstation 8下Ubuntu 13.04中安装VMware Tools出错:/tmp/vmware-root/modules/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (3)

  1. 你怎么写文章都不会写。。真心写的一塌糊涂~
    Allan10年前 (2013-11-14)回复
    • 那烦请给出具体的改进建议,谢谢。
      crifan10年前 (2013-11-19)回复
      • 您好,首先我为我的不礼貌而道歉。因为之前因为这个问题烦死了。。人就比较烦躁。其实还是比较好的了。。只是我觉得太长了不想看
        Allan10年前 (2013-11-19)回复
96 queries in 0.172 seconds, using 22.73MB memory