You need to sign in or sign up before continuing.
migration: Build failure on MacOS with Homebrew (gnutls/gnutls.h not found)
Compiling migration_qemu-file-channel.c
fails because it does not add the required compiler flags for gnutls
:
stefan@mini qemu % make -C build
/opt/homebrew/bin/meson introspect --targets --tests --benchmarks | /opt/homebrew/bin/python3 -B scripts/mtest2make.py > Makefile.mtest
GIT ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp
GIT ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp
[1/78] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[2/35] Compiling C object libmigration.fa.p/migration_qemu-file-channel.c.o
FAILED: libmigration.fa.p/migration_qemu-file-channel.c.o
cc -Ilibmigration.fa.p -I. -I.. -Iqapi -Itrace -Iui -Iui/shader -I/opt/homebrew/Cellar/glib/2.68.3/include -I/opt/homebrew/Cellar/glib/2.68.3/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.68.3/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre/8.44/include -fcolor-diagnostics -Wall -Winvalid-pch -std=gnu99 -O2 -g -iquote . -iquote /Users/stefan/src/gitlab/qemu-project/qemu -iquote /Users/stefan/src/gitlab/qemu-project/qemu/include -iquote /Users/stefan/src/gitlab/qemu-project/qemu/disas/libvixl -iquote /Users/stefan/src/gitlab/qemu-project/qemu/tcg/aarch64 -DOS_OBJECT_USE_OBJC=0 -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 -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 -Wno-psabi -fstack-protector-strong -MD -MQ libmigration.fa.p/migration_qemu-file-channel.c.o -MF libmigration.fa.p/migration_qemu-file-channel.c.o.d -o libmigration.fa.p/migration_qemu-file-channel.c.o -c ../migration/qemu-file-channel.c
In file included from ../migration/qemu-file-channel.c:29:
In file included from /Users/stefan/src/gitlab/qemu-project/qemu/include/io/channel-tls.h:26:
In file included from /Users/stefan/src/gitlab/qemu-project/qemu/include/crypto/tlssession.h:24:
/Users/stefan/src/gitlab/qemu-project/qemu/include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found
#include <gnutls/gnutls.h>
^~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
make: *** [run-ninja] Error 1
stefan@mini qemu % pkg-config --cflags gnutls
-I/opt/homebrew/Cellar/gnutls/3.6.16/include -I/opt/homebrew/Cellar/nettle/3.7.3/include -I/opt/homebrew/Cellar/libtasn1/4.17.0/include -I/opt/homebrew/Cellar/libidn2/2.3.1/include -I/opt/homebrew/Cellar/p11-kit/0.24.0/include/p11-kit-1
Edited by Stefan Weil