Bug 256344 - x11-toolkits/libadwaita: build error: vulkan/vulkan.h file not found
Summary: x11-toolkits/libadwaita: build error: vulkan/vulkan.h file not found
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: regression
Depends on:
Blocks: 256333
  Show dependency treegraph
 
Reported: 2021-06-01 17:24 UTC by John Hein
Modified: 2021-06-01 18:48 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2021-06-01 17:24:29 UTC
x11-toolkits/gtk40 has a VULKAN option which, when on, adds a build time dependency on graphics/vulkan-headers.
It is on by default.
When on, it enables some vulkan related compite time features in installed headers.  Such as:

/usr/local/include/gtk-4.0/gdk/gdkconfig.h:#define GDK_RENDERING_VULKAN


x11-toolkits/libadwaita depends on gtk40, but not vulkan-headers (optionally or otherwise).  As a result, the following libadwaita build error occurs if the vulkan-headers package is not installed (it is only a build time dependency for gtk40).

===========
 .
 .
cc -Isrc/libadwaita-1.so.0.p -Isrc -I../src -I. -I.. -Isrc/stylesheet -I/usr/loc/include/glib-2.0 -I/usr/loc/lib/glib-2.0/include -I/usr/loc/include -I/usr/loc/include/fribidi -I/usr/loc/include/gtk-4.0 -I/usr/loc/include/pango-1.0 -I/usr/loc/include/harfbuzz -I/usr/loc/include/freetype2 -I/usr/loc/include/cairo -I/usr/loc/include/pixman-1 -I/usr/loc/include/libdrm -I/usr/loc/include/libpng16 -I/usr/loc/include/gdk-pixbuf-2.0 -I/usr/loc/include/graphene-1.0 -I/usr/loc/lib/graphene-1.0/include -I/usr/loc/include/gio-unix-2.0 -I/usr/loc/include/libepoll-shim -I/wrkdirs/usr/ports/x11-toolkits/libadwaita/work/libadwaita-7f61711633dfd067f4928df80afe6b14f16f886e/_build -fno-color-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O3 -DHAVE_CONFIG_H -DADWAITA_COMPILATION -Wcast-align -Wdate-time -Wdeclaration-after-statement -Werror=format-security -Werror=format=2 -Wendif-labels -Werror=incompatible-pointer-types -Werror=missing-declarations -Werror=overflow -Werror=return-type -Werror=shift-count-overflow -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-strict-aliasing -Wno-unused-parameter -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wtype-limits -Wundef -Wunused-function -fstack-protector-strong -O2 -fstack-protector-strong -fno-strict-aliasing -fPIC -mfpmath=sse -msse -msse2 -D_THREAD_SAFE -pthread '-DG_LOG_DOMAIN="Adwaita"' -fvisibility=hidden -MD -MQ src/libadwaita-1.so.0.p/meson-generated_.._adw-enums.c.o -MF src/libadwaita-1.so.0.p/meson-generated_.._adw-enums.c.o.d -o src/libadwaita-1.so.0.p/meson-generated_.._adw-enums.c.o -c src/adw-enums.c
In file included from src/adw-enums.c:7:
In file included from ../src/adw-flap.h:15:
In file included from /usr/local/include/gtk-4.0/gtk/gtk.h:31:
In file included from /usr/local/include/gtk-4.0/gdk/gdk.h:76:
/usr/local/include/gtk-4.0/gdk/gdkvulkancontext.h:32:10: fatal error: 'vulkan/vulkan.h' file not found
#include <vulkan/vulkan.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.
===========
Comment 1 John Hein 2021-06-01 17:26:57 UTC
CC committer & desktop@
Comment 2 Jan Beich freebsd_committer 2021-06-01 17:40:04 UTC
Oops, I forgot gtk4 had consumers but ports 2f39a02a3a92 was sloppy.
Comment 3 commit-hook freebsd_committer 2021-06-01 18:48:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=52ca7b9c5e8eeaa747fabf04b1a061cd7ccdd3a6

commit 52ca7b9c5e8eeaa747fabf04b1a061cd7ccdd3a6
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-06-01 17:41:30 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-06-01 18:47:00 +0000

    x11-toolkits/gtk40: unbreak consumers after a5d572b40b8b

    In file included from /usr/local/include/gtk-4.0/gtk/gtk.h:31:
    In file included from /usr/local/include/gtk-4.0/gdk/gdk.h:76:
    /usr/local/include/gtk-4.0/gdk/gdkvulkancontext.h:32:10: fatal error: 'vulkan/vulkan.h' file not found
     #include <vulkan/vulkan.h>
              ^~~~~~~~~~~~~~~~~

    PR:             256344
    Reported by:    John Hein <jcfyecrayz@liamekaens.com>

 x11-toolkits/gtk40/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 Jan Beich freebsd_committer 2021-06-01 18:48:52 UTC
Thanks for reporting before pkg-fallout@ caught on.