Hi there,
In this board (Pandaboard_ES, OMAP4 CortexA9 based “desktop” board) I have Ubuntu 12.04 running, with the extra PVR packages installed. TI provided it’s own EGL, GLES, libgbm, etc… implementations, and they are all installed, along with the corresponding dev headers.
I’m trying to replicate my Rpi scenario: an x-less enviroment with RetroArch running on KMS + EGL. So these are my configure parameters:
./configure --disable-x11 --disable-oss --disable-pulse --disable-sdl --enable-floathard --disable-opengl --enable-kms --enable-egl
But it results on this:
Checking operating system ... Linux
Checking for suitable working C compiler ... /usr/bin/gcc
Checking for suitable working C++ compiler ... /usr/bin/g++
Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-variable in /usr/bin/gcc ... yes
Checking function bcm_host_init in -lbcm_host ... no
Checking for pkg-config ... /usr/bin/pkg-config
Checking presence of package egl ... yes
Checking function pthread_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function socket in -lc ... yes
Checking function getaddrinfo in -lc ... yes
Checking function fcntl in -lc ... yes
Checking function getopt_long in -lc ... yes
Checking presence of package alsa ... no
Checking presence of header file soundcard.h ... no
Checking existence of -lossaudio ... no
Checking function alcOpenDevice in -lopenal ... no
Checking presence of package rsound with minimum version 1.1 ... no
Checking presence of package libroar ... no
Checking presence of package jack with minimum version 0.120.1 ... no
Checking function AudioUnitInitialize in -framework AudioUnit ... no
Ignoring Cg. Desktop OpenGL is not enabled.
SDL is disabled. Disabling SDL_image.
Checking presence of package zlib ... no
Checking presence of package libavcodec with minimum version 54 ... no
Checking presence of package libavformat with minimum version 54 ... no
Checking presence of package libavutil with minimum version 51 ... no
Checking presence of package libswscale with minimum version 2.1 ... no
Checking function dlopen in -ldl ... yes
Checking presence of package gbm with minimum version 9.0 ... no
Checking presence of package libdrm ... yes
Cannot find libgbm, libdrm and EGL libraries required for KMS. Compile without --enable-kms.
Ok, as you can see, it says:
Checking presence of package gbm with minimum version 9.0 … no
…but gbm seems to be installed:
root@localhost:~/retro/RetroArch# dpkg -l |grep libgbm-dev
ii libgbm-dev 9.0.0-8 generic buffer management API -- runtime
root@localhost:~/retro/RetroArch# dpkg -l |grep libgbm1
ii libgbm1 9.0.0-8 generic buffer management API -- runtime
These are, in fact, TI’s versions:
root@localhost:~/retro/RetroArch# apt-cache show libgbm1
Package: libgbm1
Source: libgbm
Priority: optional
Section: libs
Installed-Size: 42
Maintainer: TI OMAP Developers <[email protected]>
Architecture: armhf
Version: 9.0.0-8
Depends: libc6 (>= 2.15-0ubuntu8), libudev0 (>= 147)
Filename: pool/main/libg/libgbm/libgbm1_9.0.0-8_armhf.deb
Size: 7040
MD5sum: 1e4494870d8aad6b0675f25dc9ba9f18
SHA1: a3916e4f887a1c7e8b19489aba48fb33186c4ceb
SHA256: 0c42de598dc811fd82d584d656c9fcfdaace8cf6b4077eb966f1a9888b8a2bf0
Description: generic buffer management API -- runtime
This is the gbm frontend used by (for example) weston compositor to
load the GLES stack, and retrieve the backing buffer objects behind
an eglImage (created with EGL_WAYLAND_BUFFER_WL), etc.
Package: libgbm1
Priority: optional
Section: libs
Installed-Size: 2911
Maintainer: Ubuntu X-SWAT <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Architecture: armhf
Source: mesa
Version: 8.0.4-0ubuntu0.6
Depends: libc6 (>= 2.15-0ubuntu8), libdrm-nouveau1a (>= 2.4.23), libdrm2 (>= 2.4.3), libgcc1 (>= 1:4.4.0), libstdc++6 (>= )
Pre-Depends: multiarch-support
Filename: pool/main/m/mesa/libgbm1_8.0.4-0ubuntu0.6_armhf.deb
Size: 786994
MD5sum: 405d3af9bee8f851d585ed4cd5291727
SHA1: 8d3cc9d0deefe7361286758812ea4485435deac6
SHA256: 2d562685fe634abaa863583ae52652f90c05679ef6e3994219b6d3acd7e1c8c5
Description-en: generic buffer management API -- runtime
This package contains the GBM buffer management library. It provides a
mechanism for allocating buffers for graphics rendering tied to Mesa.
.
GBM is intended to be used as a native platform for EGL on drm or openwfd.
Multi-Arch: same
Homepage: http://mesa3d.sourceforge.net/
Description-md5: 9c1f8de2c17715ff7ed9524db86be4dd
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-usb,g
Package: libgbm1
Priority: optional
Section: libs
Installed-Size: 2906
Maintainer: Ubuntu X-SWAT <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Architecture: armhf
Source: mesa
Version: 8.0.2-0ubuntu3
Depends: libc6 (>= 2.4), libdrm-nouveau1a (>= 2.4.23), libdrm2 (>= 2.4.3), libgcc1 (>= 1:4.4.0), libstdc++6 (>= 4.3.0), li)
Pre-Depends: multiarch-support
Filename: pool/main/m/mesa/libgbm1_8.0.2-0ubuntu3_armhf.deb
Size: 786412
MD5sum: c35deaf25f3cc7ebaf736bd35ef374d6
SHA1: f1d7938ee59c1564410ec6eb44abd8a1a6d8ed54
SHA256: 80a2b46210eb262847f0fb8a0bf963e46c7eadd1afcf496cbcf405811b8fa82e
Description-en: generic buffer management API -- runtime
This package contains the GBM buffer management library. It provides a
mechanism for allocating buffers for graphics rendering tied to Mesa.
.
GBM is intended to be used as a native platform for EGL on drm or openwfd.
Multi-Arch: same
Homepage: http://mesa3d.sourceforge.net/
Description-md5: 9c1f8de2c17715ff7ed9524db86be4dd
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-usb
And for libgbm-dev:
root@localhost:~/retro/RetroArch# apt-cache show libgbm-dev
Package: libgbm-dev
Source: libgbm
Priority: optional
Section: libdevel
Installed-Size: 61
Maintainer: TI OMAP Developers <[email protected]>
Architecture: armhf
Version: 9.0.0-8
Depends: libgbm1 (= 9.0.0-8), libudev-dev
Filename: pool/main/libg/libgbm/libgbm-dev_9.0.0-8_armhf.deb
Size: 6982
MD5sum: 2bb214423c8f19baa78461b262bd8134
SHA1: a2a003d0db0a0c2b9d05722fb5845f1870be42e2
SHA256: efba0938f4819d443671ac0eeeb0d48af91b57077beae4ad1f61624d215d539c
Description: generic buffer management API -- runtime
This is the gbm frontend used by (for example) weston compositor to
load the GLES stack, and retrieve the backing buffer objects behind
an eglImage (created with EGL_WAYLAND_BUFFER_WL), etc.
Package: libgbm-dev
Priority: optional
Section: libdevel
Installed-Size: 90
Maintainer: Ubuntu X-SWAT <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Architecture: armhf
Source: mesa
Version: 8.0.4-0ubuntu0.6
Depends: libgbm1 (= 8.0.4-0ubuntu0.6), libudev-dev
Filename: pool/main/m/mesa/libgbm-dev_8.0.4-0ubuntu0.6_armhf.deb
Size: 6040
MD5sum: a8b5cb369fa89c9a7575a2a7dbe7157e
SHA1: f43c4ca534b76127459a5d42049d86e44a6d1f04
SHA256: fdf9ee76a28011882e1a2202320933f295d78e2cbe8b235f20f26b3d4c5b26b8
Description-en: generic buffer management API -- development files
This package contains the GBM buffer management library. It provides a
mechanism for allocating buffers for graphics rendering tied to Mesa.
.
GBM is intended to be used as a native platform for EGL on drm or openwfd.
.
This package provides the development environment for compiling programs
against the GBM library.
Homepage: http://mesa3d.sourceforge.net/
Description-md5: 97d3ae24c3bec4dfba8e29c665cda9e5
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Package: libgbm-dev
Priority: optional
Section: libdevel
Installed-Size: 89
Maintainer: Ubuntu X-SWAT <[email protected]>
Original-Maintainer: Debian X Strike Force <[email protected]>
Architecture: armhf
Source: mesa
Version: 8.0.2-0ubuntu3
Depends: libgbm1 (= 8.0.2-0ubuntu3), libudev-dev
Filename: pool/main/m/mesa/libgbm-dev_8.0.2-0ubuntu3_armhf.deb
Size: 6024
MD5sum: 8f765e7da455e00000602ce3caeee642
SHA1: 2e3f090cae7376955f0de97f4bde0522b0421623
SHA256: 26090e03d32a58cdc10ef6a6b250024920e83eaab6910351cfd483f51197a58a
Description-en: generic buffer management API -- development files
This package contains the GBM buffer management library. It provides a
mechanism for allocating buffers for graphics rendering tied to Mesa.
.
GBM is intended to be used as a native platform for EGL on drm or openwfd.
.
This package provides the development environment for compiling programs
against the GBM library.
Homepage: http://mesa3d.sourceforge.net/
Description-md5: 97d3ae24c3bec4dfba8e29c665cda9e5
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
But, as you can see, versions should be usable by the configure script.
OK, if I choose GLES instead of KMS+EGL, I can run the configure script and it completes:
./configure --disable-x11 --disable-oss --disable-pulse --disable-sdl --disable-opengl --disable-egl --disable-kms --enable-gles
Checking operating system ... Linux
Checking for suitable working C compiler ... /usr/bin/gcc
Checking for suitable working C++ compiler ... /usr/bin/g++
Checking for availability of switch -std=gnu99 in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-result in /usr/bin/gcc ... yes
Checking for availability of switch -Wno-unused-variable in /usr/bin/gcc ... yes
Checking function bcm_host_init in -lbcm_host ... no
Checking function pthread_create in -lpthread ... yes
Checking function dlopen in -ldl ... yes
Checking function socket in -lc ... yes
Checking function getaddrinfo in -lc ... yes
Checking function fcntl in -lc ... yes
Checking function getopt_long in -lc ... yes
Checking for pkg-config ... /usr/bin/pkg-config
Checking presence of package alsa ... no
Checking presence of header file soundcard.h ... no
Checking existence of -lossaudio ... no
Checking function alcOpenDevice in -lopenal ... no
Checking presence of package rsound with minimum version 1.1 ... no
Checking presence of package libroar ... no
Checking presence of package jack with minimum version 0.120.1 ... no
Checking function AudioUnitInitialize in -framework AudioUnit ... no
Ignoring Cg. Desktop OpenGL is not enabled.
SDL is disabled. Disabling SDL_image.
Checking presence of package zlib ... no
Checking presence of package libavcodec with minimum version 54 ... no
Checking presence of package libavformat with minimum version 54 ... no
Checking presence of package libavutil with minimum version 51 ... no
Checking presence of package libswscale with minimum version 2.1 ... no
Checking function dlopen in -ldl ... yes
Checking presence of package libxml-2.0 ... no
Checking function glFramebufferTexture2D in -lGL ... no
Checking presence of package freetype2 ... no
X11, Xext or xf86vm not present. Skipping X11 code paths.
Checking function strlcpy in -lc ... no
Checking presence of package python3 ... no
Creating make config: config.mk
Creating config header: config.h
…but it fails at compiling:
root@localhost:~/retro/RetroArch# make
CC frontend/frontend.c
CC frontend/frontend_context.c
In file included from frontend/menu/rgui.h:21:0,
from frontend/frontend_context.h:28,
from frontend/frontend_context.c:16:
frontend/menu/menu_common.h:271:4: error: unknown type name 'rarch_time_t'
make: *** [frontend/frontend_context.o] Error 1
So, how can I build with KMS+EGL? What am I missing? Pandaboard included KMS+EGL examples work, like this one:
And why does disabling “desktop OpenGL” (ie using --disable-opengl) break compilation that way? Is that expected? Shouldn’t it compile against GLES, too?