GNOME Bugzilla – Bug 781606
testegl-testegl.o: undefined reference to symbol 'glUniformMatrix4fv'
Last modified: 2017-12-11 17:05:16 UTC
gst-omx from git master fails to build on Raspbian Jesse with the following error: /usr/local/gcc-6.2.0/bin/ld: testegl-testegl.o: undefined reference to symbol 'glUniformMatrix4fv' /opt/vc/lib/libGLESv2.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status The symbols are provided on the RPi as follows: pi@towerofpi9:/opt/vc$ find . -type f -name "*.so*" | xargs nm -o 2>/dev/null | grep glUniformMatrix4fv ./lib/libGLESv2.so:0000f29c T glUniformMatrix4fv ./lib/libbrcmGLESv2.so:0000f2a4 T glUniformMatrix4fv It appears that the gstreamer build is passing the libraries in the wrong order, thus causing the breakage. Not a clue what the right order is, alas.
Hack workaround: diff --git a/examples/egl/Makefile.am b/examples/egl/Makefile.am index 2646cba..e81945e 100644 --- a/examples/egl/Makefile.am +++ b/examples/egl/Makefile.am @@ -1,9 +1,5 @@ noinst_PROGRAMS = -if USE_OMX_TARGET_RPI -noinst_PROGRAMS += testegl -endif - testegl_SOURCES = testegl.c noinst_HEADERS = cube_texture_and_coords.h
I'd built gst-omx 1.11.90 the following way: EXTRA_PATH=/usr if [ -d /opt/vc ] then EXTRA_PATH=/opt/vc fi export CFLAGS="-I$EXTRA_PATH/include -I$EXTRA_PATH/include/interface/vcos/pthreads \ -I$EXTRA_PATH/include/interface/vmcs_host/linux -I$EXTRA_PATH/include/EGL \ -I$EXTRA_PATH/include/GLES -I$EXTRA_PATH/include/GLES2" export LDFLAGS="-L$EXTRA_PATH/lib -lGLESv2 -lEGL -lbcm_host" ./autogen.sh --with-omx-target=rpi --with-omx-header-path=$EXTRA_PATH/include/IL The issue come from a change in gst-plugins-bad/gstgl that no longer has "-lGLESv2" in their exported LDFLAGS.
The real bug here is to call glUniformMatrix4fv() directly. One should use the function table instead.
commit 71ddf32df9a80cbf20e719fa144b8ed52e784eeb Author: Julien Isorce <jisorce@oblong.com> Date: Tue Aug 22 13:48:26 2017 +0100 example: port testegl.c to desktop Will be easier to maintain. Also uniformize autotool build with meson build which is already retrieving the gl libs. https://bugzilla.gnome.org/show_bug.cgi?id=781606