SSブログ

【Ubuntu 12.04】カーネル 3.2.0になってVirtualbox 4.1.6のGuest Additionsがインストール(コンパイル)できない(仮対処) [ubuntu]

Virtualbox 4.1.6(Host:Vista)上でUbuntu 12.04(Precise)を動かしていました。ところがカーネルが3.2.0になって、VirtualboxのGuestAdditionsがまともにインストールできません。あらノ(´д`*)。

なので、当然Unity-3Dなどが動くかチェックすると・・・

precise@pangolin-vbox:~$ /usr/lib/nux/unity_support_test -p
OpenGL vendor string:   Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string:  2.1 Mesa 7.11

Not software rendered:    no
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  no
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       no
precise@pangolin-vbox:~$ /usr/lib/nux/unity_support_test -c -p
OpenGL vendor string:   Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string:  2.1 Mesa 7.11

Not software rendered:    no
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  no
GL npot or rect textures: yes

Compiz supported:         no
precise@pangolin-vbox:~$ /usr/lib/gnome-session/gnome-session-check-accelerated-helper
gnome-session-is-accelerated: No hardware 3D support.

全くダメ。コンパイルし直してみると・・・

precise@pangolin-vbox:~$ sudo /etc/init.d/vboxadd setup
[sudo] password for precise:
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.


Building the main Guest Additions module ...done.
Building the shared folder support module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.


まず青文字の方の問題ですが、"uname -r" と入力すると下記のように出ます。

precise@pangolin-vbox:~$ uname -r
3.2.0-1-generic

今度は、下記のようにコマンドを入力すると3.2.0-rc2と出るはずです。

precise@pangolin-vbox:~$ make -sC /lib/modules/3.2.0-1-generic/build --no-print-directory kernelrelease 2>/dev/null
3.2.0-rc2

この2つが不一致の為に出ています。ただ気にしなくていいいです。

それより問題は赤字で出た方。言われた通りログを見ると最後の方で、

/tmp/vbox.0/utils.c: 関数 ‘sf_init_inode’ 内:
/tmp/vbox.0/utils.c:113:9: エラー: 読み取り専用メンバ ‘i_nlink’ への代入です
/tmp/vbox.0/utils.c:122:9: エラー: 読み取り専用メンバ ‘i_nlink’ への代入です
/tmp/vbox.0/utils.c:132:9: エラー: 読み取り専用メンバ ‘i_nlink’ への代入です
/tmp/vbox.0/utils.c: 関数 ‘sf_nlscpy’ 内:
/tmp/vbox.0/utils.c:563:13: 警告: 互換性のないポインタ型から 3 番目の ‘utf8_to_utf32’ の引数に渡しています [デフォルトで有効]
include/linux/nls.h:53:12: 備考: expected ‘unicode_t *’ but argument is of type ‘wchar_t *’
make[2]: *** [/tmp/vbox.0/utils.o] エラー 1
make[1]: *** [_module_/tmp/vbox.0] エラー 2
make: *** [vboxsf] エラー 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

と出ています。 utils.cがエラー出してしまってます。それで検索掛けてみたら、どうやらカーネルに変更があったみたいです。2011/11/2にコミットされています。

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=a78ef704a8dd430225955f0709b22d4a6ba21deb

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=d211858837ff8d8e31942ca7d27e6e08b3b46f5e

inode->i_nlink が inode->__i_nlinkに変わってる。それに代入する場合は、set_nlink(inode,1); とかになってます。ヘッダはlinux/fs.h

というわけで、 /opt/VBoxGuestAdditions-4.1.6/src/vboxguest-4.1.6/vboxsf/utils.c を書き替え。下記がそのパッチ。

書き替えた後は、 /etc/init.d/vboxadd setup を実行して再起動。

これでコンパイルエラーも無く、Unity-3Dが動くようになりました。もちろんGnome-Shellも。

ただ、直し方あってるのかな??(やるなら自己責任でお願いします)

SS-precise-vbox-failure-002.JPG

Virtualboxのbug ticketをざっと眺めた限り、この問題はまだ見当たりませんでした。

早めに直した方がいいと思うな~、PreciseのAlpha 1が2011/12/1にリリースだったはずだから、それまでに直しておいた方が良いと思います。

 

 ←無線LAN コンバータ

   デスクトップ型のパソコンを無線LANで
   接続する場合は、このようなコンバータ
   使う人が多いのかな??
   私のPCはデスクトップ型だけど有線なので
   よく分りません。


nice!(0)  コメント(0) 
共通テーマ:パソコン・インターネット

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。