[Bug 256180] graphics/cairo buid failed: error: unknown type name 'GLXContext'

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 27 May 2021 04:34:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256180

            Bug ID: 256180
           Summary: graphics/cairo buid failed: error: unknown type name
                    'GLXContext'
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: desktop@FreeBSD.org
          Reporter: shrdlu19@gmail.com
          Assignee: desktop@FreeBSD.org
             Flags: maintainer-feedback?(desktop@FreeBSD.org)

After of 2021-05-26, the graphics/cairo port on my poudriere server failed to
build with following error. 
We check these situation at another poudriere server, and get the same error.
Full log in attachment

=>> Building graphics/cairo
build started at Wed May 26 21:31:43 +04 2021
port directory: /usr/ports/graphics/cairo
package name: cairo-1.17.4,3
building for: FreeBSD FreeBSD:12:amd64-default-daily-job-01 12.2-RELEASE-p6
FreeBSD 12.2-RELEASE-p6 amd64
maintained by: desktop@FreeBSD.org
Makefile ident: 
Poudriere version: 3.3.6
Host OSVERSION: 1202000
Jail OSVERSION: 1202000
Job Id: 01

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1202000
UNAME_v=FreeBSD 12.2-RELEASE-p6
UNAME_r=12.2-RELEASE-p6
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.6
MASTERMNT=/poudriere/data/.m/FreeBSD_12_amd64-default-daily/ref
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=
GID=0
UID=0
PWD=/poudriere/data/.m/FreeBSD_12_amd64-default-daily/ref/.p/pool
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=FreeBSD:12:amd64-default-daily
SCRIPTPREFIX=/usr/local/share/poudriere
OLDPWD=/poudriere/data/.m/FreeBSD_12_amd64-default-daily/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 cairo-1.17.4,3:
     DOCS=on: Build and/or install documentation
     GLIB=on: Enable GObject Functions Feature
     X11=off: X11 (graphics) support
     XCB=on: Enable XCB (X C-language Binding) Support
====> Options available for the radio GL: you can only select none or one of
them
     OPENGL=on: 2D/3D rendering support via OpenGL
     GLESV2=off: Enable GLESv2 rendering
===> Use 'make config' to modify these settings
---End OPTIONS List---

--MAINTAINER--
desktop@FreeBSD.org
--End MAINTAINER--

--CONFIGURE_ARGS--
--with-html-dir=/usr/local/share/doc/cairo  --disable-directfb 
--disable-gallium  --disable-wgl  --enable-tee --disable-glesv2
--enable-gobject --enable-gl --enable-egl --disable-xlib --disable-glx
--enable-xcb --x-libraries=/usr/local/lib --x-includes=/usr/local/include
--prefix=/usr/local ${_LATE_CONFIGURE_ARGS}
--End CONFIGURE_ARGS--

--CONFIGURE_ENV--
PKG_CONFIG=pkgconf XDG_DATA_HOME=/wrkdirs/usr/ports/graphics/cairo/work 
XDG_CONFIG_HOME=/wrkdirs/usr/ports/graphics/cairo/work 
HOME=/wrkdirs/usr/ports/graphics/cairo/work TMPDIR="/tmp"
PATH=/wrkdirs/usr/ports/graphics/cairo/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
SHELL=/bin/sh CONFIG_SHELL=/bin/sh LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
CONFIG_SITE=/usr/ports/Templates/config.site lt_cv_sys_max_cmd_len=524288
--End CONFIGURE_ENV--

--MAKE_ENV--
XDG_DATA_HOME=/wrkdirs/usr/ports/graphics/cairo/work 
XDG_CONFIG_HOME=/wrkdirs/usr/ports/graphics/cairo/work 
HOME=/wrkdirs/usr/ports/graphics/cairo/work TMPDIR="/tmp"
PATH=/wrkdirs/usr/ports/graphics/cairo/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 -fno-strict-aliasing " 
CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++"
CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  " 
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--
LIBVER=2.11704.0 PORTDOCS="" AMD64="" NO_AMD64="@comment " DOCS=""
NO_DOCS="@comment " GLESV2="@comment " NO_GLESV2="" GLIB="" NO_GLIB="@comment "
OPENGL="" NO_OPENGL="@comment " X11="@comment " NO_X11="" XCB=""
NO_XCB="@comment " GTK2_VERSION="2.10.0"  GTK3_VERSION="3.0.0" OSREL=12.2
PREFIX=%D LOCALBASE=/usr/local  RESETPREFIX=/usr/local LIB32DIR=lib
DOCSDIR="share/doc/cairo"  EXAMPLESDIR="share/examples/cairo" 
DATADIR="share/cairo"  WWWDIR="www/cairo"  ETCDIR="etc/cairo"
--End PLIST_SUB--

--SUB_LIST--
 AMD64="" NO_AMD64="@comment " DOCS="" NO_DOCS="@comment " GLESV2="@comment "
NO_GLESV2="" GLIB="" NO_GLIB="@comment " OPENGL="" NO_OPENGL="@comment "
X11="@comment " NO_X11="" XCB="" NO_XCB="@comment " PREFIX=/usr/local
LOCALBASE=/usr/local  DATADIR=/usr/local/share/cairo
DOCSDIR=/usr/local/share/doc/cairo EXAMPLESDIR=/usr/local/share/examples/cairo 
WWWDIR=/usr/local/www/cairo ETCDIR=/usr/local/etc/cairo
--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/FreeBSD:12:amd64-default-make.conf ####
DEFAULT_VERSIONS+= php=7.4
DEFAULT_VERSIONS+= pgsql=12
DEFAULT_VERSIONS+= samba=4.12
DEFAULT_VERSIONS+= python=3.7 python2=2.7 python3=3.7
OPTIONS_UNSET+=    X11 GUI CUPS FONTCONFIG MYSQL WAYLAND
OPTIONS_SET+=      ICONV NLS IDN
LICENSES_ACCEPTED+= PDFlib

#### /usr/ports/Mk/Scripts/ports_env.sh ####
_CCVERSION_921dbbb2=FreeBSD clang version 10.0.1
(git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2) Target:
x86_64-unknown-freebsd12.2 Thread model: posix InstalledDir: /usr/bin
_ALTCCVERSION_921dbbb2=none
_CXXINTERNAL_acaad9ca=FreeBSD clang version 10.0.1
(git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2) Target:
x86_64-unknown-freebsd12.2 Thread model: posix InstalledDir: /usr/bin
"/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1"
"--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o"
"/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm"
"-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed"
"-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o"
CC_OUTPUT_921dbbb2_58173849=yes
CC_OUTPUT_921dbbb2_9bdba57c=yes
CC_OUTPUT_921dbbb2_6a4fe7f5=yes
CC_OUTPUT_921dbbb2_6bcac02b=yes
CC_OUTPUT_921dbbb2_67d20829=yes
CC_OUTPUT_921dbbb2_bfa62e83=yes
CC_OUTPUT_921dbbb2_f0b4d593=yes
CC_OUTPUT_921dbbb2_308abb44=yes
CC_OUTPUT_921dbbb2_f00456e5=yes
CC_OUTPUT_921dbbb2_65ad290d=yes
CC_OUTPUT_921dbbb2_f2776b26=yes
CC_OUTPUT_921dbbb2_b2657cc3=yes
CC_OUTPUT_921dbbb2_380987f7=yes
CC_OUTPUT_921dbbb2_160933ec=yes
CC_OUTPUT_921dbbb2_fb62803b=yes
_OBJC_CCVERSION_921dbbb2=FreeBSD clang version 10.0.1
(git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2) Target:
x86_64-unknown-freebsd12.2 Thread model: posix InstalledDir: /usr/bin
_OBJC_ALTCCVERSION_921dbbb2=none
ARCH=amd64
OPSYS=FreeBSD
_OSRELEASE=12.2-RELEASE-p6
OSREL=12.2
OSVERSION=1202000
PYTHONBASE=/usr/local
HAVE_COMPAT_IA32_KERN=YES
_SMP_CPUS=2
CONFIGURE_MAX_CMD_LEN=524288
HAVE_PORTS_ENV=1
#### Misc Poudriere ####
DISABLE_MAKE_JOBS=poudriere
---End make.conf---

...

cc -DHAVE_CONFIG_H -I. -I..  -I.                                 -I./pdiff     
                 -I../boilerplate                -I../util/cairo-missing       
 -I../util/cairo-script  -I../src                        -I../src              
         -D_REENTRANT      -I/usr/local/include/pixman-1    
-I/usr/local/include -I/usr/local/include/freetype2 
-I/usr/local/include/freetype2   -I/usr/local/include -D_THREAD_SAFE -pthread
-I/usr/local/include/libdrm  -I/usr/local/include -D_THREAD_SAFE -pthread
-I/usr/local/include/libdrm  -I/usr/local/include/libpng16 
-I/usr/local/include -pthread  -I/usr/local/include -pthread    -Wall -Wextra
-Wmissing-declarations -Werror-implicit-function-declaration -Wpointer-arith
-Wwrite-strings -Wsign-compare -Wpacked -Wswitch-enum
-Wmissing-format-attribute -Wvolatile-register-var -Wstrict-aliasing=2
-Winit-self -Wno-missing-field-initializers -Wno-unused-parameter
-Wno-attributes -Wno-long-long -Winline -fno-strict-aliasing -fno-common
-Wp,-D_FORTIFY_SOURCE=2   -D_REENTRANT -O2 -pipe  -fstack-protector-strong
-fno-strict-aliasing -MT cairo_test_suite-gl-device-release.o -MD -MP -MF
.deps/cairo_test_suite-gl-device-release.Tpo -c -o
cairo_test_suite-gl-device-release.o `test -f 'gl-device-release.c' || echo
'./'`gl-device-release.c
gl-device-release.c:35:7: error: unknown type name 'GLXContext'
                    GLXContext glx_context,
                    ^
gl-device-release.c:63:30: error: implicit declaration of function
'glXQueryExtensionsString' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
    const char *extensions = glXQueryExtensionsString (display,
                             ^
gl-device-release.c:63:17: warning: incompatible integer to pointer conversion
initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
    const char *extensions = glXQueryExtensionsString (display,
                ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gl-device-release.c:80:2: error: use of undeclared identifier 'GLX_RGBA'
        GLX_RGBA,
        ^
gl-device-release.c:81:2: error: use of undeclared identifier 'GLX_RED_SIZE'
        GLX_RED_SIZE, 1,
        ^
gl-device-release.c:82:2: error: use of undeclared identifier 'GLX_GREEN_SIZE'
        GLX_GREEN_SIZE, 1,
        ^
gl-device-release.c:83:2: error: use of undeclared identifier 'GLX_BLUE_SIZE'
        GLX_BLUE_SIZE, 1,
        ^
gl-device-release.c:84:2: error: use of undeclared identifier 'GLX_ALPHA_SIZE'
        GLX_ALPHA_SIZE, 1,
        ^
gl-device-release.c:85:2: error: use of undeclared identifier
'GLX_DOUBLEBUFFER'
        GLX_DOUBLEBUFFER,
        ^
gl-device-release.c:90:15: error: expected ';' after expression
    GLXContext glx_context;
              ^
              ;
gl-device-release.c:90:5: error: use of undeclared identifier 'GLXContext'
    GLXContext glx_context;
    ^
gl-device-release.c:90:16: error: use of undeclared identifier 'glx_context'
    GLXContext glx_context;
               ^
gl-device-release.c:101:19: error: implicit declaration of function
'glXChooseVisual' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    visual_info = glXChooseVisual (display, DefaultScreen (display),
rgba_attribs);
                  ^
gl-device-release.c:101:17: warning: incompatible integer to pointer conversion
assigning to 'XVisualInfo *' from 'int' [-Wint-conversion]
    visual_info = glXChooseVisual (display, DefaultScreen (display),
rgba_attribs);
                ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gl-device-release.c:107:5: error: use of undeclared identifier 'glx_context'
    glx_context = glXCreateContext (display, visual_info, NULL, True);
    ^
gl-device-release.c:107:19: error: implicit declaration of function
'glXCreateContext' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    glx_context = glXCreateContext (display, visual_info, NULL, True);
                  ^
gl-device-release.c:107:19: note: did you mean 'eglCreateContext'?
/usr/local/include/EGL/egl.h:152:31: note: 'eglCreateContext' declared here
EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig
config, EGLContext share_context, const EGLint *attrib_list);
                              ^
gl-device-release.c:108:9: error: use of undeclared identifier 'glx_context'
    if (glx_context == NULL) {
        ^
gl-device-release.c:113:48: error: use of undeclared identifier 'glx_context'
    test_window = create_test_window (display, glx_context, visual_info);
                                               ^
gl-device-release.c:122:5: error: implicit declaration of function
'glXMakeCurrent' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    glXMakeCurrent (display, None, None);
    ^
gl-device-release.c:122:5: note: did you mean 'eglMakeCurrent'?
/usr/local/include/EGL/egl.h:166:31: note: 'eglMakeCurrent' declared here
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw,
EGLSurface read, EGLContext ctx);
                              ^
gl-device-release.c:126:14: error: implicit declaration of function
'cairo_glx_device_create' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
    device = cairo_glx_device_create (display, glx_context);
             ^
gl-device-release.c:126:14: note: did you mean 'cairo_egl_device_create'?
../src/cairo-gl.h:133:1: note: 'cairo_egl_device_create' declared here
cairo_egl_device_create (EGLDisplay dpy, EGLContext egl);
^
gl-device-release.c:126:48: error: use of undeclared identifier 'glx_context'
    device = cairo_glx_device_create (display, glx_context);
                                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
*** Error code 1

Stop.
make[5]: stopped in /wrkdirs/usr/ports/graphics/cairo/work/cairo-1.17.4/test
*** Error code 1
*** Error code 1
*** Error code 1
*** Error code 1
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/cairo
=>> Cleaning up wrkdir
===>  Cleaning for cairo-1.17.4,3
build of graphics/cairo | cairo-1.17.4,3 ended at Wed May 26 21:36:41 +04 2021
build time: 00:04:58
!!! build failure encountered !!!

-- 
You are receiving this mail because:
You are the assignee for the bug.