After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781606 - testegl-testegl.o: undefined reference to symbol 'glUniformMatrix4fv'
testegl-testegl.o: undefined reference to symbol 'glUniformMatrix4fv'
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-22 11:59 UTC by minfrin
Modified: 2017-12-11 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description minfrin 2017-04-22 11:59:15 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.
Comment 1 minfrin 2017-04-22 12:02:30 UTC
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
Comment 2 Josep Torra Valles 2017-04-23 21:24:01 UTC
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.
Comment 3 Nicolas Dufresne (ndufresne) 2017-04-23 23:40:23 UTC
The real bug here is to call glUniformMatrix4fv() directly. One should use the function table instead.
Comment 4 Julien Isorce 2017-12-11 17:05:16 UTC
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