Bug 247517 - x11-toolkits/gtk30 fails with OPTIONS_UNSET=X11
Summary: x11-toolkits/gtk30 fails with OPTIONS_UNSET=X11
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-24 08:57 UTC by Palle Girgensohn
Modified: 2020-08-14 16:40 UTC (History)
4 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Palle Girgensohn freebsd_committer 2020-06-24 08:57:49 UTC
With OPTIONS_UNSET=X11, x11-toolkits/gtk30 still expects X11. Perhaps there's no way around it? In my case, x11-toolkits/gtk30 is pulled in by emulators/qemu, but Iäd prefer to build without X11 still.

It fails since the graphics/libexpoxy *does* honor OPTIONS_UNSET=X11.

=>> Building x11-toolkits/gtk30
build started at Tue Jun 23 16:30:07 CEST 2020
port directory: /usr/ports/x11-toolkits/gtk30
package name: gtk3-3.24.20
building for: FreeBSD 121-amd64-git-job-01 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 amd64
maintained by: gnome@FreeBSD.org
Makefile ident: 
Poudriere version: 3.3.3
Host OSVERSION: 1201000
Jail OSVERSION: 1201000
Job Id: 01

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1201000
UNAME_v=FreeBSD 12.1-RELEASE-p1
UNAME_r=12.1-RELEASE-p1
BLOCKSIZE=K
MAIL=/var/mail/root
STATUS=1
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
LOCALBASE=/usr/local
USER=root
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.3
MASTERMNT=/usr/local/poudriere/data/.m/121-amd64-git/ref
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=screen
PWD=/usr/local/poudriere/data/.m/121-amd64-git/ref/.p/pool
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=121-amd64-git
SCRIPTPREFIX=/usr/local/share/poudriere
OLDPWD=/usr/local/poudriere/data/.m/121-amd64-git/ref/.p
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
POUDRIEREPATH=/usr/local/bin/poudriere
---End Environment---

---Begin Poudriere Port Flags/Env---
PORT_FLAGS=
PKGENV=
FLAVOR=
DEPENDS_ARGS=
MAKE_ARGS=
---End Poudriere Port Flags/Env---

---Begin OPTIONS List---
===> The following configuration options are available for gtk3-3.24.20:
     ATK_BRIDGE=on: AT-SPI ATK bridge support (requires X11)
     BROADWAY=on: Enable GDK Broadway backend for showing GTK+ in the webbrowser using HTML5 and web sockets.
     CLOUDPRINT=off: Cloud printing support
     COLORD=on: Color profile support
     CUPS=on: CUPS printing system support
     DEBUG=off: Build with debugging support
     WAYLAND=on: GDK Wayland backend
     X11=on: GDK X11 backend
===> Use 'make config' to modify these settings
---End OPTIONS List---

--MAINTAINER--
gnome@FreeBSD.org
--End MAINTAINER--

--CONFIGURE_ARGS--
--enable-introspection --with-atk-bridge --enable-broadway-backend --disable-cloudprint --enable-colord --enable-cups --enable-wayland-backend --enable-x11-backend --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local ${_LATE_CONFIGURE_ARGS}
--End CONFIGURE_ARGS--

--CONFIGURE_ENV--
MAKE=gmake ac_cv_path_PERL=/usr/local/bin/perl ac_cv_path_PERL_PATH=/usr/local/bin/perl  PERL_USE_UNSAFE_INC=1 PKG_CONFIG=pkgconf XDG_DATA_HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work  HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/x11-toolkits/gtk30/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/sh CONFIG_SHELL=/bin/sh CMAKE_PREFIX_PATH="/usr/local" LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 CONFIG_SITE=/usr/ports/Templates/config.site lt_cv_sys_max_cmd_len=262144
--End CONFIGURE_ENV--

--MAKE_ENV--
GI_SCANNER_DISABLE_CACHE=1 XDG_CACHE_HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work PERL_USE_UNSAFE_INC=1 XDG_DATA_HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work  HOME=/wrkdirs/usr/ports/x11-toolkits/gtk30/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/x11-toolkits/gtk30/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer -isystem /usr/local/include"  LDFLAGS=" -fstack-protector-strong " LIBS="-L/usr/local/lib"  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include "  MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444"
--End MAKE_ENV--

--PLIST_SUB--
LIBVERSION=0.2404.16 ATK_BRIDGE="" NO_ATK_BRIDGE="@comment " BROADWAY="" NO_BROADWAY="@comment " CLOUDPRINT="@comment " NO_CLOUDPRINT="" COLORD="" NO_COLORD="@comment " CUPS="" NO_CUPS="@comment " DEBUG="@comment " NO_DEBUG="" WAYLAND="" NO_WAYLAND="@comment " X11="" NO_X11="@comment " GTK2_VERSION="2.10.0"  GTK3_VERSION="3.0.0" OSREL=12.1 PREFIX=%D LOCALBASE=/usr/local  RESETPREFIX=/usr/local LIB32DIR=lib PERL_VERSION=5.30.3  PERL_VER=5.30  PERL5_MAN1=lib/perl5/site_perl/man/man1  PERL5_MAN3=lib/perl5/site_perl/man/man3  SITE_PERL=lib/perl5/site_perl  SITE_ARCH=lib/perl5/site_perl/mach/5.30 DOCSDIR="share/doc/gtk"  EXAMPLESDIR="share/examples/gtk"  DATADIR="share/gtk"  WWWDIR="www/gtk"  ETCDIR="etc/gtk"
--End PLIST_SUB--

--SUB_LIST--
 ATK_BRIDGE="" NO_ATK_BRIDGE="@comment " BROADWAY="" NO_BROADWAY="@comment " CLOUDPRINT="@comment " NO_CLOUDPRINT="" COLORD="" NO_COLORD="@comment " CUPS="" NO_CUPS="@comment " DEBUG="@comment " NO_DEBUG="" WAYLAND="" NO_WAYLAND="@comment " X11="" NO_X11="@comment " PREFIX=/usr/local LOCALBASE=/usr/local  DATADIR=/usr/local/share/gtk DOCSDIR=/usr/local/share/doc/gtk EXAMPLESDIR=/usr/local/share/examples/gtk  WWWDIR=/usr/local/www/gtk ETCDIR=/usr/local/etc/gtk
--End SUB_LIST--

---Begin make.conf---
USE_PACKAGE_DEPENDS=yes
BATCH=yes
WRKDIRPREFIX=/wrkdirs
PORTSDIR=/usr/ports
PACKAGES=/packages
DISTDIR=/distfiles
FORCE_PACKAGE=yes
PACKAGE_BUILDING=yes
PACKAGE_BUILDING_FLAVORS=yes
#### /usr/local/etc/poudriere.d/make.conf ####
# make.conf
WITH_PKGNG=yes
WWWOWN=nobody
WWWGRP=nogroup

# for nagios:
WWW_GROUP=www
WWW_OWNER=www

JAVA_VERSION=1.8+

# For RT:
WEB_USER=	www
WEB_GROUP=	www

DEFAULT_VERSIONS= pgsql=12 mysql=5.7 apache=2.4 php=7.4
#php=7.3
# linux=c6_64 default is not c7
# bdb=48 default is now 5, 6 has license problems

OPTIONS_UNSET?= X11 NLS
WITH_PKGNG=YES

WANT_OPENLDAP_SASL=yes

#RUBY_VER=2.3

WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/cache/ccache

ALLOW_UNSUPPORTED_SYSTEM=yes
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/root/.ccache

...
---
...


mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DG_LOG_USE_STRUCTURED=1 -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -fvisibility=hidden -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_56 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_58 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/libepoll-shim -I/usr/local/lib/libffi-3.2.1/include -I/usr/local/include/libdrm -D_THREAD_SAFE -pthread -fno-omit-frame-pointer -isystem /usr/local/include -I/usr/local/include -I/usr/local/include -D_THREAD_SAFE -pthread -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -MT gdkdisplay-x11.lo -MD -MP -MF .deps/gdkdisplay-x11.Tpo -c gdkdisplay-x11.c  -fPIC -DPIC -o .libs/gdkdisplay-x11.o
In file included from gdkdisplay-x11.c:40:
./gdkglcontext-x11.h:28:10: fatal error: 'epoxy/glx.h' file not found
#include <epoxy/glx.h>
         ^~~~~~~~~~~~~
1 error generated.
gmake[5]: *** [Makefile:741: gdkdisplay-x11.lo] Error 1
gmake[5]: Leaving directory '/wrkdirs/usr/ports/x11-toolkits/gtk30/work/gtk+-3.24.20/gdk/x11'
gmake[4]: *** [Makefile:1713: all-recursive] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/x11-toolkits/gtk30/work/gtk+-3.24.20/gdk'
gmake[3]: *** [Makefile:1136: all] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/x11-toolkits/gtk30/work/gtk+-3.24.20/gdk'
gmake[2]: *** [Makefile:748: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/x11-toolkits/gtk30/work/gtk+-3.24.20'
gmake[1]: *** [Makefile:621: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/x11-toolkits/gtk30/work/gtk+-3.24.20'
*** Error code 1

Stop.
make: stopped in /usr/ports/x11-toolkits/gtk30
=>> Cleaning up wrkdir
===>  Cleaning for gtk3-3.24.20
build of x11-toolkits/gtk30 | gtk3-3.24.20 ended at Tue Jun 23 16:31:28 CEST 2020
build time: 00:01:22
!!! build failure encountered !!!
Comment 1 Jan Beich freebsd_committer 2020-06-24 12:05:10 UTC
> by emulators/qemu

Are you building headless (only CLI and curses)? If so disable GTK3 option in qemu instead.

devel/sdl20 can be used on Wayland-only systems but emulators/qemu gates SDL output on X11 for some reason.

>     COLORD=on: Color profile support

graphics/colord needs to make --enable-argyllcms-sensor optional because 
graphics/argyllcms unconditionally depends on X11.

>     ATK_BRIDGE=on: AT-SPI ATK bridge support (requires X11)
>     X11=on: GDK X11 backend

Here's your answer. X11 cannot be disabled without ATK_BRIDGE. It's a known limitation of _IMPLIES.

Try adding the following to /etc/make.conf:

  graphics_cairo_UNSET += XCB
  x11-toolkits_gtk30_UNSET += ATK_BRIDGE COLORD
Comment 2 Massimo Lusetti 2020-07-31 14:09:08 UTC
The same error happen with other ports like Chromium built without X11 in and headless environment.

Jan Beich do you think the same solution could be applied in this scenario?

Thanks