Bug 260835 - emulators/qemu-devel: Fails to build when sysutils/fusefs-libs3 installed: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE'
Summary: emulators/qemu-devel: Fails to build when sysutils/fusefs-libs3 installed: er...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-12-31 07:41 UTC by John Hein
Modified: 2022-01-28 09:26 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback? (bofh)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2021-12-31 07:41:49 UTC
'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.
Comment 1 Muhammad Moinur Rahman freebsd_committer 2021-12-31 08:09:52 UTC
Have a look at bug #260315. Will try to patch in the upcoming weekends. It works with FUSE3.