/usr/ports/lang/mono6.8 install error | checking for GL/gl.h... no | cairo's OpenGL surface backend feature could be enabled... no (gl.pc nor OpenGL headers not found)

From: Dipl.-Ing. Harald E. Langner <development_at_langner.net>
Date: Sat, 12 Jun 2021 21:49:28 UTC
Hello,
I try to install "/usr/ports/lang/mono6.8" Until build I got it to work,
but installation fails.

I'm running a rent remote virtual server without desktop / windows only
with terminal connection FreeBSD svman.de 13.0-RELEASE FreeBSD
13.0-RELEASE #0
releng/13.0-ea31abc26: Sun May 16 14:57:18 CEST 2021     
mailto:root@:----/usr/obj/usr/src/amd64.amd64/sys/VSERVER_KERNEL  amd64

I install all server software with the ports, because mixed packages and
ports gives big problems.

I like to try to build a ASP.NET Website with mod_mono and Apache24. So I
need mono.

*I like to remark*: The latest Stable Mono release is: 6.12.0 Stable
(6.12.0.122) not 6.8. In the ports are a 4 versions older version?!
https://www.mono-project.com/download/stable/#download-lin 

in /etc/make.conf 
	BUILD_OPTIMIZED=YES
	# BUILD_STATIC is set to build static versions of the binaries.
It's used for even better speed.
	BUILD_STATIC=YES
	WITHOUT_DEBUG=YES
	WITHOUT=X11
	OPTIONS_UNSET+=X11 		#to set it globally,
	#WITHOUT="X"
	OPTIONS_UNSET+=X
	X11BASE=${LOCALBASE}

To build this port I had to change the "Makefile" because of an error:
	#HL CONFLICTS_BUILD=	brotli
	CONFLICTS_BUILD=        
because "brotli" is needed by Apache24. Deinstall brotli require to
deinstall Apache and PHP!
But on the FreeBSD Bugs website I found a solution via Google search:
	#error: unknown type name 'BROTLI_INTERNAL'
	#https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238089
	#  niqck 2020-03-04
	#  Added USE_GCC=any to the port Makefile and now it builds on
FreeBSD 12.1
	#HL USE_GCC=any
	USE_GCC=any
With this I was able to build the port mono6.8.

In "/usr/ports/lang/mono6.8" I did:

$make fetch-recursive
-->second problem:
error: 2 files could not fetched.	I searched and fetched them via
Internet and send them via FTP to
      	/usr/ports/distfiles/wayland-protocols-1.21.tar.xz
	/usr/ports/distfiles/gnome3/yelp-xsl-40.0.tar.xz
after that
$make fetch-recursive
is OK, then
$make extract
is OK, then
$make patch
is OK, then
$script build.log make build
after long time, OK, then

$script install.log make install
error: see downstairs

I attach build.log, install.log
and the config.log of cairo as required
     in last, on line 3598:
	.....
	configure:27314: checking GL/gl.h usability
	configure:27314: clang -c -O2 -pipe -march=native
-fstack-protector-strong -fno-strict-aliasing   conftest.c >&5
	conftest.c:126:10: fatal error: 'GL/gl.h' file not found
	#include <GL/gl.h>
	         ^~~~~~~~~
	1 error generated.
	configure:27314: $? = 1
	configure: failed program was:
	| /* confdefs.h */
	.......
Also, in /usr/ports/graphics/cairo/work/cairo-1.17.4/ is no folder "GL/"
or I cannot find it
Before all of this, I had make a fresh update of the ports with §portsnap
fetch update

This are the config settings of the cairo port:

[/usr/ports/graphics/cairo] => make showconfig-recursive ===> 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

This are the config settings of the mono6.8 port:

[/usr/ports/lang/mono6.8] => make showconfig-recursive ===> The following
configuration options are available for
mono6.8-6.8.0.123:
     BIGARRAY=off: Enable allocating arrays greater than Int32.MaxValue
     MONODEV=off: Build for Mono development (disables crash privacy)
     MONOLITE=on: Use monolite to bootstrap mcs (otherwise use installed
mcs)
     NINJA=off: Use ninja to build wherever possible
     NLS=on: NLS Localization Support
     ODBC=off: System.Data: support for unixODBC
     SPECTRE=off: Enable internal Mono Spectre mitigations (SEE pkg-descr)
     X11=off: X11 (graphics) support

Both without X11 (graphics) support, because I cannot, and do not like to,
use a desktop on the remote server.


*** Please, what can I do now, to go further? *** Please tell me if you
have fixed the problem of the missing files and I could fetch a new update
for the ports.
Please give me anyway an answer - thank you!

with best regards
Harald  E. Langner    

__________________________________________________________________________
_______
Harald Eberhard Langner
Address:
20, Auf der Beun
65 933  Frankfurt am Main; HE
EU (Germany)


--------------------------------------------------------------------------
----------------------------------------------------------------------
	Error in install.log with $make install
--------------------------------------------------------------------------
----------------------------------------------------------------------
===> Fetching all distfiles required by zstd-1.5.0 for building
===>  License GPLv3 accepted by the user
checking for gl... no
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking whether cairo's OpenGL surface backend feature could be
enabled... no (gl.pc nor OpenGL headers not found)
configure: error:  OpenGL surface backend feature could not be enabled
===>  Script "configure" failed unexpectedly.
Please report the problem to [maintainer] and attach the
"/usr/ports/graphics/cairo/work/cairo-1.17.4/config.log" including the
output
of the failure of your make command. Also, it might be a good idea to
provide
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[10]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[9]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[8]: stopped in /usr/ports/devel/gobject-introspection
*** Error code 1

Stop.
make[7]: stopped in /usr/ports/print/harfbuzz
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/print/harfbuzz
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/print/libraqm
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/print/libraqm
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/py-pillow
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/graphics/py-pillow
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/mono6.8
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/mono6.8

Script done, output file is install.log
[svman.de /usr/ports/lang/mono6.8] =>