qemu-kvm (1.0+noroms-0ubuntu4) fails to build on Ubuntu Precise locally

Bug #930181 reported by Boris Derzhavets on 2012-02-10
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qemu-kvm (Debian)
Fix Released
Unknown
qemu-kvm (Ubuntu)
High
Unassigned
qemu-linaro (Ubuntu)
High
Steve Langasek

Bug Description

In mean time download and dpkg-source

    qemu-kvm_1.0+noroms.orig.tar.gz (4.7 MiB)
    qemu-kvm_1.0+noroms-0ubuntu4.diff.gz (56.3 KiB)
    qemu-kvm_1.0+noroms-0ubuntu4.dsc (2.2 KiB)

During 'debuild -rfakeroot -b -k45BD6814' generates an error :-

 CC libhw64/9pfs/virtio-9p-handle.o
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In function ‘handle_update_file_cred’:
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:103:58: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:103:58: note: each undeclared identifier is reported only once for each function it appears in
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In function ‘handle_lstat’:
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:120:34: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In function ‘handle_symlink’:
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:340:62: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In function ‘handle_link’:
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:363:45: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In function ‘handle_chown’:
/home/boris/TEST/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:399:58: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
make[2]: *** [9pfs/virtio-9p-handle.o] Error 1
make[1]: *** [subdir-libhw64] Error 2
make[1]: Leaving directory `/home/boris/TEST/qemu-kvm-1.0+noroms'
make: *** [install-stamp] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1350:
dpkg-buildpackage -rfakeroot -D -us -uc -b failed

It didn't happen on 02/02/2012.

Changed in qemu-kvm (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Serge Hallyn (serge-hallyn) wrote :

/usr/include/asm-generic/fcntl.h:127:8: error: redefinition of 'struct f_owner_ex'
/usr/include/x86_64-linux-gnu/bits/fcntl.h:204:8: note: originally defined here
/usr/include/asm-generic/fcntl.h:167:8: error: redefinition of 'struct flock'
/usr/include/x86_64-linux-gnu/bits/fcntl.h:168:8: note: originally defined here
/usr/include/asm-generic/fcntl.h:184:8: error: redefinition of 'struct flock64'
/usr/include/x86_64-linux-gnu/bits/fcntl.h:183:8: note: originally defined here
make[1]: *** [9pfs/virtio-9p-handle.o] Error 1
make: *** [subdir-libhw64] Error 2
(precise-amd64)serge@sergelap:~/packaging/qemu-kvm/p/qemu-kvm-1.0+noroms$ dpkg -S /usr/include/asm-generic/fcntl.h
linux-libc-dev: /usr/include/asm-generic/fcntl.h
(precise-amd64)serge@sergelap:~/packaging/qemu-kvm/p/qemu-kvm-1.0+noroms$ dpkg -S /usr/include/x86_64-linux-gnu/bits/fcntl.h
libc6-dev: /usr/include/x86_64-linux-gnu/bits/fcntl.h

Could this be fallout from the recent libc6 update?

Boris Derzhavets (bderzhavets) wrote :

I believe libc6 2.14 works properly. You have upgraded from 2.13 up to 2.15.

Serge Hallyn (serge-hallyn) wrote :

Filed bug 933045 on the problem in comment #2.

I will hand-define AT_EMPTY_PATH in the qemu source - it actually already is, but only under one #ifdef which is not related to the use of that define. So I think that's a qemu bug. Will send the patch upstream.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-kvm - 1.0+noroms-0ubuntu5

---------------
qemu-kvm (1.0+noroms-0ubuntu5) precise; urgency=low

  * define_AT_EMPTY_PATH.patch: Make sure AT_EMPTY_PATH is defined.
   (LP: #930181)
  * Be smarter about what bridge to attach a TAP device to (LP: #475327):
    - qemu-ifup-choosebridge.patch: Don't use the default nic as a
      bridge, if it isn't a bridge.
    - debian/qemu-ifdown: use same logic as qemu-ifup to determine
      the bridge
    - debian/qemu-kvm.default: add commented TAPBR option
 -- Serge Hallyn <email address hidden> Wed, 15 Feb 2012 15:47:57 -0600

Changed in qemu-kvm (Ubuntu):
status: Confirmed → Fix Released
Steve Langasek (vorlon) wrote :

Same issue affects the qemu-linaro build. I'll copy the patch over from qemu-kvm.

Changed in qemu-linaro (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steve Langasek (vorlon)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-linaro - 1.0.50-2012.02-0ubuntu1

---------------
qemu-linaro (1.0.50-2012.02-0ubuntu1) precise; urgency=low

  * New upstream release.
  * Pass --enable-uname-release=2.6.32 for the user emulation builds, so that
    we have a sensible baseline kernel value regardless of what the
    underlying host kernel is. This makes eglibc happier when running under
    emulation on a very old kernel for instance (whose host syscall ABI has
    nothing to do with what emulated syscalls are supported), and probably
    also lets us steer clear for the moment of code that has problem with
    the new kernel upstream versioning convention. LP: #921078.
  * debian/patches/define_AT_EMPTY_PATH.patch: make sure AT_EMPTY_PATH
    is defined. Thanks to Serge Hallyn <email address hidden>.
    Closes LP: #930181.
 -- Steve Langasek <email address hidden> Mon, 20 Feb 2012 17:32:06 -0800

Changed in qemu-linaro (Ubuntu):
status: Triaged → Fix Released
Steffen K. (sk-gobuki) wrote :

I still get the error with qemu-kvm-1.0+noroms-0ubuntu9

I downloaded the source and patch like this

gobuki@tatooine:/src$ apt-get source qemu-kvm
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Statusinformationen werden eingelesen... Fertig
Es müssen 5.022 kB an Quellarchiven heruntergeladen werden.
Hole:1 http://archive.ubuntu.com/ubuntu/ precise/main qemu-kvm 1.0+noroms-0ubuntu9 (dsc) [1.922 B]
Hole:2 http://archive.ubuntu.com/ubuntu/ precise/main qemu-kvm 1.0+noroms-0ubuntu9 (tar) [4.954 kB]
Hole:3 http://archive.ubuntu.com/ubuntu/ precise/main qemu-kvm 1.0+noroms-0ubuntu9 (diff) [66,3 kB]
Es wurden 5.022 kB in 4 s geholt (1.124 kB/s)
gpgv: Signatur am Di 20 Mär 2012 16:10:54 CET mit RSA Schlüssel, ID A85E3F9D, erfolgt
gpgv: Unterschrift kann nicht geprüft werden: Öffentlicher Schlüssel nicht gefunden
dpkg-source: Warnung: Fehler beim Überprüfen der Signatur von ./qemu-kvm_1.0+noroms-0ubuntu9.dsc
dpkg-source: Information: qemu-kvm wird nach qemu-kvm-1.0+noroms extrahiert
dpkg-source: Information: qemu-kvm_1.0+noroms.orig.tar.gz wird entpackt
dpkg-source: Information: qemu-kvm_1.0+noroms-0ubuntu9.diff.gz wird angewandt

Then i configured and compiled like this

gobuki@tatooine:/src$ ./configure --enable-vnc --enable-vde
gobuki@tatooine:/src$ make

Somewhere in the middle it stops with this message

/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In Funktion »handle_update_file_cred«:
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:103:58: Fehler: »AT_EMPTY_PATH« nicht deklariert (erste Benutzung in dieser Funktion)
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:103:58: Anmerkung: jeder nicht deklarierte Bezeichner wird nur einmal für jede Funktion, in der er vorkommt, gemeldet
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In Funktion »handle_lstat«:
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:120:34: Fehler: »AT_EMPTY_PATH« nicht deklariert (erste Benutzung in dieser Funktion)
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In Funktion »handle_symlink«:
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:340:62: Fehler: »AT_EMPTY_PATH« nicht deklariert (erste Benutzung in dieser Funktion)
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In Funktion »handle_link«:
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:363:45: Fehler: »AT_EMPTY_PATH« nicht deklariert (erste Benutzung in dieser Funktion)
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c: In Funktion »handle_chown«:
/home/gobuki/src/qemu-kvm-1.0+noroms/hw/9pfs/virtio-9p-handle.c:399:58: Fehler: »AT_EMPTY_PATH« nicht deklariert (erste Benutzung in dieser Funktion)
make[1]: *** [9pfs/virtio-9p-handle.o] Fehler 1
make: *** [subdir-libhw64] Fehler 2
make: *** Warte auf noch nicht beendete Prozesse...

Steffen K. (sk-gobuki) wrote :

Ok, i just did it wrong. The message ...

> dpkg-source: Information: qemu-kvm_1.0+noroms-0ubuntu9.diff.gz wird angewandt

... made me think the patch must have been applied, but apparently the debian patches aren't
applied by apt-get source

So, the right way is to issue these commands to build it, instead of configuring and making it yourself.

cd qemu-kvm-1.0+noroms
DEB_BUILD_OPTIONS="--enable-vnc --enable-vde"
dpkg-buildpackage -rfakeroot -b -j4 -uc -us

Changed in qemu-kvm (Debian):
status: Unknown → New
Changed in qemu-kvm (Debian):
status: New → Fix Committed

  CC libhw64/9pfs/virtio-9p-handle.o
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_update_file_cred’:
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c:70:58: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c:70:58: note: each undeclared identifier is reported only once for each function it appears in
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_lstat’:
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c:87:34: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_symlink’:
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c:314:62: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_link’:
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c:337:45: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c: In function ‘handle_chown’:
/home/pwieczkowski/qemu-1.0.1/hw/9pfs/virtio-9p-handle.c:373:58: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function)
make[1]: *** [9pfs/virtio-9p-handle.o] Error 1
make: *** [subdir-libhw64] Error 2

screen copy of make error of qemu 1.01 on Precise Pangolin UbuntuStudio after "sudo apt-get build-dep qemu"

Serge Hallyn (serge-hallyn) wrote :

@Paul,

please see comment #9. Make sure you do 'quilt push -a' after extracting the package source. In particular this will apply the patch define_AT_EMPTY_PATH.patch.

Changed in qemu-kvm (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.