Giter VIP home page Giter VIP logo

glmark2's Introduction

glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.

glmark2 is developed by Alexandros Frantzis and Jesse Barker based on the
original glmark benchmark by Ben Smith.

It is licensed under the GPLv3 (see COPYING).

To build glmark2 you need:

 * meson (>= 0.47) or python3 (if you are using WAF for building)
 * libpng 1.6
 * Window system development files for the flavors you want to build
   (e.g, X11, Wayland, drm)
 * libGL (for desktop GL)
 * libEGL and libGLESv2 (for GLESv2)

Read the INSTALL file for building/installation instructions,

Read the INSTALL.android file for instructions for Android.

glmark2's People

Contributors

afrantzis avatar agners avatar anholt avatar baryluk avatar benjamingaignard avatar cnorthrop avatar djkurtz avatar dong-ja avatar fjhenigman avatar fooishbar avatar gnurou avatar jessebarker avatar jserv avatar lucmann avatar lynxeye-dev avatar marv avatar mikecrowe avatar miouyouyou avatar mmind avatar nicolashuet02 avatar null77 avatar ofourdan avatar paolo-caroni avatar pkasting avatar prlw1 avatar rafalmiel avatar superna9999 avatar thac0 avatar titolini72 avatar vapier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glmark2's Issues

Invalid glmark2 GLES shader code + segfault after shader compilation fail

Ubuntu version of glmark2-es2 has invalid shader code. With GLES, glmark2 uses different default precision for vertex and fragment shaders, but some of the glmark2 tests use common uniforms in multiple stages without explicitly specifying their precision, so they don't match.

However, any uniforms that are declared (even if they are not used) must have matching precision on all shader stages. See "4.3.5 Uniform Variables" in:
https://www.khronos.org/registry/gles/specs/3.1/GLSL_ES_Specification_3.10.pdf

"Uniforms in the vertex and fragment shaders share a single global name space. Hence, the types, precisions and any location specifiers of all declared uniform variables with the same name must match across shaders that are linked into a single program."

While glmark2-es2 requests GLES v2 context and v2 spec doesn't explicitly state this requirement like later spec versions do, mismatching precision is a clear bug.

This bug is with uniforms declared in shaders used in following tests:

  • ideas ("modelview" uniform declared also in FS but not used)
  • jellyfish ("uCurrentTime" uniform used both in VS & FS)
  • terrain ("viewMatrix" uniform declared also in FS but not used)

In case of ideas & terrain, it's enough just to remove the unused uniform declaration, in jellyfish test the correct precision needs to be used/specified in both shader stages.

PS. Mesa gives GLES 3.x context when v2 is requested and Mesa git version will enforce this check, as it's required by Khronos conformance tests.

  • With terrain test Glmark2 segfaults after shader compilation fails, with the other two tests it checks whether shader compilation succeeds and gracefully exits when it didn't.

More info: https://bugs.freedesktop.org/show_bug.cgi?id=97532

badAttribVec : EGL_NATIVE_VISUAL_TYPE

Hi,
Perhaps you can assist with this error :

Failed to get the following config attributes for config EGL_NATIVE_VISUAL_TYPE

what is the severity of the error ?

Thanks,
EM

Failed to find a suitable DRM device

I am trying to run glmark2-es2-drm on Ubuntu 18 but I am getting the Failed to find a suitable DRM device. Per comment: here:

* If your driver defines a /dev/dri/cardX node and open_using_udev_scan

I am filing an issue.

Information:

$ uname -a
Linux 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

From man page:
glmark2-es2-drm 2014.03+git2015061March12014 (Perhaps my copy of glmark2-es2-drm is too old?)

Running glmark2 (non-EGL/ES2) is ok.

Info: =======================================================
Info:     glmark2 2014.03+git20150611.fa71af2d
Info: =======================================================
Info:     OpenGL Information
Info:     GL_VENDOR:     X.Org
Info:     GL_RENDERER:   AMD Radeon (TM) Pro WX Series (POLARIS11, DRM 3.26.0, 4.18.0-15-generic, LLVM 7.0.0)
Info:     GL_VERSION:    4.5 (Compatibility Profile) Mesa 18.3.3
Info: =======================================================
$ DRI_PRIME=1 glmark2-es2-drm -d
Debug: Failed to open DRM module 'i915'
Debug: Failed to open DRM module 'nouveau'
Debug: Failed to open DRM module 'radeon'
Debug: Failed to open DRM module 'vmgfx'
Debug: Failed to open DRM module 'omapdrm'
Debug: Failed to open DRM module 'exynos'
Error: Failed to find a suitable DRM device
Error: main: Could not initialize canvas

configure fails with Python 3.7

With Python 3.7 python3 ./waf configure --with-flavors=wayland-gl fails with:

[...]
  File "/path/to/glmark2/waflib/Node.py", line 346, in <listcomp>
    ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))]
RuntimeError: generator raised StopIteration

See https://github.com/waf-project/waf/pull/2126

I suspect that updating waf to the latest version will fix this.

Is it possible to run glmark2 without xorg

Hi. I'm trying to run glmark2 with OpenGL ES2 on my i.mx6 (and Ubuntu 18.04-armhf) without xorg but I have got exception:

# glmark2-es2
Error: main: Could not initialize canvas

What I'm doing wrong?
Any ideas?

Thanks!

Glad library problem in ndk-build for Android

[arm64-v8a] Compile++ : glmark2-android <= android.cpp
In file included from jni/src/android.cpp:29:
In file included from jni/src/canvas-android.h:25:
In file included from jni/src/canvas.h:28:
jni/src/gl-headers.h:33:10: fatal error: 'glad/gles2.h' file not found
**
But file is already in jni/src/glad/include/glad/

cross compile, could not determine the compiler type

hi

recently, i used the glmark2 (ver: glmark2-2014-03) source code to cross compile for my TI platform system on GPU evaluation, i followed the steps on doc INSTALL under top directory /glmark2, i have added my CROSS-COMPILER path to the environment variable $PATH, the prompts on my host terminal here :
<<
ubuntu@desktop:~/ti/glmark2/glmark2$ ./waf configure --with-flavors=drm-glesv2 --data-path=/home/ubuntu/ti/glmark2/glmark2/data
Setting top to : /home/ubuntu/ti/glmark2/glmark2
Setting out to : /home/ubuntu/ti/glmark2/glmark2/build
Checking for 'gcc' (c compiler) : not found
Checking for 'icc' (c compiler) : not found
could not configure a c compiler!
(complete log in /home/ubuntu/ti/glmark2/glmark2/build/config.log)

error message gcc compiler can't be found, while i opened the /glmark2/build/config.log:

....
Checking for 'gcc' (c compiler)
find program=['gcc', 'cc'] paths=['/home/ubuntu/ti/ti-glsdk_dra7xx-evm_7_04_00_03/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/bin', '/usr/lib/lightdm/lightdm', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games'] var='CC' -> '/home/ubuntu/ti/ti-glsdk_dra7xx-evm_7_04_00_03/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/bin/gcc'
from /home/ubuntu/ti/glmark2/glmark2: Could not determine the compiler type
not found

.....

it seems the waf tool can recognize the CROSS-COMPILER for my TI platform, it is tool chains gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux;
anybody meet this, plz give me some hint, very appreciate the help.

BR
lianghua

Change Test Resolution

I don't much care about my score.
I am more interested in how the test perform at high resolutions, say 3840x2160 or even 1920x1080.

Getting 4xxx FPS on tests at what 800x600 doesn't tell me anything.

glmark2-es2-drm execute failed with latest version

Failed to execute glmark2-es2-drm with latest commit eaa7088

Configuration & build:

./waf configure --with-flavors=drm-glesv2 --data-path=$(pwd)/data
./waf

Error message:

root@Khadas:~/glmark2# ./build/src/glmark2-es2-drm -d
Debug: Using Udev to detect the right DRM node to use
Debug: Looking for the main GPU DRM node...
Debug: Not found!
Debug: Looking for a concrete GPU DRM node...
Debug: Success!
Debug: Trying to use the DRM node /dev/dri/card0
Debug: Success!
Error: Loading EGL entry points failed
Debug: Using eglGetPlatformDisplayEXT()
Segmentation fault

But when I reset to commit 71b3274

It works.

build failed with current commit

I failed to build with current commit a7bd008

ARCH: aarch64
OS: linux 4.4

Config: ./waf configure --with-flavors=drm-glesv2 --data-path=$(pwd)/data

Error log:

Waf: Entering directory `/root/glmark2/build'
[ 1/70] Compiling src/main.cpp
[ 2/70] Compiling src/canvas-generic.cpp
[ 3/70] Compiling src/native-state-drm.cpp
[ 4/70] Compiling src/gl-state-egl.cpp
[ 5/70] Compiling src/glad/src/egl.c
[ 6/70] Compiling src/glad/src/gles2.c
In file included from ../src/glad/include/glad/egl.h:322:0,
                 from ../src/glad/src/egl.c:4:
../src/glad/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory
 #include <X11/Xlib.h>
          ^~~~~~~~~~~~
compilation terminated.

[ 7/70] Compiling src/libmatrix/log.cc
[ 8/70] Compiling src/libmatrix/mat.cc
[ 9/70] Compiling src/libmatrix/program.cc
[10/70] Compiling src/libmatrix/shader-source.cc
[11/70] Compiling src/libmatrix/util.cc
[12/70] Compiling src/benchmark-collection.cpp
[13/70] Compiling src/benchmark.cpp
[14/70] Compiling src/gl-headers.cpp
[15/70] Compiling src/gl-visual-config.cpp
[16/70] Compiling src/image-reader.cpp
[17/70] Compiling src/main-loop.cpp
[18/70] Compiling src/mesh.cpp
[19/70] Compiling src/model.cpp
[20/70] Compiling src/options.cpp
[21/70] Compiling src/scene-buffer.cpp
[22/70] Compiling src/scene-build.cpp
[23/70] Compiling src/scene-bump.cpp
[24/70] Compiling src/scene-clear.cpp
[25/70] Compiling src/scene-conditionals.cpp
[26/70] Compiling src/scene-default-options.cpp
[27/70] Compiling src/scene-desktop.cpp
[28/70] Compiling src/scene-effect-2d.cpp
[29/70] Compiling src/scene-function.cpp
[30/70] Compiling src/scene-grid.cpp
[31/70] Compiling src/scene-ideas/a.cc
[32/70] Compiling src/scene-ideas/d.cc
[33/70] Compiling src/scene-ideas/e.cc
[34/70] Compiling src/scene-ideas/i.cc
[35/70] Compiling src/scene-ideas/lamp.cc
Waf: Leaving directory `/root/glmark2/build'
Build failed
 -> task in 'glad-egl' failed (exit status 1): 
        {task 547490661552: c egl.c -> egl.c.2.o}
['/usr/bin/gcc', '-Isrc/glad/include', '-I../src/glad/include', '-DHAVE_STDLIB_H=1', '-DHAVE_STRING_H=1', '-DHAVE_UNISTD_H=1', '-DHAVE_STDINT_H=1', '-DHAVE_STDIO_H=1', '-DHAVE_JPEGLIB_H=1', '-DHAVE_MEMSET=1', '-DHAVE_SQRT=1', '-DHAVE_LIBPNG=1', '-DHAVE_DRM=1', '-DHAVE_GBM=1', '-DHAVE_UDEV=1', '-DHAVE_WAYLAND_EGL=1', '-DGLMARK_DATA_PATH="/root/glmark2/data"', '-DGLMARK_VERSION="2017.07"', '../src/glad/src/egl.c', '-c', '-o/root/glmark2/build/src/glad/src/egl.c.2.o']

But when I revet to commit 40409f3

Build successfully and works well.

glmark2 produces Segmentation fault in GPU PC

Hi, I used it to benchmark GPU performance, but glmark2 report Segmentation fault error.

Firstly, I has succeeded install glmark2 in my PC(Gnome environment, CentOS 7) using git source. And glmark2 runs ok.

$ git clone https://github.com/glmark2/glmark2.git

$  INSTALL_APP ="epel-release centos-release-scl hwdata libX11 libX11-common libXau libXdamage libudev-devel \
libXext libXfixes libXxf86vm libdrm libjpeg-turbo libpciaccess libpng12 libxcb libxshmfence mesa-libEGL \
mesa-libGL mesa-libGLES mesa-libgbm mesa-libglapi libXmu-devel libXi-devel libGL-devel libjpeg-turbo-devel \
libpng12-devel mesa-libEGL-devel mesa-libGLES mesa-libgbm-devel mesa-libGLES-devel mesa-dri-drivers \
devtoolset-4-toolchain"

$  flag=1; for pkg in $INSTALL_APP; do echo "INFO: installing $flag package $pkg ..."; yum install -y "$pkg" &> /dev/null || echo -e "\tERROR: cannot install $pkg ...."; flag=$((flag+1)); done
$ PATH="/opt/rh/devtoolset-4/root/bin:$PATH"
$  ./waf configure --with-flavors="drm-gl,drm-glesv2,x11-gl,x11-glesv2"
$ ./waf  -v
$ ./waf install

$ glmark2
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) Haswell Mobile 
    GL_VERSION:    3.0 Mesa 17.0.1
=======================================================
[build] use-vbo=false: FPS: 2567 FrameTime: 0.390 ms
=======================================================
                                  glmark2 Score: 2567 
=======================================================

Second, I have used Docker to run it using X11 forwarding in my PC yet(since I want to imitate remote server environment), Docker also run ok generally. That's, glmark2 can produce results.

# build a X11 forwarding Docker environment
FROM centos:7.4.1708
RUN yum install -y epel-release && yum install -y openssh-server xorg-x11-xauth dbus libcanberra-gtk3 PackageKit-gtk3-module wqy-zenhei-fonts \
    && dbus-uuidgen > /var/lib/dbus/machine-id && echo -e "rootroot\nrootroot" | passwd --stdin root
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' && sed -i "/#X11UseLocalhost/c X11UseLocalhost no" /etc/ssh/sshd_config
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

Therefore, I am ready for benchmark GPU in remote server using X11 forwarding(CentOS 7), but when I compiled glmark2, I got error called Segmentation fault. When I google it a little time, I guess GPU driver generate Segmentation error.

# remote GPU server info
$ cat /proc/driver/nvidia/gpus/0000\:82\:00.0/information 
Model: 		 GeForce GTX 1080
IRQ:   		 128
GPU UUID: 	 GPU-00d8721e-60c5-e327-e6d4-9f3b17e0aec0
Video BIOS: 	 86.04.17.00.66
Bus Type: 	 PCIe
DMA Size: 	 47 bits
DMA Mask: 	 0x7fffffffffff
Bus Location: 	 0000:82:00.0
Device Minor: 	 0


$ nvidia-smi
... ...
| NVIDIA-SMI 390.12                 Driver Version: 390.12                    |

# GPU related driver by cuda Toolkit installed
$ yum install -y cuda-8.0

I use LD_DEBUG to debug, see https://pastebin.ubuntu.com/p/kb7z7FXRjB/ . But I don't fully understand it or my guess whether correct or not , any help is appreciate ! Thanks.

Build issues on recent Android

To build glmark2 on recent Android (8.1.0 on arm64 here) I suggest to copy the glmark2 directory to mydroid/external/glmark2. Then do the following changes:

  1. android/jni/Application.mk:
    APP_STL := c++_static
    like described in issue #30.

  2. android/Android.mk:
    LOCAL_PROGUARD_ENABLED := disabled
    to disable ProGuard. I was not able to convince ProGuard to not optimize away the native done() method.

  3. android/jni/Android.mk
    remove all occurrences to libstlport because that's not needed (with the selected APP_STL).

  4. android/jni/Android.mk
    remove the libjpeg-turbo stuff because that library is part of Android (AFAICS including NEON instructions) and change libglmark2-jpeg to libjpeg.

As described in INSTALL.android, do "make GLMark2" to create the .apk.

optirun crashing after "GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!"

It won't work for running with discrete GPU.
This is the output when I run vblank_mode=0 optirun -vv glmark2 -d:

[ 4673.053869] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 4673.054247] [INFO]Configured driver: nvidia
[ 4673.054696] [DEBUG]optirun version 3.2.1-2017-02-27-Format:%h$ starting...
[ 4673.054732] [DEBUG]Active configuration:
[ 4673.054741] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4673.054750] [DEBUG] X display: :8
[ 4673.054759] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[ 4673.054767] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4673.054780] [DEBUG] Accel/display bridge: auto
[ 4673.054799] [DEBUG] VGL Compression: proxy
[ 4673.054810] [DEBUG] VGLrun extra options: 
[ 4673.054822] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[ 4673.054927] [DEBUG]Using auto-detected bridge primus
[ 4674.757892] [INFO]Response: Yes. X is active.

[ 4674.757906] [INFO]Running application using primus.
[ 4674.758022] [DEBUG]Process glmark2 started, PID 8944.
Debug: Found 20 matching FB configs.
Debug: GLX chosen config ID: 0xaf Native Visual ID: 0x20
Debug:   Buffer: 32 bits
Debug:      Red: 8 bits
Debug:    Green: 8 bits
Debug:     Blue: 8 bits
Debug:    Alpha: 8 bits
Debug:    Depth: 24 bits
Debug:  Stencil: 0 bits
Debug: Creating XWindow W: 800 H: 600 VisualID: 0x20
Info: ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
Info: ** Failed to set swap interval. Results may be bounded above by refresh rate.
Info: =======================================================
Info:     glmark2 2017.07
Info: =======================================================
Info:     OpenGL Information
Info:     GL_VENDOR:     NVIDIA Corporation
Info:     GL_RENDERER:   GeForce MX150/PCIe/SSE2
Info:     GL_VERSION:    4.6.0 NVIDIA 415.22
Info: =======================================================
Info: ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
Info: ** Failed to set swap interval. Results may be bounded above by refresh rate.
[ 4675.133248] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4675.133270] [DEBUG]Socket closed.
[ 4675.133282] [DEBUG]Killing all remaining processes.

libdl may not exist

src/wscript_build:  platform_libs = ['m', 'jpeg', 'dl']
src/wscript_build:        lib      = ['m', 'jpeg', 'dl'],

but many unices have dlopen in libc and libdl doesn't exist. (Guessing: only needed on linux?)

Unable to compile glmark2 for android

I tried compiling the glmark2 for android, it got assembler error:
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S: Assembler messages:
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:30: Error: unknown pseudo-op: .fpu' external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:31: Error: unknown architecturearmv7a'

external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:32: Error: unknown pseudo-op: .object_arch' external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:33: Error: unknown pseudo-op:.arm'
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:184: Warning: unknown register 'r0' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:185: Warning: unknown register 'r1' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:186: Warning: unknown register 'r2' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:187: Warning: unknown register 'r3' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:188: Warning: unknown register 'r0' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:189: Warning: unknown register 'r1' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:190: Warning: unknown register 'r2' -- .req ignored
external/glmark2-master/android/jni/src/libjpeg-turbo/simd/jsimd_arm_neon.S:191: Warning: unknown register 'ip' -- .req ignored
...
...

Please help..
Thanks

Raspberry PI - Error: Couldn't create native window

Hi again, Thanks for solving the issue #70
It's building now, but when I launch glmark2-es2-dispmanx I get the following errors:

Error: Error: Dispmanx only supports full screen rendering.
Error: Error: Couldn't create native window!
Error: main: Could not initialize canvas

This is how I installed it:

./waf configure --with-flavors=dispmanx-glesv2
./waf
sudo ./waf install

I launch it on RPI with no X running.

Unable to link Glmark2 with libGL on fresh Debian Jessie

So I have tried compiling Glmark2 for the first time on Debian Jessie which was freshly installed a week ago. All the libraries required by ./configure are installed and can be found by ./configure. However when waf performs the linking step after compilation it cannot find libGL ("cannot find -lGL). I can't work out from waf's help how to tell waf where to look for libraries during linking, and the only place I can think to ask for help is here.

The configure step completes fine:

user@host:/Code/glmark2$ ./waf configure --prefix=/local --with-flavors=x11-gl
Setting top to : /rr-home/ambo/Code/glmark2
Setting out to : /rr-home/ambo/Code/glmark2/build
Checking for 'gcc' (c compiler) : /usr/bin/gcc
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Checking for header stdlib.h : yes
Checking for header string.h : yes
Checking for header unistd.h : yes
Checking for header stdint.h : yes
Checking for header stdio.h : yes
Checking for header jpeglib.h : yes
Checking for library m : yes
Checking for library jpeg : yes
Checking for function memset : yes
Checking for function sqrt : yes
Checking for program pkg-config : /usr/bin/pkg-config
Checking for 'libpng12' >= 1.2 : yes
Checking for 'x11' : yes
Checking for 'gl' : yes
Checking for 'egl' : yes
Checking for 'glesv2' : yes
Checking for 'libdrm' : yes
Checking for 'gbm' : yes
Checking for 'mirclient' >= 0.13 : not found
Checking for 'wayland-client' : yes
Checking for 'wayland-egl' : yes
Prefix : /rr-home/ambo/local
Data path : /rr-home/ambo/local/share/glmark2
Including extras : No
Building flavors : ['x11-gl']
'configure' finished successfully (2.035s)

When I build, tasks 1 to 65 complete successfully (although the font colour for 65 is orange/brown not green if that signifies anything). Task 66 fails:

[66/66] cxxprogram: build/src/benchmark-collection.cpp.1.o build/src/benchmark.cpp.1.o build/src/gl-headers.cpp.1.o build/src/gl-visual-config.cpp.1.o build/src/image-reader.cpp.1.o build/src/main-loop.cpp.1.o build/src/main.cpp.1.o build/src/mesh.cpp.1.o build/src/model.cpp.1.o build/src/options.cpp.1.o build/src/scene-buffer.cpp.1.o build/src/scene-build.cpp.1.o build/src/scene-bump.cpp.1.o build/src/scene-clear.cpp.1.o build/src/scene-conditionals.cpp.1.o build/src/scene-default-options.cpp.1.o build/src/scene-desktop.cpp.1.o build/src/scene-effect-2d.cpp.1.o build/src/scene-function.cpp.1.o build/src/scene-grid.cpp.1.o build/src/scene-ideas/a.cc.1.o build/src/scene-ideas/d.cc.1.o build/src/scene-ideas/e.cc.1.o build/src/scene-ideas/i.cc.1.o build/src/scene-ideas/lamp.cc.1.o build/src/scene-ideas/logo.cc.1.o build/src/scene-ideas/m.cc.1.o build/src/scene-ideas/n.cc.1.o build/src/scene-ideas/o.cc.1.o build/src/scene-ideas/s.cc.1.o build/src/scene-ideas/splines.cc.1.o build/src/scene-ideas/t.cc.1.o build/src/scene-ideas/table.cc.1.o build/src/scene-ideas.cpp.1.o build/src/scene-jellyfish.cpp.1.o build/src/scene-loop.cpp.1.o build/src/scene-pulsar.cpp.1.o build/src/scene-refract.cpp.1.o build/src/scene-shading.cpp.1.o build/src/scene-shadow.cpp.1.o build/src/scene-terrain/base-renderer.cpp.1.o build/src/scene-terrain/blur-renderer.cpp.1.o build/src/scene-terrain/copy-renderer.cpp.1.o build/src/scene-terrain/luminance-renderer.cpp.1.o build/src/scene-terrain/normal-from-height-renderer.cpp.1.o build/src/scene-terrain/overlay-renderer.cpp.1.o build/src/scene-terrain/renderer-chain.cpp.1.o build/src/scene-terrain/simplex-noise-renderer.cpp.1.o build/src/scene-terrain/terrain-renderer.cpp.1.o build/src/scene-terrain/texture-renderer.cpp.1.o build/src/scene-terrain.cpp.1.o build/src/scene-texture.cpp.1.o build/src/scene.cpp.1.o build/src/text-renderer.cpp.1.o build/src/texture.cpp.1.o build/src/canvas-generic.cpp.1.o build/src/native-state-x11.cpp.1.o build/src/gl-state-glx.cpp.1.o -> build/src/glmark2
/usr/bin/ld: cannot find -lGL

Further proof that libGL is installed:

ldconfig -p | grep libGL.so
libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so.1
libGL.so.1 (libc6,x86-64) => /usr/lib/libGL.so.1

tear down of EGL context

Hi, I have not found the code that tears down the EGL context:

something like the following snippet :
static void term_display() {
if (display != EGL_NO_DISPLAY) {
eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (context != EGL_NO_CONTEXT) {
eglDestroyContext(display, context);
}
if (surface != EGL_NO_SURFACE) {
eglDestroySurface(display, surface);
}
eglTerminate(display);
}
display = EGL_NO_DISPLAY;
context = EGL_NO_CONTEXT;
surface = EGL_NO_SURFACE;
}

error upon building on raspberry pi

pi@raspberrypi ~/glmark2 $ sudo apt-get install libwayland-egl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libwayland-egl
pi@raspberrypi ~/glmark2 $ sudo ./waf configure --with-flavors=drm-glesv2 --data-path=DATA_PATH --prefix=PREFIX
Setting top to : /home/pi/glmark2
Setting out to : /home/pi/glmark2/build
Checking for 'gcc' (c compiler) : /usr/bin/gcc
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Checking for header stdlib.h : yes
Checking for header string.h : yes
Checking for header unistd.h : yes
Checking for header stdint.h : yes
Checking for header stdio.h : yes
Checking for header jpeglib.h : yes
Checking for library m : yes
Checking for library jpeg : yes
Checking for function memset : yes
Checking for function sqrt : yes
Checking for program pkg-config : /usr/bin/pkg-config
Checking for 'libpng12' >= 1.2 : yes
Checking for 'x11' : yes
Checking for 'gl' : not found
Checking for 'egl' : yes
Checking for 'glesv2' : yes
Checking for 'libdrm' : yes
Checking for 'gbm' : yes
Checking for 'mirclient' : not found
Checking for 'wayland-client' : yes
Checking for 'wayland-egl' : not found
Prefix : /home/pi/glmark2/PREFIX
Data path : DATA_PATH
Including extras : No
Building flavors : ['drm-glesv2']
'configure' finished successfully (15.539s)
pi@raspberrypi ~/glmark2 $ ./waf
Waf: Entering directory /home/pi/glmark2/build' Could not create the directory /home/pi/glmark2/build/doc pi@raspberrypi ~/glmark2 $ sudo ./waf Waf: Entering directory/home/pi/glmark2/build'
[ 1/66] cxx: src/benchmark-collection.cpp -> build/src/benchmark-collection.cpp.1.o
[ 2/66] cxx: src/benchmark.cpp -> build/src/benchmark.cpp.1.o
[ 3/66] cxx: src/gl-headers.cpp -> build/src/gl-headers.cpp.1.o
[ 4/66] cxx: src/gl-visual-config.cpp -> build/src/gl-visual-config.cpp.1.o
[ 5/66] cxx: src/image-reader.cpp -> build/src/image-reader.cpp.1.o
[ 6/66] cxx: src/main-loop.cpp -> build/src/main-loop.cpp.1.o
[ 7/66] cxx: src/main.cpp -> build/src/main.cpp.1.o
In file included from ../src/main.cpp:40:0:
../src/native-state-drm.h:86:5: error: ‘gbm_surface’ does not name a type
../src/native-state-drm.h: In constructor ‘NativeStateDRM::NativeStateDRM()’:
../src/native-state-drm.h:46:9: error: class ‘NativeStateDRM’ does not have any field named ‘surface_’
Waf: Leaving directory `/home/pi/glmark2/build'
Build failed
-> task in 'glmark2-es2-drm' failed (exit status 1):
{task 3060369680L: cxx main.cpp -> main.cpp.1.o}
['/usr/bin/g++', '-g', '-O2', '-Werror', '-Wall', '-Wextra', '-Wnon-virtual-dtor', '-I/home/pi/glmark2/build/src', '-I/home/pi/glmark2/src', '-I/home/pi/glmark2/build/src/scene-ideas', '-I/home/pi/glmark2/src/scene-ideas', '-I/home/pi/glmark2/build/src/scene-terrain', '-I/home/pi/glmark2/src/scene-terrain', '-I/home/pi/glmark2/build/src/libmatrix', '-I/home/pi/glmark2/src/libmatrix', '-I/usr/include/libpng12', '-I/usr/include/libdrm', '-DHAVE_STDLIB_H=1', '-DHAVE_STRING_H=1', '-DHAVE_UNISTD_H=1', '-DHAVE_STDINT_H=1', '-DHAVE_STDIO_H=1', '-DHAVE_JPEGLIB_H=1', '-DHAVE_MEMSET=1', '-DHAVE_SQRT=1', '-DHAVE_LIBPNG=1', '-DHAVE_X11=1', '-DHAVE_EGL=1', '-DHAVE_GLESV2=1', '-DHAVE_DRM=1', '-DHAVE_GBM=1', '-DHAVE_WAYLAND_CLIENT=1', '-DGLMARK_DATA_PATH="DATA_PATH"', '-DGLMARK_VERSION="2014.03"', '-DUSE_EXCEPTIONS', '-DGLMARK2_USE_DRM', '-DGLMARK2_USE_GLESv2', '-DGLMARK2_USE_EGL', '-D__GBM__', '../src/main.cpp', '-c', '-o', 'src/main.cpp.1.o']

Broken configure check for sqrt

The configure check for sqrt does:

    p=(void*)(sqrt);

This is not valid because sqrt is an overloaded function. A conforming C++ standard library (such as libstdc++ in GCC 6) provides multiple overloads of sqrt and the code above fails to compile.

Build error on new Raspberry Pi

I'm trying to build glmark2 on a stock Raspberry Pi and see the following error:

(Excerpted for brevity, full log below)

$ git rev-parse HEAD
fca839a9970b53808eb72261793ca56672652519

 $ ./waf configure --with-flavors dispmanx-glesv2
...
Building flavors                                       : ['dispmanx-glesv2'] 
'configure' finished successfully (6.646s)

$ ./waf
Waf: Entering directory `/home/pi/Desktop/glmark2/build'
[ 1/70] Compiling src/main.cpp
[ 2/70] Compiling src/canvas-generic.cpp
[ 3/70] Compiling src/native-state-dispmanx.cpp
[ 4/70] Compiling src/gl-state-egl.cpp
[ 5/70] Compiling src/glad/src/egl.c
[ 6/70] Compiling src/glad/src/gles2.c
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/gl-state-egl.cpp:22:
../src/gl-state-egl.cpp: In member function ‘virtual bool GLStateEGL::init_display(void*, GLVisualConfig&)’:
../src/glad/include/glad/egl.h:247:43: error: expected primary-expression before ‘,’ token
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
                                           ^
../src/gl-state-egl.cpp:316:28: note: in expansion of macro ‘EGL_NO_DISPLAY’
     if (gladLoadEGLUserPtr(EGL_NO_DISPLAY, load_egl_func, &egl_lib_) == 0) {
                            ^~~~~~~~~~~~~~
../src/glad/include/glad/egl.h:247:45: error: ‘EGL_CAST’ was not declared in this scope
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
                                             ^
...

[ 7/70] Compiling src/libmatrix/log.cc
[ 8/70] Compiling src/libmatrix/mat.cc
[ 9/70] Compiling src/libmatrix/program.cc
[10/70] Compiling src/libmatrix/shader-source.cc
[11/70] Compiling src/libmatrix/util.cc
[12/70] Compiling src/benchmark-collection.cpp
[13/70] Compiling src/benchmark.cpp
[14/70] Compiling src/gl-headers.cpp
[15/70] Compiling src/gl-visual-config.cpp
[16/70] Compiling src/image-reader.cpp
[17/70] Compiling src/main-loop.cpp
[18/70] Compiling src/mesh.cpp
[19/70] Compiling src/model.cpp
[20/70] Compiling src/options.cpp
[21/70] Compiling src/scene-buffer.cpp
[22/70] Compiling src/scene-build.cpp
[23/70] Compiling src/scene-bump.cpp
[24/70] Compiling src/scene-clear.cpp
[25/70] Compiling src/scene-conditionals.cpp
[26/70] Compiling src/scene-default-options.cpp
[27/70] Compiling src/scene-desktop.cpp
[28/70] Compiling src/scene-effect-2d.cpp
[29/70] Compiling src/scene-function.cpp
[30/70] Compiling src/scene-grid.cpp
[31/70] Compiling src/scene-ideas/a.cc
[32/70] Compiling src/scene-ideas/d.cc
[33/70] Compiling src/scene-ideas/e.cc
[34/70] Compiling src/scene-ideas/i.cc
[35/70] Compiling src/scene-ideas/lamp.cc
[36/70] Compiling src/scene-ideas/logo.cc
[37/70] Compiling src/scene-ideas/m.cc
[38/70] Compiling src/scene-ideas/n.cc
[39/70] Compiling src/scene-ideas/o.cc
[40/70] Compiling src/scene-ideas/s.cc
[41/70] Compiling src/scene-ideas/splines.cc
[42/70] Compiling src/scene-ideas/t.cc
[43/70] Compiling src/scene-ideas/table.cc
[44/70] Compiling src/scene-ideas.cpp
[45/70] Compiling src/scene-jellyfish.cpp
[46/70] Compiling src/scene-loop.cpp
[47/70] Compiling src/scene-pulsar.cpp
[48/70] Compiling src/scene-refract.cpp
[49/70] Compiling src/scene-shading.cpp
[50/70] Compiling src/scene-shadow.cpp
[51/70] Compiling src/scene-terrain/base-renderer.cpp
[52/70] Compiling src/scene-terrain/blur-renderer.cpp
[53/70] Compiling src/scene-terrain/copy-renderer.cpp
[54/70] Compiling src/scene-terrain/luminance-renderer.cpp
[55/70] Compiling src/scene-terrain/normal-from-height-renderer.cpp
[56/70] Compiling src/scene-terrain/overlay-renderer.cpp
[57/70] Compiling src/scene-terrain/renderer-chain.cpp
[58/70] Compiling src/scene-terrain/simplex-noise-renderer.cpp
[59/70] Compiling src/scene-terrain/terrain-renderer.cpp
[60/70] Compiling src/scene-terrain/texture-renderer.cpp
[61/70] Compiling src/scene-terrain.cpp
[62/70] Compiling src/scene-texture.cpp
[63/70] Compiling src/scene.cpp
[64/70] Compiling src/shared-library.cpp
[65/70] Compiling src/text-renderer.cpp
[66/70] Compiling src/texture.cpp
[67/70] Compiling doc/glmark2.1.in
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:79:0: warning: "GL_FALSE" redefined
 #define GL_FALSE                          (GLboolean)0
 
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:236:0: note: this is the location of the previous definition
 #define GL_FALSE 0
 
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:80:0: warning: "GL_TRUE" redefined
 #define GL_TRUE                           (GLboolean)1
 
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:458:0: note: this is the location of the previous definition
 #define GL_TRUE 1
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:150:0: warning: "EGL_ALPHA_FORMAT" redefined
 #define EGL_ALPHA_FORMAT 0x3088
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:234:0: note: this is the location of the previous definition
 #define EGL_ALPHA_FORMAT  EGL_VG_ALPHA_FORMAT
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:151:0: warning: "EGL_ALPHA_FORMAT_NONPRE" redefined
 #define EGL_ALPHA_FORMAT_NONPRE 0x308B
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:237:0: note: this is the location of the previous definition
 #define EGL_ALPHA_FORMAT_NONPRE  EGL_VG_ALPHA_FORMAT_NONPRE
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:152:0: warning: "EGL_ALPHA_FORMAT_PRE" redefined
 #define EGL_ALPHA_FORMAT_PRE 0x308C
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:238:0: note: this is the location of the previous definition
 #define EGL_ALPHA_FORMAT_PRE  EGL_VG_ALPHA_FORMAT_PRE
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:176:0: warning: "EGL_COLORSPACE" redefined
 #define EGL_COLORSPACE 0x3087
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:233:0: note: this is the location of the previous definition
 #define EGL_COLORSPACE   EGL_VG_COLORSPACE
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:177:0: warning: "EGL_COLORSPACE_LINEAR" redefined
 #define EGL_COLORSPACE_LINEAR 0x308A
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:236:0: note: this is the location of the previous definition
 #define EGL_COLORSPACE_LINEAR  EGL_VG_COLORSPACE_LINEAR
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:178:0: warning: "EGL_COLORSPACE_sRGB" redefined
 #define EGL_COLORSPACE_sRGB 0x3089
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:235:0: note: this is the location of the previous definition
 #define EGL_COLORSPACE_sRGB  EGL_VG_COLORSPACE_sRGB
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:197:0: warning: "EGL_DEFAULT_DISPLAY" redefined
 #define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:68:0: note: this is the location of the previous definition
 #define EGL_DEFAULT_DISPLAY  ((EGLNativeDisplayType)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:200:0: warning: "EGL_DONT_CARE" redefined
 #define EGL_DONT_CARE EGL_CAST(EGLint,-1)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:74:0: note: this is the location of the previous definition
 #define EGL_DONT_CARE   ((EGLint)-1)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:203:0: warning: "EGL_FALSE" redefined
 #define EGL_FALSE 0
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:64:0: note: this is the location of the previous definition
 #define EGL_FALSE   ((EGLBoolean)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:246:0: warning: "EGL_NO_CONTEXT" redefined
 #define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:69:0: note: this is the location of the previous definition
 #define EGL_NO_CONTEXT   ((EGLContext)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:247:0: warning: "EGL_NO_DISPLAY" redefined
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:70:0: note: this is the location of the previous definition
 #define EGL_NO_DISPLAY   ((EGLDisplay)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:250:0: warning: "EGL_NO_SURFACE" redefined
 #define EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:71:0: note: this is the location of the previous definition
 #define EGL_NO_SURFACE   ((EGLSurface)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:303:0: warning: "EGL_TRUE" redefined
 #define EGL_TRUE 1
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:65:0: note: this is the location of the previous definition
 #define EGL_TRUE   ((EGLBoolean)1)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:304:0: warning: "EGL_UNKNOWN" redefined
 #define EGL_UNKNOWN EGL_CAST(EGLint,-1)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:201:0: note: this is the location of the previous definition
 #define EGL_UNKNOWN   ((EGLint)-1)
 
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:621:98: error: ‘void glad_glClearColor(GLclampf, GLclampf, GLclampf, GLclampf)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
                                                                                                  ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:737:35: note: previous declaration ‘void (* glad_glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat)’
 GLAD_API_CALL PFNGLCLEARCOLORPROC glad_glClearColor;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:622:54: error: ‘void glad_glClearDepthf(GLclampf)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
                                                      ^
...

I reproduced this issue on a fresh install:

  • Start with Raspberry Pi 3 B+
  • Install Raspbian via NOOBS
  • sudo apt-get install libjpeg8-dev
  • git clone https://github.com/glmark2/glmark2.git
  • cd glmark2
  • ./waf ...

I've been able to run OpenGL ES examples provided in /opt/vc/src/, so I know graphics work at least to some extent.

Even if you're not able to address the build error yourself right now, I'm happy follow up on any pointers or suggestions you have for debugging.

One other note: the dispmanx-glesv2 was not mentioned in INSTALL. It took me a while to figure out this is what I wanted for the Raspberry Pi. It may make sense to mention this flavor in the list of flavors in INSTALL.

Full console log

$ git rev-parse HEAD
fca839a9970b53808eb72261793ca56672652519

 $ ./waf configure --with-flavors dispmanx-glesv2
Setting top to                           : /home/pi/Desktop/glmark2 
Setting out to                           : /home/pi/Desktop/glmark2/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking for header stdlib.h             : yes 
Checking for header string.h             : yes 
Checking for header unistd.h             : yes 
Checking for header stdint.h             : yes 
Checking for header stdio.h              : yes 
Checking for header jpeglib.h            : yes 
Checking for library m                   : yes 
Checking for library jpeg                : yes 
Checking for function memset             : yes 
Checking for function sqrt               : yes 
Checking for program 'pkg-config'        : /usr/bin/pkg-config 
Checking for 'libpng12'                  : not found 
Checking for 'libpng15'                  : not found 
Checking for 'libpng16'                  : yes 
Checking for library brcmGLESv2          : yes 
Checking for library ['brcmEGL', 'brcmGLESv2'] : yes 
Checking for library ['bcm_host', 'vcos', 'vchiq_arm'] : yes 
Checking for 'x11'                                     : not found 
Checking for 'libdrm'                                  : not found 
Checking for 'gbm'                                     : not found 
Checking for 'libudev'                                 : not found 
Checking for 'mirclient'                               : not found 
Checking for 'wayland-client'                          : not found 
Checking for 'wayland-egl'                             : not found 
Prefix                                                 : /usr/local 
Data path                                              : /usr/local/share/glmark2 
Including extras                                       : No 
Building flavors                                       : ['dispmanx-glesv2'] 
'configure' finished successfully (6.646s)
pi@raspberrypi:~/Desktop/glmark2 $ ./waf
Waf: Entering directory `/home/pi/Desktop/glmark2/build'
[ 1/70] Compiling src/main.cpp
[ 2/70] Compiling src/canvas-generic.cpp
[ 3/70] Compiling src/native-state-dispmanx.cpp
[ 4/70] Compiling src/gl-state-egl.cpp
[ 5/70] Compiling src/glad/src/egl.c
[ 6/70] Compiling src/glad/src/gles2.c
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/gl-state-egl.cpp:22:
../src/gl-state-egl.cpp: In member function ‘virtual bool GLStateEGL::init_display(void*, GLVisualConfig&)’:
../src/glad/include/glad/egl.h:247:43: error: expected primary-expression before ‘,’ token
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
                                           ^
../src/gl-state-egl.cpp:316:28: note: in expansion of macro ‘EGL_NO_DISPLAY’
     if (gladLoadEGLUserPtr(EGL_NO_DISPLAY, load_egl_func, &egl_lib_) == 0) {
                            ^~~~~~~~~~~~~~
../src/glad/include/glad/egl.h:247:45: error: ‘EGL_CAST’ was not declared in this scope
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
                                             ^
../src/gl-state-egl.cpp:316:28: note: in expansion of macro ‘EGL_NO_DISPLAY’
     if (gladLoadEGLUserPtr(EGL_NO_DISPLAY, load_egl_func, &egl_lib_) == 0) {
                            ^~~~~~~~~~~~~~
../src/gl-state-egl.cpp: In member function ‘bool GLStateEGL::gotValidDisplay()’:
../src/glad/include/glad/egl.h:247:43: error: expected primary-expression before ‘,’ token
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
                                           ^
../src/gl-state-egl.cpp:468:24: note: in expansion of macro ‘EGL_NO_DISPLAY’
         eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
                        ^~~~~~~~~~~~~~
../src/glad/include/glad/egl.h:247:45: error: ‘EGL_CAST’ was not declared in this scope
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
                                             ^
../src/gl-state-egl.cpp:468:24: note: in expansion of macro ‘EGL_NO_DISPLAY’
         eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
                        ^~~~~~~~~~~~~~
../src/gl-state-egl.cpp: In member function ‘bool GLStateEGL::gotValidContext()’:
../src/glad/include/glad/egl.h:246:43: error: expected primary-expression before ‘,’ token
 #define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
                                           ^
../src/gl-state-egl.cpp:705:37: note: in expansion of macro ‘EGL_NO_CONTEXT’
                                     EGL_NO_CONTEXT, context_attribs);
                                     ^~~~~~~~~~~~~~
../src/glad/include/glad/egl.h:246:45: error: ‘EGL_CAST’ was not declared in this scope
 #define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
                                             ^
../src/gl-state-egl.cpp:705:37: note: in expansion of macro ‘EGL_NO_CONTEXT’
                                     EGL_NO_CONTEXT, context_attribs);
                                     ^~~~~~~~~~~~~~

[ 7/70] Compiling src/libmatrix/log.cc
[ 8/70] Compiling src/libmatrix/mat.cc
[ 9/70] Compiling src/libmatrix/program.cc
[10/70] Compiling src/libmatrix/shader-source.cc
[11/70] Compiling src/libmatrix/util.cc
[12/70] Compiling src/benchmark-collection.cpp
[13/70] Compiling src/benchmark.cpp
[14/70] Compiling src/gl-headers.cpp
[15/70] Compiling src/gl-visual-config.cpp
[16/70] Compiling src/image-reader.cpp
[17/70] Compiling src/main-loop.cpp
[18/70] Compiling src/mesh.cpp
[19/70] Compiling src/model.cpp
[20/70] Compiling src/options.cpp
[21/70] Compiling src/scene-buffer.cpp
[22/70] Compiling src/scene-build.cpp
[23/70] Compiling src/scene-bump.cpp
[24/70] Compiling src/scene-clear.cpp
[25/70] Compiling src/scene-conditionals.cpp
[26/70] Compiling src/scene-default-options.cpp
[27/70] Compiling src/scene-desktop.cpp
[28/70] Compiling src/scene-effect-2d.cpp
[29/70] Compiling src/scene-function.cpp
[30/70] Compiling src/scene-grid.cpp
[31/70] Compiling src/scene-ideas/a.cc
[32/70] Compiling src/scene-ideas/d.cc
[33/70] Compiling src/scene-ideas/e.cc
[34/70] Compiling src/scene-ideas/i.cc
[35/70] Compiling src/scene-ideas/lamp.cc
[36/70] Compiling src/scene-ideas/logo.cc
[37/70] Compiling src/scene-ideas/m.cc
[38/70] Compiling src/scene-ideas/n.cc
[39/70] Compiling src/scene-ideas/o.cc
[40/70] Compiling src/scene-ideas/s.cc
[41/70] Compiling src/scene-ideas/splines.cc
[42/70] Compiling src/scene-ideas/t.cc
[43/70] Compiling src/scene-ideas/table.cc
[44/70] Compiling src/scene-ideas.cpp
[45/70] Compiling src/scene-jellyfish.cpp
[46/70] Compiling src/scene-loop.cpp
[47/70] Compiling src/scene-pulsar.cpp
[48/70] Compiling src/scene-refract.cpp
[49/70] Compiling src/scene-shading.cpp
[50/70] Compiling src/scene-shadow.cpp
[51/70] Compiling src/scene-terrain/base-renderer.cpp
[52/70] Compiling src/scene-terrain/blur-renderer.cpp
[53/70] Compiling src/scene-terrain/copy-renderer.cpp
[54/70] Compiling src/scene-terrain/luminance-renderer.cpp
[55/70] Compiling src/scene-terrain/normal-from-height-renderer.cpp
[56/70] Compiling src/scene-terrain/overlay-renderer.cpp
[57/70] Compiling src/scene-terrain/renderer-chain.cpp
[58/70] Compiling src/scene-terrain/simplex-noise-renderer.cpp
[59/70] Compiling src/scene-terrain/terrain-renderer.cpp
[60/70] Compiling src/scene-terrain/texture-renderer.cpp
[61/70] Compiling src/scene-terrain.cpp
[62/70] Compiling src/scene-texture.cpp
[63/70] Compiling src/scene.cpp
[64/70] Compiling src/shared-library.cpp
[65/70] Compiling src/text-renderer.cpp
[66/70] Compiling src/texture.cpp
[67/70] Compiling doc/glmark2.1.in
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:79:0: warning: "GL_FALSE" redefined
 #define GL_FALSE                          (GLboolean)0
 
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:236:0: note: this is the location of the previous definition
 #define GL_FALSE 0
 
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:80:0: warning: "GL_TRUE" redefined
 #define GL_TRUE                           (GLboolean)1
 
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:458:0: note: this is the location of the previous definition
 #define GL_TRUE 1
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:150:0: warning: "EGL_ALPHA_FORMAT" redefined
 #define EGL_ALPHA_FORMAT 0x3088
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:234:0: note: this is the location of the previous definition
 #define EGL_ALPHA_FORMAT  EGL_VG_ALPHA_FORMAT
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:151:0: warning: "EGL_ALPHA_FORMAT_NONPRE" redefined
 #define EGL_ALPHA_FORMAT_NONPRE 0x308B
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:237:0: note: this is the location of the previous definition
 #define EGL_ALPHA_FORMAT_NONPRE  EGL_VG_ALPHA_FORMAT_NONPRE
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:152:0: warning: "EGL_ALPHA_FORMAT_PRE" redefined
 #define EGL_ALPHA_FORMAT_PRE 0x308C
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:238:0: note: this is the location of the previous definition
 #define EGL_ALPHA_FORMAT_PRE  EGL_VG_ALPHA_FORMAT_PRE
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:176:0: warning: "EGL_COLORSPACE" redefined
 #define EGL_COLORSPACE 0x3087
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:233:0: note: this is the location of the previous definition
 #define EGL_COLORSPACE   EGL_VG_COLORSPACE
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:177:0: warning: "EGL_COLORSPACE_LINEAR" redefined
 #define EGL_COLORSPACE_LINEAR 0x308A
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:236:0: note: this is the location of the previous definition
 #define EGL_COLORSPACE_LINEAR  EGL_VG_COLORSPACE_LINEAR
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:178:0: warning: "EGL_COLORSPACE_sRGB" redefined
 #define EGL_COLORSPACE_sRGB 0x3089
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:235:0: note: this is the location of the previous definition
 #define EGL_COLORSPACE_sRGB  EGL_VG_COLORSPACE_sRGB
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:197:0: warning: "EGL_DEFAULT_DISPLAY" redefined
 #define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:68:0: note: this is the location of the previous definition
 #define EGL_DEFAULT_DISPLAY  ((EGLNativeDisplayType)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:200:0: warning: "EGL_DONT_CARE" redefined
 #define EGL_DONT_CARE EGL_CAST(EGLint,-1)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:74:0: note: this is the location of the previous definition
 #define EGL_DONT_CARE   ((EGLint)-1)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:203:0: warning: "EGL_FALSE" redefined
 #define EGL_FALSE 0
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:64:0: note: this is the location of the previous definition
 #define EGL_FALSE   ((EGLBoolean)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:246:0: warning: "EGL_NO_CONTEXT" redefined
 #define EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:69:0: note: this is the location of the previous definition
 #define EGL_NO_CONTEXT   ((EGLContext)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:247:0: warning: "EGL_NO_DISPLAY" redefined
 #define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:70:0: note: this is the location of the previous definition
 #define EGL_NO_DISPLAY   ((EGLDisplay)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:250:0: warning: "EGL_NO_SURFACE" redefined
 #define EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:71:0: note: this is the location of the previous definition
 #define EGL_NO_SURFACE   ((EGLSurface)0)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:303:0: warning: "EGL_TRUE" redefined
 #define EGL_TRUE 1
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:65:0: note: this is the location of the previous definition
 #define EGL_TRUE   ((EGLBoolean)1)
 
In file included from ../src/gl-state-egl.h:26:0,
                 from ../src/main.cpp:50:
../src/glad/include/glad/egl.h:304:0: warning: "EGL_UNKNOWN" redefined
 #define EGL_UNKNOWN EGL_CAST(EGLint,-1)
 
In file included from ../src/native-state-dispmanx.h:29:0,
                 from ../src/main.cpp:46:
/opt/vc/include/EGL/egl.h:201:0: note: this is the location of the previous definition
 #define EGL_UNKNOWN   ((EGLint)-1)
 
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:621:98: error: ‘void glad_glClearColor(GLclampf, GLclampf, GLclampf, GLclampf)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
                                                                                                  ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:737:35: note: previous declaration ‘void (* glad_glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat)’
 GLAD_API_CALL PFNGLCLEARCOLORPROC glad_glClearColor;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:622:54: error: ‘void glad_glClearDepthf(GLclampf)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
                                                      ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:739:36: note: previous declaration ‘void (* glad_glClearDepthf)(GLfloat)’
 GLAD_API_CALL PFNGLCLEARDEPTHFPROC glad_glClearDepthf;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:625:69: error: ‘void glad_glDepthRangef(GLclampf, GLclampf)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
                                                                     ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:777:36: note: previous declaration ‘void (* glad_glDepthRangef)(GLfloat, GLfloat)’
 GLAD_API_CALL PFNGLDEPTHRANGEFPROC glad_glDepthRangef;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:630:67: error: ‘void glad_glGetFloatv(GLenum, GLfloat*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
                                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:831:34: note: previous declaration ‘void (* glad_glGetFloatv)(GLenum, GLfloat*)’
 GLAD_API_CALL PFNGLGETFLOATVPROC glad_glGetFloatv;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:634:90: error: ‘void glad_glGetTexParameterfv(GLenum, GLenum, GLfloat*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
                                                                                          ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:853:42: note: previous declaration ‘void (* glad_glGetTexParameterfv)(GLenum, GLenum, GLfloat*)’
 GLAD_API_CALL PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:639:51: error: ‘void glad_glLineWidth(GLfloat)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glLineWidth (GLfloat width);
                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:885:34: note: previous declaration ‘void (* glad_glLineWidth)(GLfloat)’
 GLAD_API_CALL PFNGLLINEWIDTHPROC glad_glLineWidth;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:650:71: error: ‘void glad_glPolygonOffset(GLfloat, GLfloat)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
                                                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:895:38: note: previous declaration ‘void (* glad_glPolygonOffset)(GLfloat, GLfloat)’
 GLAD_API_CALL PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:655:84: error: ‘void glad_glTexParameterf(GLenum, GLenum, GLfloat)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
                                                                                    ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:925:38: note: previous declaration ‘void (* glad_glTexParameterf)(GLenum, GLenum, GLfloat)’
 GLAD_API_CALL PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:656:93: error: ‘void glad_glTexParameterfv(GLenum, GLenum, const GLfloat*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
                                                                                             ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:927:39: note: previous declaration ‘void (* glad_glTexParameterfv)(GLenum, GLenum, const GLfloat*)’
 GLAD_API_CALL PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
                                       ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:660:56: error: ‘void glad_glActiveTexture(GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
                                                        ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:705:38: note: previous declaration ‘void (* glad_glActiveTexture)(GLenum)’
 GLAD_API_CALL PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:662:67: error: ‘void glad_glBindBuffer(GLenum, GLuint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
                                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:711:35: note: previous declaration ‘void (* glad_glBindBuffer)(GLenum, GLuint)’
 GLAD_API_CALL PFNGLBINDBUFFERPROC glad_glBindBuffer;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:663:69: error: ‘void glad_glBindTexture(GLenum, GLuint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
                                                                     ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:717:36: note: previous declaration ‘void (* glad_glBindTexture)(GLenum, GLuint)’
 GLAD_API_CALL PFNGLBINDTEXTUREPROC glad_glBindTexture;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:664:68: error: ‘void glad_glBlendFunc(GLenum, GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
                                                                    ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:725:34: note: previous declaration ‘void (* glad_glBlendFunc)(GLenum, GLenum)’
 GLAD_API_CALL PFNGLBLENDFUNCPROC glad_glBlendFunc;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:665:103: error: ‘void glad_glBufferData(GLenum, GLsizeiptr, const GLvoid*, GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
                                                                                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:729:35: note: previous declaration ‘void (* glad_glBufferData)(GLenum, GLsizeiptr, const void*, GLenum)’
 GLAD_API_CALL PFNGLBUFFERDATAPROC glad_glBufferData;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:666:109: error: ‘void glad_glBufferSubData(GLenum, GLintptr, GLsizeiptr, const GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
                                                                                                             ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:731:38: note: previous declaration ‘void (* glad_glBufferSubData)(GLenum, GLintptr, GLsizeiptr, const void*)’
 GLAD_API_CALL PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:667:49: error: ‘void glad_glClear(GLbitfield)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glClear (GLbitfield mask);
                                                 ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:735:30: note: previous declaration ‘void (* glad_glClear)(GLbitfield)’
 GLAD_API_CALL PFNGLCLEARPROC glad_glClear;
                              ^~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:670:48: error: ‘void glad_glClearStencil(GLint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glClearStencil (GLint s);
                                                ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:741:37: note: previous declaration ‘void (* glad_glClearStencil)(GLint)’
 GLAD_API_CALL PFNGLCLEARSTENCILPROC glad_glClearStencil;
                                     ^~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:675:101: error: ‘void glad_glColorMask(GLboolean, GLboolean, GLboolean, GLboolean)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
                                                                                                     ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:743:34: note: previous declaration ‘void (* glad_glColorMask)(GLboolean, GLboolean, GLboolean, GLboolean)’
 GLAD_API_CALL PFNGLCOLORMASKPROC glad_glColorMask;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:677:182: error: ‘void glad_glCompressedTexImage2D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
                                                                                                                                                                                      ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:747:45: note: previous declaration ‘void (* glad_glCompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void*)’
 GLAD_API_CALL PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:678:193: error: ‘void glad_glCompressedTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
                                                                                                                                                                                                 ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:749:48: note: previous declaration ‘void (* glad_glCompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void*)’
 GLAD_API_CALL PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:679:155: error: ‘void glad_glCopyTexImage2D(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
                                                                                                                                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:751:39: note: previous declaration ‘void (* glad_glCopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)’
 GLAD_API_CALL PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
                                       ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:680:151: error: ‘void glad_glCopyTexSubImage2D(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
                                                                                                                                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:753:42: note: previous declaration ‘void (* glad_glCopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)’
 GLAD_API_CALL PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:681:48: error: ‘void glad_glCullFace(GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glCullFace (GLenum mode);
                                                ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:759:33: note: previous declaration ‘void (* glad_glCullFace)(GLenum)’
 GLAD_API_CALL PFNGLCULLFACEPROC glad_glCullFace;
                                 ^~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:682:74: error: ‘void glad_glDeleteBuffers(GLsizei, const GLuint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
                                                                          ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:761:38: note: previous declaration ‘void (* glad_glDeleteBuffers)(GLsizei, const GLuint*)’
 GLAD_API_CALL PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:683:76: error: ‘void glad_glDeleteTextures(GLsizei, const GLuint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
                                                                            ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:771:39: note: previous declaration ‘void (* glad_glDeleteTextures)(GLsizei, const GLuint*)’
 GLAD_API_CALL PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
                                       ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:684:49: error: ‘void glad_glDepthFunc(GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDepthFunc (GLenum func);
                                                 ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:773:34: note: previous declaration ‘void (* glad_glDepthFunc)(GLenum)’
 GLAD_API_CALL PFNGLDEPTHFUNCPROC glad_glDepthFunc;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:685:52: error: ‘void glad_glDepthMask(GLboolean)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
                                                    ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:775:34: note: previous declaration ‘void (* glad_glDepthMask)(GLboolean)’
 GLAD_API_CALL PFNGLDEPTHMASKPROC glad_glDepthMask;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:687:46: error: ‘void glad_glDisable(GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDisable (GLenum cap);
                                              ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:781:32: note: previous declaration ‘void (* glad_glDisable)(GLenum)’
 GLAD_API_CALL PFNGLDISABLEPROC glad_glDisable;
                                ^~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:689:78: error: ‘void glad_glDrawArrays(GLenum, GLint, GLsizei)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
                                                                              ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:785:35: note: previous declaration ‘void (* glad_glDrawArrays)(GLenum, GLint, GLsizei)’
 GLAD_API_CALL PFNGLDRAWARRAYSPROC glad_glDrawArrays;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:690:103: error: ‘void glad_glDrawElements(GLenum, GLsizei, GLenum, const GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
                                                                                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:787:37: note: previous declaration ‘void (* glad_glDrawElements)(GLenum, GLsizei, GLenum, const void*)’
 GLAD_API_CALL PFNGLDRAWELEMENTSPROC glad_glDrawElements;
                                     ^~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:691:45: error: ‘void glad_glEnable(GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glEnable (GLenum cap);
                                             ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:789:31: note: previous declaration ‘void (* glad_glEnable)(GLenum)’
 GLAD_API_CALL PFNGLENABLEPROC glad_glEnable;
                               ^~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:693:39: error: ‘void glad_glFinish()’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glFinish (void);
                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:793:31: note: previous declaration ‘void (* glad_glFinish)()’
 GLAD_API_CALL PFNGLFINISHPROC glad_glFinish;
                               ^~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:694:38: error: ‘void glad_glFlush()’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glFlush (void);
                                      ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:795:30: note: previous declaration ‘void (* glad_glFlush)()’
 GLAD_API_CALL PFNGLFLUSHPROC glad_glFlush;
                              ^~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:697:49: error: ‘void glad_glFrontFace(GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glFrontFace (GLenum mode);
                                                 ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:801:34: note: previous declaration ‘void (* glad_glFrontFace)(GLenum)’
 GLAD_API_CALL PFNGLFRONTFACEPROC glad_glFrontFace;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:699:71: error: ‘void glad_glGetBooleanv(GLenum, GLboolean*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
                                                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:821:36: note: previous declaration ‘void (* glad_glGetBooleanv)(GLenum, GLboolean*)’
 GLAD_API_CALL PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:700:91: error: ‘void glad_glGetBufferParameteriv(GLenum, GLenum, GLint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
                                                                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:823:45: note: previous declaration ‘void (* glad_glGetBufferParameteriv)(GLenum, GLenum, GLint*)’
 GLAD_API_CALL PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:702:65: error: ‘void glad_glGenBuffers(GLsizei, GLuint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
                                                                 ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:803:35: note: previous declaration ‘void (* glad_glGenBuffers)(GLsizei, GLuint*)’
 GLAD_API_CALL PFNGLGENBUFFERSPROC glad_glGenBuffers;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:703:67: error: ‘void glad_glGenTextures(GLsizei, GLuint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
                                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:809:36: note: previous declaration ‘void (* glad_glGenTextures)(GLsizei, GLuint*)’
 GLAD_API_CALL PFNGLGENTEXTURESPROC glad_glGenTextures;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:704:43: error: ‘GLenum glad_glGetError()’ redeclared as different kind of symbol
 GL_API GLenum GL_APIENTRY glGetError (void);
                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:829:33: note: previous declaration ‘GLenum (* glad_glGetError)()’
 GLAD_API_CALL PFNGLGETERRORPROC glad_glGetError;
                                 ^~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:706:67: error: ‘void glad_glGetIntegerv(GLenum, GLint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
                                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:835:36: note: previous declaration ‘void (* glad_glGetIntegerv)(GLenum, GLint*)’
 GLAD_API_CALL PFNGLGETINTEGERVPROC glad_glGetIntegerv;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:710:60: error: ‘const GLubyte* glad_glGetString(GLenum)’ redeclared as different kind of symbol
 GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
                                                            ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:851:34: note: previous declaration ‘const GLubyte* (* glad_glGetString)(GLenum)’
 GLAD_API_CALL PFNGLGETSTRINGPROC glad_glGetString;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:713:88: error: ‘void glad_glGetTexParameteriv(GLenum, GLenum, GLint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
                                                                                        ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:855:42: note: previous declaration ‘void (* glad_glGetTexParameteriv)(GLenum, GLenum, GLint*)’
 GLAD_API_CALL PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:715:59: error: ‘void glad_glHint(GLenum, GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
                                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:869:29: note: previous declaration ‘void (* glad_glHint)(GLenum, GLenum)’
 GLAD_API_CALL PFNGLHINTPROC glad_glHint;
                             ^~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:716:55: error: ‘GLboolean glad_glIsBuffer(GLuint)’ redeclared as different kind of symbol
 GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
                                                       ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:871:33: note: previous declaration ‘GLboolean (* glad_glIsBuffer)(GLuint)’
 GLAD_API_CALL PFNGLISBUFFERPROC glad_glIsBuffer;
                                 ^~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:717:53: error: ‘GLboolean glad_glIsEnabled(GLenum)’ redeclared as different kind of symbol
 GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
                                                     ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:873:34: note: previous declaration ‘GLboolean (* glad_glIsEnabled)(GLenum)’
 GLAD_API_CALL PFNGLISENABLEDPROC glad_glIsEnabled;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:718:57: error: ‘GLboolean glad_glIsTexture(GLuint)’ redeclared as different kind of symbol
 GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
                                                         ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:883:34: note: previous declaration ‘GLboolean (* glad_glIsTexture)(GLuint)’
 GLAD_API_CALL PFNGLISTEXTUREPROC glad_glIsTexture;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:735:65: error: ‘void glad_glPixelStorei(GLenum, GLint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
                                                                 ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:893:36: note: previous declaration ‘void (* glad_glPixelStorei)(GLenum, GLint)’
 GLAD_API_CALL PFNGLPIXELSTOREIPROC glad_glPixelStorei;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:742:130: error: ‘void glad_glReadPixels(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
                                                                                                                                  ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:897:35: note: previous declaration ‘void (* glad_glReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void*)’
 GLAD_API_CALL PFNGLREADPIXELSPROC glad_glReadPixels;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:744:75: error: ‘void glad_glSampleCoverage(GLclampf, GLboolean)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
                                                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:903:39: note: previous declaration ‘void (* glad_glSampleCoverage)(GLfloat, GLboolean)’
 GLAD_API_CALL PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
                                       ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:747:83: error: ‘void glad_glScissor(GLint, GLint, GLsizei, GLsizei)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
                                                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:905:32: note: previous declaration ‘void (* glad_glScissor)(GLint, GLint, GLsizei, GLsizei)’
 GLAD_API_CALL PFNGLSCISSORPROC glad_glScissor;
                                ^~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:749:75: error: ‘void glad_glStencilFunc(GLenum, GLint, GLuint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
                                                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:911:36: note: previous declaration ‘void (* glad_glStencilFunc)(GLenum, GLint, GLuint)’
 GLAD_API_CALL PFNGLSTENCILFUNCPROC glad_glStencilFunc;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:750:51: error: ‘void glad_glStencilMask(GLuint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glStencilMask (GLuint mask);
                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:915:36: note: previous declaration ‘void (* glad_glStencilMask)(GLuint)’
 GLAD_API_CALL PFNGLSTENCILMASKPROC glad_glStencilMask;
                                    ^~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:751:77: error: ‘void glad_glStencilOp(GLenum, GLenum, GLenum)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
                                                                             ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:919:34: note: previous declaration ‘void (* glad_glStencilOp)(GLenum, GLenum, GLenum)’
 GLAD_API_CALL PFNGLSTENCILOPPROC glad_glStencilOp;
                                  ^~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:757:182: error: ‘void glad_glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
                                                                                                                                                                                      ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:923:35: note: previous declaration ‘void (* glad_glTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*)’
 GLAD_API_CALL PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
                                   ^~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:758:82: error: ‘void glad_glTexParameteri(GLenum, GLenum, GLint)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
                                                                                  ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:929:38: note: previous declaration ‘void (* glad_glTexParameteri)(GLenum, GLenum, GLint)’
 GLAD_API_CALL PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:760:91: error: ‘void glad_glTexParameteriv(GLenum, GLenum, const GLint*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
                                                                                           ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:931:39: note: previous declaration ‘void (* glad_glTexParameteriv)(GLenum, GLenum, const GLint*)’
 GLAD_API_CALL PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
                                       ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:762:179: error: ‘void glad_glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
                                                                                                                                                                                   ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:933:38: note: previous declaration ‘void (* glad_glTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void*)’
 GLAD_API_CALL PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
                                      ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/native-state-dispmanx.h:28:0,
                 from ../src/main.cpp:46:
/opt/vc/include/GLES/gl.h:766:84: error: ‘void glad_glViewport(GLint, GLint, GLsizei, GLsizei)’ redeclared as different kind of symbol
 GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
                                                                                    ^
In file included from ../src/gl-headers.h:33:0,
                 from ../src/main.cpp:25:
../src/glad/include/glad/gles2.h:999:33: note: previous declaration ‘void (* glad_glViewport)(GLint, GLint, GLsizei, GLsizei)’
 GLAD_API_CALL PFNGLVIEWPORTPROC glad_glViewport;
                                 ^~~~~~~~~~~~~~~

High dependence on CPU performance

For some tests, there is a strong dependence of the results on the processor speed. I made measurements for frequency scan from 800MHz to 3600MHz using the cpufrequtils utility on the i7-4790 with the AMD Radeon R7 250E graphics card:

scan_glamark2_fps.res.txt

screenshot_2017-10-19_18-51-04

  • [terrain] and [refract] two lower horizontal lines, almost no depending on the frequency of the processor, it seems here rests all in speed video card.
  • [buffer- *] cross these two horizontal lines, apparently these tests will be
    a little like the fastest x86 processor, so they are demanding to the video card
  • The results of the [ideas] test directly depend on the processor speed, even on the
    3.6 GHz shows that we do not rest on anything else in this test.
    The rest of the tests behave very similar, starting at some CPU frequency
    The further its dispersal practically does not influence result:
  • [desktop-1] enough 1.4 GHz
  • [desktop-2] needs at least 2.8 GHz
  • [effect2d-2] apparently rests on the speed of videocard already at 1 GHz processor
  • [effect2d-1] shows 2 times the best results, but with 2 GHz
  • [bump-1] ceases to notice the processor speed from 1.2 GHz
  • [build-1] stops noticing CPU speed from 1.6 GHz
  • [shadow] stops noticing CPU speed from 1.8 GHz
  • [jellyfish] - behaves exactly like the entire glmark2 on average!
  • [shading- *] cease to notice the processor speed from 1.8 GHz
  • [pulsar] stops noticing processor speed from 2.8 GHz
    The remaining tests cease to notice the processor speed from 2.4..2.6 GHz, the most
    high result [conditionals-3] (it needs a fast processor, but a graphics card it almost does not load).

It is clear that this is a real life, but perhaps you should pay attention to optimizing some tests. Although, of course, etho can create a problem comparing results with old versions of the benchmark.

Unable to compile as C++11 or C++14

Your wscript file uses -Werror

That means glmark2 cannot be compiled with C++11 or later, because you use std::auto_ptr which produces warnings about deprecation since C++11.

You should either stop using -Werror by default (because you have no idea what warnings new compilers will find in your code, preventing users from building it just because they don't use the same compiler version as you) or add something like -Wno-deprecated-declarations to CXXFLAGS.

Building on Debian 9, does not have libjpeg8

I cannot build glmark2 on Debian 9 as stretch does not have libjpeg8. The waf configuration errors out with Checking for library jpeg : not found. Is there a workaround for getting libjpeg.so.8 library in place?

libjpeg not up to date

Hi,
Although seems not used,
libjpeg requires extensive use of simd instruction compilation and your libriary is not up to date
with latest compilation code,

thanks!
EM

main: Could not initialize canvas

While running the binary the issue was seen
command = glmark2
output = Error: main: Could not initialize canvas

command = glmark2-es2
output = Error: main: Could not initialize canvas

The ubuntu version which i am using is
$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

$uname -a
Linux rgx-hood-tc2-2 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

desktop benchmark

Hi,
quick question ,
in SceneDesktop::setup() , line 845, "Set up the screen and desktop RenderObjects " :
what is the use of priv_->screen ?
I can understand its use for offscreen , but not for regular screen rendering.
specifically , there is no RenderObject::fbo_ to apply to in the onscreen case

thanks ,
EM

Value array too small in create_blur_shaders

At scene-terrain/blur-renderer.cpp:87, the values array needs to be initialized to radius + 1 instead of radius to prevent to following two loops from falling off the ends of the array.

Broken on big-endian

On (e.g.) PowerPC, the src/model.cpp code (maybe also others) doesn't work properly - the application crashes with segfault. The code needs to convert endianity of the loaded numbers after reading from the 3ds (or whatever) format.

It appears that at least the "desktop" test works, fyi.

Call to eglGetPlatformDisplayEXT won't compile on some platforms

gl-state-egl.cpp contains the following:

        PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display =
            reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(
                eglGetProcAddress("eglGetPlatformDisplayEXT"));

        if (get_platform_display != nullptr) {
            egl_display_ = get_platform_display(
                GLMARK2_NATIVE_EGL_DISPLAY_ENUM, native_display_, NULL);
        }

Where native_display_ is of type EGLNativeDisplayType. This is incorrect, because EGLNativeDisplayType is not guaranteed to be convertible to void*: EGL/eglplatform.h defines it as intptr_t or int for some platforms.

texture loading changing format

Hi,
In the terrain benchmark, you are using jpg files : terrain - *.jpg
which are not up to date, so instead I tried to convert them to pngs , but they are not rendered correctly.

any advice on how to render the terrain correctly with png textures ?

atomic_read assertion failure

Just very briefly tried to compile 168d2f1 on an ubuntu 16.04.5 box and on first run, I see:

$ glmark2
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) Kabylake GT2 
    GL_VERSION:    3.0 Mesa 11.2.2
=======================================================
glmark2: intel_bufmgr_gem.c:1409: drm_intel_gem_bo_unreference: Assertion `atomic_read(&bo_gem->refcount) > 0' failed.
Aborted (core dumped)

Of course by default core dumps aren't actually created.

clang: 2 build errors, 1 build warning

Building glmark2 with clang has 2 errors, and 1 warning

The two errors are similar:

../src/image-reader.cpp:35:1: error: 'PNGReaderPrivate' defined as a struct here but previously declared as a class [-Werror,-Wmismatched-tags]
struct PNGReaderPrivate
^
/build/falco/tmp/portage/app-benchmarks/glmark2-285-r3/work/glmark2-285/src/image-reader.h:35:1: note: did you mean struct here?
class PNGReaderPrivate;
^~~~~
struct

../src/image-reader.cpp:284:1: error: 'JPEGReaderPrivate' defined as a struct here but previously declared as a class [-Werror,-Wmismatched-tags]
struct JPEGReaderPrivate
^
/build/falco/tmp/portage/app-benchmarks/glmark2-285-r3/work/glmark2-285/src/image-reader.h:57:1: note: did you mean struct here?
class JPEGReaderPrivate;
^~~~~
struct
2 errors generated.

And a warning:
../src/scene-buffer.cpp:187:12: error: private field 'wave_fill_' is not used [-Werror,-Wunused-private-field]
double wave_fill_;
^

glmark2 -display argument

This is not an issue, but a suggestion.
In mesa-utils we have -display argument to execute on a certain X display.
This is useful in remote benchmark cases or in embedded serial connection cases.
It would be great to have this option in glmark.

Thanks in advance

ndk-build yields error

Can anyone assist with the first step in building glmark2 for Android?
Typing in ndk-build results in the following:

jni/src/image-reader.cpp: In member function 'bool PNGReader::init(const string&)':
jni/src/image-reader.cpp:123:16: error: 'unique_ptr' in namespace 'std' does not name a template type
     const std::unique_ptr<std::istream> is_ptr(Util::get_resource(filename));
                ^
jni/src/image-reader.cpp:124:12: error: 'is_ptr' was not declared in this scope
     if (!(*is_ptr)) {
            ^
jni/src/image-reader.cpp:149:57: error: 'is_ptr' was not declared in this scope
     png_set_read_fn(priv_->png, reinterpret_cast<void*>(is_ptr.get()),
                                                         ^
make: *** [obj/local/armeabi/objs/glmark2-android/src/image-reader.o] Error 1

Unable to build on Raspberry PI

When I try to build on the Raspberry PI with dispmanx-gles2 i get the following error:

[ 5/67] Compiling src/libmatrix/log.cc
../src/gl-state-egl.cpp: In member function ‘bool GLStateEGL::gotValidDisplay()’:
../src/gl-state-egl.cpp:459:17: error: ‘GLMARK2_NATIVE_EGL_DISPLAY_ENUM’ was not declared in this scope
                 GLMARK2_NATIVE_EGL_DISPLAY_ENUM,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.