Skip to contentSkip to conversation

macOS build error after ddac19f534 (virtio: split virtio 9p bits from virtio-pci)

Qemu-devel BALATON Zoltan 3 participants 6 messages Jan 29, 2019

lore
Share & tools
lore
#0 lore raw

Hello,

I'm getting error building on macOS after commit ddac19f534:

CC aarch64-softmmu/hw/virtio/virtio-blk-pci.o
In file included from qemu/hw/virtio/virtio-9p-pci.c:19:
In file included from qemu/hw/9pfs/virtio-9p.h:6:
In file included from qemu/hw/9pfs/9p.h:7:
qemu/fsdev/file-op-9p.h:19:10: fatal error: 'sys/vfs.h' file not found

#include <sys/vfs.h>
         ^~~~~~~~~~~

Am I missing something? (Apart from the include file which is not present on OS X... Maybe this needs the #ifdefs it had before the split?)

Regards,
BALATON Zoltan

#1 lore raw

Hi Zoltan,

Quoted 12 lines · BALATON Zoltan

Hello,

I'm getting error building on macOS after commit ddac19f534:

  CC      aarch64-softmmu/hw/virtio/virtio-blk-pci.o
In file included from qemu/hw/virtio/virtio-9p-pci.c:19:
In file included from qemu/hw/9pfs/virtio-9p.h:6:
In file included from qemu/hw/9pfs/9p.h:7:
qemu/fsdev/file-op-9p.h:19:10: fatal error: 'sys/vfs.h' file not found #include <sys/vfs.h>
         ^~~~~~~~~~~

Quoted 2 lines

Am I missing something? (Apart from the include file which is not present on OS X... Maybe this needs the #ifdefs it had before the split?)

It seems commits are not correctly ordered for bisectability :(

If you cherry-pick ecd3b89b054, does it build?

#2 lore raw
Quoted 18 lines · On Tue, 29 Jan 2019 08:32:08 +0100 Philippe Mathieu-Daudé <[email protected]>…

Hi Zoltan,

Quoted 14 lines · BALATON Zoltan

Hello,

I'm getting error building on macOS after commit ddac19f534:

  CC      aarch64-softmmu/hw/virtio/virtio-blk-pci.o
In file included from qemu/hw/virtio/virtio-9p-pci.c:19:
In file included from qemu/hw/9pfs/virtio-9p.h:6:
In file included from qemu/hw/9pfs/9p.h:7:
qemu/fsdev/file-op-9p.h:19:10: fatal error: 'sys/vfs.h' file not found #include <sys/vfs.h>
         ^~~~~~~~~~~

Am I missing something? (Apart from the include file which is not present on OS X... Maybe this needs the #ifdefs it had before the split?)

No, the problem is that virtio-9p-pci should only be compiled on a linux host.

Quoted 3 lines

It seems commits are not correctly ordered for bisectability :(

If you cherry-pick ecd3b89b054, does it build?

I agree this is likely the problem. A workaround is to pass --disable-virtfs to configure when bisecting on OS X.

#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 12 lines · BALATON Zoltan

Hello,

I'm getting error building on macOS after commit ddac19f534:

? CC????? aarch64-softmmu/hw/virtio/virtio-blk-pci.o
In file included from qemu/hw/virtio/virtio-9p-pci.c:19:
In file included from qemu/hw/9pfs/virtio-9p.h:6:
In file included from qemu/hw/9pfs/9p.h:7:
qemu/fsdev/file-op-9p.h:19:10: fatal error: 'sys/vfs.h' file not found #include <sys/vfs.h>
???????? ^~~~~~~~~~~

Quoted 6 lines
Quoted 2 lines

Am I missing something? (Apart from the include file which is not present on OS X... Maybe this needs the #ifdefs it had before the split?)

It seems commits are not correctly ordered for bisectability :(

If you cherry-pick ecd3b89b054, does it build?

No it fails with same error on HEAD as well ever since the above commit.

Regards,
BALATON Zoltan

#4 lore raw
Quoted 14 lines · BALATON Zoltan
Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 12 lines · BALATON Zoltan

Hello,

I'm getting error building on macOS after commit ddac19f534:

? CC????? aarch64-softmmu/hw/virtio/virtio-blk-pci.o
In file included from qemu/hw/virtio/virtio-9p-pci.c:19:
In file included from qemu/hw/9pfs/virtio-9p.h:6:
In file included from qemu/hw/9pfs/9p.h:7:
qemu/fsdev/file-op-9p.h:19:10: fatal error: 'sys/vfs.h' file not found #include <sys/vfs.h>
???????? ^~~~~~~~~~~

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Am I missing something? (Apart from the include file which is not present on OS X... Maybe this needs the #ifdefs it had before the split?)

It seems commits are not correctly ordered for bisectability :(

If you cherry-pick ecd3b89b054, does it build?

No it fails with same error on HEAD as well ever since the above commit.

Now it has built after completely removing build directory. Somehow a CONFIG_VIRTIO_9P got set before even after doing make distclean several times. Only completetly removing build dir has helped.

Regards,
BALATON Zoltan

#5 lore raw
Quoted 21 lines · BALATON Zoltan
Quoted 20 lines · BALATON Zoltan
Quoted 19 lines · Philippe Mathieu-Daudé
Quoted 12 lines · BALATON Zoltan

Hello,

I'm getting error building on macOS after commit ddac19f534:

? CC????? aarch64-softmmu/hw/virtio/virtio-blk-pci.o
In file included from qemu/hw/virtio/virtio-9p-pci.c:19:
In file included from qemu/hw/9pfs/virtio-9p.h:6:
In file included from qemu/hw/9pfs/9p.h:7:
qemu/fsdev/file-op-9p.h:19:10: fatal error: 'sys/vfs.h' file not found #include <sys/vfs.h>
???????? ^~~~~~~~~~~

Quoted 3 lines

Am I missing something? (Apart from the include file which is not present on OS X... Maybe this needs the #ifdefs it had before the split?)

It seems commits are not correctly ordered for bisectability :(

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

If you cherry-pick ecd3b89b054, does it build?

No it fails with same error on HEAD as well ever since the above commit.

Now it has built after completely removing build directory. Somehow a CONFIG_VIRTIO_9P got set before even after doing make distclean several times. Only completetly removing build dir has helped.

I think a similar bug you experienced hits me via another way, while running the block tests:

--- /home/phil/source/qemu/tests/qemu-iotests/095.out 2018-12-12
15:06:54.019029386 +0100
+++ /home/phil/source/qemu/build/tests/qemu-iotests/095.out.bad

2019-01-29 08:34:54.701705730 +0100

@@ -10,18 +10,5 @@

=== Running QEMU Live Commit Test ===

-{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "test"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "test"}} -{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "test"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "test"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "test", "len":
104857600, "offset": 104857600, "speed": 0, "type": "commit"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "test"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "test"}} -
-=== Base image info after commit and resize ===
-image: TEST_DIR/t.IMGFMT.base
-file format: IMGFMT
-virtual size: 100M (104857600 bytes)
-*** done
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=virtio,id=test:
'virtio-blk-pci' is not a valid device model name
+Timeout waiting for return on handle 0

I'm using out-of-tree builds, I rebased by branch onto /master, which correctly triggered a reconfigure:

config-host.mak is out-of-date, running configure

But then there was a desync with the config variables (CONFIG_VIRTIO_BLK here?). Maybe I did something wrong at some point, I was working with VM tests at the same time.
However in my case a 'make clean' was enough and I could rebuild/test in the same directory.
Anyway, I won't worry much about this.

Regards,

Phil.