qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1909256] [NEW] compile failure if gnutls headers not on default inc


From: Peter Maydell
Subject: [Bug 1909256] [NEW] compile failure if gnutls headers not on default include path
Date: Thu, 24 Dec 2020 20:49:28 -0000

Public bug reported:

If the gnutls headers are not on the default compiler include path, then
configure correctly finds them and config-host.mak sets up the
variables:

GNUTLS_CFLAGS=-I/opt/homebrew/Cellar/gnutls/3.6.15/include 
-I/opt/homebrew/Cellar/nettle/3.6/include 
-I/opt/homebrew/Cellar/libtasn1/4.16.0/include 
-I/opt/homebrew/Cellar/libidn2/2.3.0/include 
-I/opt/homebrew/Cellar/p11-kit/0.23.22/include/p11-kit-1
GNUTLS_LIBS=-L/opt/homebrew/Cellar/gnutls/3.6.15/lib -lgnutls

but meson fails to put GNUTLS_CFLAGS in the compiler arguments and so
you get compile failures like:

[2/1865] Compiling C object qemu-nbd.p/qemu-nbd.c.o
FAILED: qemu-nbd.p/qemu-nbd.c.o 
cc -Iqemu-nbd.p -I. -I../.. -Iqapi -Itrace -Iui -Iui/shader 
-I/opt/homebrew/Cellar/glib/2.66.4/include 
-I/opt/homebrew/Cellar/glib/2.66.4/include/glib-2.0 
-I/opt/homebrew/Cellar/glib/2.66.4/lib/glib-2.0/include 
-I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre/8.44/include 
-Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -std=gnu99 -g 
-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 -fstack-protector-strong -iquote 
/Users/pm215/qemu/tcg/aarch64 -iquote . -iquote /Users/pm215/qemu -iquote 
/Users/pm215/qemu/accel/tcg -iquote /Users/pm215/qemu/include -iquote 
/Users/pm215/qemu/disas/libvixl -MD -MQ qemu-nbd.p/qemu-nbd.c.o -MF 
qemu-nbd.p/qemu-nbd.c.o.d -o qemu-nbd.p/qemu-nbd.c.o -c ../../qemu-nbd.c
In file included from ../../qemu-nbd.c:30:
In file included from /Users/pm215/qemu/include/block/nbd.h:25:
/Users/pm215/qemu/include/crypto/tlscreds.h:28:10: fatal error: 
'gnutls/gnutls.h' file not found
#include <gnutls/gnutls.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.


The compiler errors happen for any .c file that includes block/nbd.h and also 
for files in tests that include gnutls.h directly, and for files that directly 
or indirectly include crypto/tlssession.c.

My meson-foo is insufficient to suggest the correct fix...

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1909256

Title:
  compile failure if gnutls headers not on default include path

Status in QEMU:
  New

Bug description:
  If the gnutls headers are not on the default compiler include path,
  then configure correctly finds them and config-host.mak sets up the
  variables:

  GNUTLS_CFLAGS=-I/opt/homebrew/Cellar/gnutls/3.6.15/include 
-I/opt/homebrew/Cellar/nettle/3.6/include 
-I/opt/homebrew/Cellar/libtasn1/4.16.0/include 
-I/opt/homebrew/Cellar/libidn2/2.3.0/include 
-I/opt/homebrew/Cellar/p11-kit/0.23.22/include/p11-kit-1
  GNUTLS_LIBS=-L/opt/homebrew/Cellar/gnutls/3.6.15/lib -lgnutls

  but meson fails to put GNUTLS_CFLAGS in the compiler arguments and so
  you get compile failures like:

  [2/1865] Compiling C object qemu-nbd.p/qemu-nbd.c.o
  FAILED: qemu-nbd.p/qemu-nbd.c.o 
  cc -Iqemu-nbd.p -I. -I../.. -Iqapi -Itrace -Iui -Iui/shader 
-I/opt/homebrew/Cellar/glib/2.66.4/include 
-I/opt/homebrew/Cellar/glib/2.66.4/include/glib-2.0 
-I/opt/homebrew/Cellar/glib/2.66.4/lib/glib-2.0/include 
-I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre/8.44/include 
-Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -std=gnu99 -g 
-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 -fstack-protector-strong -iquote 
/Users/pm215/qemu/tcg/aarch64 -iquote . -iquote /Users/pm215/qemu -iquote 
/Users/pm215/qemu/accel/tcg -iquote /Users/pm215/qemu/include -iquote 
/Users/pm215/qemu/disas/libvixl -MD -MQ qemu-nbd.p/qemu-nbd.c.o -MF 
qemu-nbd.p/qemu-nbd.c.o.d -o qemu-nbd.p/qemu-nbd.c.o -c ../../qemu-nbd.c
  In file included from ../../qemu-nbd.c:30:
  In file included from /Users/pm215/qemu/include/block/nbd.h:25:
  /Users/pm215/qemu/include/crypto/tlscreds.h:28:10: fatal error: 
'gnutls/gnutls.h' file not found
  #include <gnutls/gnutls.h>
           ^~~~~~~~~~~~~~~~~
  1 error generated.

  
  The compiler errors happen for any .c file that includes block/nbd.h and also 
for files in tests that include gnutls.h directly, and for files that directly 
or indirectly include crypto/tlssession.c.

  My meson-foo is insufficient to suggest the correct fix...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1909256/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]