| Summary: | emulators/qemu-devel: Fails to build when sysutils/fusefs-libs3 installed: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | John Hein <jcfyecrayz> |
| Component: | Individual Port(s) | Assignee: | Muhammad Moinur Rahman <bofh> |
| Status: | Closed Overcome By Events | ||
| Severity: | Affects Only Me | CC: | bofh, se |
| Priority: | --- | Keywords: | needs-qa |
| Version: | Latest | Flags: | koobs:
maintainer-feedback?
(bofh) |
| Hardware: | Any | ||
| OS: | Any | ||
Have a look at bug #260315. Will try to patch in the upcoming weekends. It works with FUSE3. This is not a problem for qemu-devel now. Version 8.2.0.20231031 (and probably some versions before that) has the following in meson.build:
config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE',
cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_PUNCH_HOLE') and
cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_KEEP_SIZE'))
And the source code has conditionals to use that feature or not.
(In reply to John Hein from comment #2) emulators/qemu has a patch to remove the FALLOCATE_PUNCH stuff (qemu/files/patch-block_export_fuse.c), but the meson configuration files also have the change described in comment 2. It may be that the patch is stale and not needed anymore, but I have not confirmed that. (In reply to John Hein from comment #3) I will take a look into this on the next release update. |
'make build' for emulators/qemu-devel fails to build if sysutils/fusefs-libs3 is installed: . . [768/6688] Compiling C object libblockdev.fa.p/nbd_server.c.o [769/6688] Compiling C object libblockdev.fa.p/block_export_export.c.o [770/6688] Compiling C object libblockdev.fa.p/block_export_fuse.c.o FAILED: libblockdev.fa.p/block_export_fuse.c.o cc -Ilibblockdev.fa.p -I. -I.. -Iqapi -Itrace -Iui -Iui/shader -I/usr/local/include/fuse3 -I/usr/local/include -I/usr/local/include/p11-kit-1 -I/z1/local/users/jhein/.nobak/wd/usr/ports/emulators/qemu-devel/work/qemu-de8ed1055c2ce18c95f597eb10df360dcb534f99 -I/usr/local/include/capstone -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -fcolor-diagnostics -Wall -Winvalid-pch -std=gnu11 -O0 -g -iquote . -iquote /z1/local/users/jhein/.nobak/wd/usr/ports/emulators/qemu-devel/work/qemu-de8ed1055c2ce18c95f597eb10df360dcb534f99 -iquote /z1/local/users/jhein/.nobak/wd/usr/ports/emulators/qemu-devel/work/qemu-de8ed1055c2ce18c95f597eb10df360dcb534f99/include -iquote /z1/local/users/jhein/.nobak/wd/usr/ports/emulators/qemu-devel/work/qemu-de8ed1055c2ce18c95f597eb10df360dcb534f99/disas/libvixl -iquote /z1/local/users/jhein/.nobak/wd/usr/ports/emulators/qemu-devel/work/qemu-de8ed1055c2ce18c95f597eb10df360dcb534f99/tcg/i386 -pthread -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv '-DPREFIX=\""/usr/local\""' -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIE -MD -MQ libblockdev.fa.p/block_export_fuse.c.o -MF libblockdev.fa.p/block_export_fuse.c.o.d -o libblockdev.fa.p/block_export_fuse.c.o -c ../block/export/fuse.c ../block/export/fuse.c:624:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^ ../block/export/fuse.c:628:16: error: use of undeclared identifier 'FALLOC_FL_PUNCH_HOLE' if (mode & FALLOC_FL_PUNCH_HOLE) { ^ ../block/export/fuse.c:629:22: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (!(mode & FALLOC_FL_KEEP_SIZE)) { ^ Adding '--disable-fuse' to CONFIGURE_ARGS avoids the attempt to build in fuse support and thus avoids building block_export_fuse.c which contains the FALLOC* linux-isms. FUSE support won't work on FreeBSD without porting that code, so disabling it for now is reasonable. A better fix (perhaps a change that could be submitted upstream) might be a way to write that code in a way that is portable to non-linux OS's.