virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel module failed to build [VBoxGuest-linux.c:206:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’]

Bug #1101867 reported by siucdude
576
This bug affects 95 people
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
Fix Released
High
Unassigned
Nominated for Precise by Daniel van Vugt
Nominated for Quantal by Daniel van Vugt

Bug Description

Just got this after today updates

ProblemType: Package
DistroRelease: Ubuntu 13.04
Package: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-0.4-generic 3.8.0-rc3
Uname: Linux 3.8.0-0-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.8-0ubuntu2
Architecture: amd64
DKMSKernelVersion: 3.8.0-1-generic
Date: Sat Jan 19 12:32:14 2013
InstallationDate: Installed on 2011-04-03 (656 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
MarkForUpload: True
PackageArchitecture: all
PackageVersion: 4.1.22-dfsg-0ubuntu2
SourcePackage: virtualbox
Title: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
siucdude (siucdude) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtualbox (Ubuntu):
status: New → Confirmed
summary: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel
- module failed to build
+ module failed to build [VBoxGuest-linux.c:206:49: error: expected ‘=’,
+ ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’]
Revision history for this message
Logan Rosen (logan) wrote :

I found a patch upstream that should fix this: https://www.virtualbox.org/changeset/44317/vbox

I'll try applying it locally, and then I'll report my results.

Revision history for this message
Logan Rosen (logan) wrote :

I made an updated package with the patch, but it fails to build both locally and in my PPA because "Python not found": https://launchpadlibrarian.net/129245486/buildlog_ubuntu-raring-i386.virtualbox_4.1.22-dfsg-0ubuntu3_FAILEDTOBUILD.txt.gz

These were the only changes I made compared to the package that is currently in the repository: http://paste.ubuntu.com/1564796/

Can anyone please figure out why this is happening?

Revision history for this message
Philipp Hügelmeyer (p-huegelmeyer) wrote :

I could get rid of the python issue by appling a few changes to the configure script.

http://paste.ubuntu.com/1566348/

Revision history for this message
Logan Rosen (logan) wrote :
Revision history for this message
Louis King Jr (inlieuoflou) wrote :

As far as I know, you need at least VirtualBox 4.2.0 to build guest additions since Ubuntu 12.10. Not that 4.2.0+ will build for Ubuntu 13.04.

Revision history for this message
Philipp Hügelmeyer (p-huegelmeyer) wrote :

There is still something wrong with the generated lib patch, I will have a look at it over the weekend.

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

This is affects the Vagrant Cloud Images as well.

Revision history for this message
linuxar (linuxar) wrote :

What worked for me (Xubuntu Raring 64):

1) remove everything that belongs to older virtualbox version than 4.22 (that I use), especially in:
 /usr/src
and in
/var/lib/dkms

Basically, I only have:

$ ls /usr/src/
linux-headers-3.8.0-2 linux-headers-3.8.0-2-generic vboxguest-4.2.6

$ ls /var/lib/dkms/
dkms_dbversion vboxguest virtualbox

$ ls /var/lib/dkms/vboxguest/
4.2.6 kernel-3.8.0-2-generic-x86_64

2) make sure that this is a softlink:

$ ls -ald /usr/src/vboxguest-4.2.6
lrwxrwxrwx 1 root root 49 Jan 24 17:28 /usr/src/vboxguest-4.2.6 -> /opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6

3) apply patch shown in #3 to the file:

/opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6/vboxguest/VBoxGuest-linux.c

4) run this one-liner to rebuild all dkms modules

$ ls /var/lib/initramfs-tools | sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start

Let me know if it works for you.

PS My setup is:

$ uname -a
Linux vmxubuntu 3.8.0-2-generic #6-Ubuntu SMP Fri Jan 25 22:03:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
z (steveriley-deactivatedaccount-deactivatedaccount) wrote :

The steps by axeoth (#10) worked perfectly. Thanks!

Revision history for this message
Michiel Janssens (janssensm) wrote :

(#10) worked for me too.
Virtualbox 4.2.6.
Linux VMUBU1304 3.8.0-4-generic #8-Ubuntu SMP Fri Feb 1 18:02:56 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Mahendra Rama Dinantara Putra (bit-mahendra94) wrote : Re: [Bug 1101867] Re: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel module failed to build [VBoxGuest-linux.c:206:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’]

Mmmm...
I'm asking for you..
How to use file .patch or .emerald
on Ubuntu.??
I'm Sorry, I'm still newbie..

On Sat, Feb 9, 2013 at 4:53 AM, Michiel Janssens <<email address hidden>
> wrote:

> (#10) worked for me too.
> Virtualbox 4.2.6.
> Linux VMUBU1304 3.8.0-4-generic #8-Ubuntu SMP Fri Feb 1 18:02:56 UTC 2013
> x86_64 x86_64 x86_64 GNU/Linux
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1101867
>
> Title:
> virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel
> module failed to build [VBoxGuest-linux.c:206:49: error: expected ‘=’,
> ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’]
>
> Status in “virtualbox” package in Ubuntu:
> Confirmed
>
> Bug description:
> Just got this after today updates
>
> ProblemType: Package
> DistroRelease: Ubuntu 13.04
> Package: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2
> ProcVersionSignature: Ubuntu 3.8.0-0.4-generic 3.8.0-rc3
> Uname: Linux 3.8.0-0-generic x86_64
> NonfreeKernelModules: nvidia
> ApportVersion: 2.8-0ubuntu2
> Architecture: amd64
> DKMSKernelVersion: 3.8.0-1-generic
> Date: Sat Jan 19 12:32:14 2013
> InstallationDate: Installed on 2011-04-03 (656 days ago)
> InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
> MarkForUpload: True
> PackageArchitecture: all
> PackageVersion: 4.1.22-dfsg-0ubuntu2
> SourcePackage: virtualbox
> Title: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest
> kernel module failed to build
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1101867/+subscriptions
>

Revision history for this message
Michiel Janssens (janssensm) wrote :

Hi bit-mahendra94,

Easiest way without using svn checkouts etc:

open the c file as stated in #10 in a text editor:
sudo gedit /opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6/vboxguest/VBoxGuest-linux.c

browse to:
https://www.virtualbox.org/changeset/44317/vbox
Copy the green lines in place of line 199 (not the line numbers, just content)

Save the file.
Continue at step 4 of #10

Revision history for this message
Louis King Jr (inlieuoflou) wrote :

well, it seems my VBoxGuest-linux.c file is empty.

Revision history for this message
Mahendra Rama Dinantara Putra (bit-mahendra94) wrote :

Yes,, I'm too...
It seems file is empty.

On Mon, Feb 11, 2013 at 8:54 PM, Louis King Jr <email address hidden>wrote:

> well, it seems my VBoxGuest-linux.c file is empty.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1101867
>
> Title:
> virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest kernel
> module failed to build [VBoxGuest-linux.c:206:49: error: expected ‘=’,
> ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’]
>
> Status in “virtualbox” package in Ubuntu:
> Confirmed
>
> Bug description:
> Just got this after today updates
>
> ProblemType: Package
> DistroRelease: Ubuntu 13.04
> Package: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2
> ProcVersionSignature: Ubuntu 3.8.0-0.4-generic 3.8.0-rc3
> Uname: Linux 3.8.0-0-generic x86_64
> NonfreeKernelModules: nvidia
> ApportVersion: 2.8-0ubuntu2
> Architecture: amd64
> DKMSKernelVersion: 3.8.0-1-generic
> Date: Sat Jan 19 12:32:14 2013
> InstallationDate: Installed on 2011-04-03 (656 days ago)
> InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
> MarkForUpload: True
> PackageArchitecture: all
> PackageVersion: 4.1.22-dfsg-0ubuntu2
> SourcePackage: virtualbox
> Title: virtualbox-guest-dkms 4.1.22-dfsg-0ubuntu2: virtualbox-guest
> kernel module failed to build
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1101867/+subscriptions
>

Revision history for this message
Sayantan Das (sayantan13) wrote :

#10 instructions worked just fine on kernel version 3.8.0.5. If your /opt/VBoxGuestAdditions-4.2.6/src/vboxguest-4.2.6/vboxguest/VBoxGuest-linux.c is empty, try installing first without making any changes. Once the compilation fails, you can try again. Also, please make sure to install guest addition drivers from the downloaded iso file and not from Ubuntu's repository. It has the old version 4.1.2.

Revision history for this message
Reinhard Tartler (siretart) wrote :

Setting urgency to high as it defacto makes the package unusable on raring.

I have pushed a fix for this issue in the linked branch. Unfortuantely, now the build breaks with:

mkdir -p out
./configure \
     --ose \
     --odir=/«PKGBUILDDIR»/out \
     --with-linux="/usr" \
     --disable-kmods \
     --enable-webservice \
     --enable-vde
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc:
  ** gcc version 4.7 found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<5!
Check /«PKGBUILDDIR»/out/configure.log for details
make[1]: *** [override_dh_auto_configure] Error 1

Changed in virtualbox (Ubuntu):
importance: Undecided → High
Revision history for this message
Logan Rosen (logan) wrote :

Reinhard, that is because you're working on the virtualbox-ose branch, which hasn't been used since Lucid. virtualbox-ose is now just a transitional package, and the Ubuntu packaging for the current version of VirtualBox is done in lp:ubuntu/virtualbox.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

This here may be a wider problem, which not only affect VirtualBox.

As you can see here:

https://bugs.launchpad.net/ubuntu/+source/r8168/+bug/1108068

The error string is:

"
/media/Ubuntu-Spinner/home/cad/Downloads/r8168-8.035.00/src/r8168_n.c:14545:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_board’
"

which also point on an expected input:
"
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
"

Just a suggestion.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox - 4.2.8-dfsg-0ubuntu1

---------------
virtualbox (4.2.8-dfsg-0ubuntu1) raring; urgency=low

  * New upstream release. (Closes: #691148)
    - Fixes compatibility with kernel 3.8. (Closes: #700823; LP: #1101867)
  * Switch to my @debian.org email address.
  * Move package to contrib as virtualbox 4.2 needs a non-free compiler to
    build the BIOS.
  * Build-depend on libdevmapper-dev.
  * Refresh patches.
    - Drop 36-fix-ftbfs-xserver-112.patch, cve-2012-3221.patch,
      CVE-2013-0420.patch 37-kcompat-3.6.patch and 38-kcompat-3.7.patch.
  * Drop all virtualbox-ose transitional packages.
  * Drop the virtualbox-fuse package as vdfuse fails to build with
    virtualbox 4.2.
  * Update install files and VBox.sh.
  * Bump required kbuild version to 0.1.9998svn2577.
  * Fix path to VBoxCreateUSBNode.sh in virtualbox.postinst. (Closes: #700479)
  * Add an init script to virtuabox-guest-x11 which loads the vboxvideo
    kernel module. The X Server 1.13 doesn't load it anymore. (Closes: #686994)
  * Update man pages. (Closes: #680053)
  * Add 36-python-multiarch.patch from Rico Tzschichholz to fix detection of
    python in multiarch paths using pkg-config.
 -- Felix Geyer <email address hidden> Thu, 07 Mar 2013 16:38:36 +0100

Changed in virtualbox (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Doug (boarder-dougca) wrote :

Will this fix be applied to the 12.04 LTS package? (https://launchpad.net/ubuntu/+source/virtualbox/4.1.12-dfsg-2ubuntu0.3)

Revision history for this message
Heiko (heiko-barg) wrote :

I got also this bug in my 12.04.3 VM :-(

Is there any (easy) workaround for Ubuntu LTS?

Revision history for this message
Albert Graef (dr-graef) wrote :

This bug still isn't fixed in Ubuntu 12.04.3. Is anyone working on this?

To post a comment you must log in.