Closed SJ123SJ closed 2 years ago
I tried replacing vpc.c above with a version found in the QEMM project here. The above compilation errors go away, but new errors surface:
/home/sj/temp/qemu/block/vpc.c:1238:35: error: initialization of ‘int (*)(BlockDriverState *, uint64_t, uint64_t, QEMUIOVector *, int)’ {aka ‘int (*)(BlockDriverState *, long unsigned int, long unsigned int, QEMUIOVector *, int)’} from incompatible pointer type ‘int (*)(BlockDriverState *, int64_t, int64_t, QEMUIOVector *, BdrvRequestFlags)’ {aka ‘int (*)(BlockDriverState *, long int, long int, QEMUIOVector *, BdrvRequestFlags)’} [-Werror=incompatible-pointer-types]
1238 | .bdrv_co_preadv = vpc_co_preadv,
| ^~~~~~~~~~~~~
/home/sj/temp/qemu/block/vpc.c:1238:35: note: (near initialization for ‘bdrv_vpc.bdrv_co_preadv’)
/home/sj/temp/qemu/block/vpc.c:1239:35: error: initialization of ‘int (*)(BlockDriverState *, uint64_t, uint64_t, QEMUIOVector *, int)’ {aka ‘int (*)(BlockDriverState *, long unsigned int, long unsigned int, QEMUIOVector *, int)’} from incompatible pointer type ‘int (*)(BlockDriverState *, int64_t, int64_t, QEMUIOVector *, BdrvRequestFlags)’ {aka ‘int (*)(BlockDriverState *, long int, long int, QEMUIOVector *, BdrvRequestFlags)’} [-Werror=incompatible-pointer-types]
1239 | .bdrv_co_pwritev = vpc_co_pwritev,
| ^~~~~~~~~~~~~~
/home/sj/temp/qemu/block/vpc.c:1239:35: note: (near initialization for ‘bdrv_vpc.bdrv_co_pwritev’)
Hi Jeff,
What compiler and version of it are you using?
When building QEMU from older branches you may need to use an older toolchain or configure with --disable-werror.
Best regards, Edgar
I'm using gcc/g++ 11.2.0 I was following the build instructions here. The reported errors are from building using the branch listed in the build instructions. Since the documented branch is "old", I switched to build from the master. Which BTW now requires one to install NINJA, so I did... and now the code compiles.
I was following the Confluence build directions
I built from the latest branches 2020.3 and 2021.1 Both builds resulted in the same errors
How to best proceed?