apt source --compile qemu-system-x86 fails on last ubuntu 18.04.1

Bug #1793183 reported by Dmitry Isaykin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Medium
Unassigned

Bug Description

Error log:

/tmp/qemu-2.10+dfsg/util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration
 static int memfd_create(const char *name, unsigned int flags)
            ^~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0,
                 from /usr/include/x86_64-linux-gnu/bits/mman.h:45,
                 from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
                 from /tmp/qemu-2.10+dfsg/include/sysemu/os-posix.h:29,
                 from /tmp/qemu-2.10+dfsg/include/qemu/osdep.h:104,
                 from /tmp/qemu-2.10+dfsg/util/memfd.c:28:
/usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here
 int memfd_create (const char *__name, unsigned int __flags) __THROW;
     ^~~~~~~~~~~~
/tmp/qemu-2.10+dfsg/rules.mak:66: recipe for target 'util/memfd.o' failed
make[1]: *** [util/memfd.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/qemu-2.10+dfsg/qemu-build'
debian/rules:121: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Revision history for this message
Dmitry Isaykin (dmitry-isaikin) wrote :
affects: qemu → ubuntu
affects: ubuntu → qemu (Ubuntu)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-memfd-conflict.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Peter Maydell (pmaydell) wrote : Re: [Qemu-devel] [Bug 1793183] [NEW] apt source --compile qemu-system-x86 fails on last ubuntu 18.04.1

On 18 September 2018 at 10:24, Dmitry Isaykin <email address hidden> wrote:
> Public bug reported:
>
> Error log:
>
> /tmp/qemu-2.10+dfsg/util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration
> static int memfd_create(const char *name, unsigned int flags)
> ^~~~~~~~~~~~
> In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0,
> from /usr/include/x86_64-linux-gnu/bits/mman.h:45,
> from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
> from /tmp/qemu-2.10+dfsg/include/sysemu/os-posix.h:29,
> from /tmp/qemu-2.10+dfsg/include/qemu/osdep.h:104,
> from /tmp/qemu-2.10+dfsg/util/memfd.c:28:
> /usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here
> int memfd_create (const char *__name, unsigned int __flags) __THROW;
> ^~~~~~~~~~~~
> /tmp/qemu-2.10+dfsg/rules.mak:66: recipe for target 'util/memfd.o' failed

This is fixed in upstream QEMU in commit 75e5b70e6b5dcc, which is in
QEMU 2.12.0. If Ubuntu are interested in fixing this they can backport
that to the QEMU they are shipping, or alternatively move forward to 2.12.

thanks
-- PMM

Changed in qemu (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This was already fixed in bionic's 1:2.11+dfsg-1ubuntu4, and the current version of the package in bionic is 1:2.11+dfsg-1ubuntu7.5.

I just tried a build in bionic and it finished just fine.

Looking at the tmp directory of your build, you seem to be using an older version:
/tmp/qemu-2.10+dfsg/util/memfd.c:40:12: error: static......

I will therefore mark this bug as invalid. If you believe that to be a mistake, please reopen it with further information.

Thanks!

Changed in qemu (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers