GNOME Bugzilla – Bug 740530
gstglapi.h:42:21: fatal error: EGL/egl.h: No such file or directory
Last modified: 2014-12-11 08:40:03 UTC
Trying to compile the 1.4 branch on a Raspberry Pi is giving the following errors: In file included from ../gstgl_fwd.h:26:0, from gstglwindow_dispmanx_egl.c:27: ../../../../gst-libs/gst/gl/gstglapi.h:42:21: fatal error: EGL/egl.h: No such file or directory I can get around it by doing make CPPFLAGS+='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' However I already did LDFLAGS='-L/opt/vc/lib' CFLAGS='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' CPPFLAGS='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh --disable-gtk-doc --disable-examples So I did not expect this for running make as well? Am I missing something or is this a bug in automake setup?
After build I'm getting the following error: (gst-plugin-scanner:1930): GStreamer-WARNING **: Failed to load plugin '/usr/local/lib/gstreamer-1.0/libgstopengl.so': /opt/vc/lib/libEGL.so: undefined symbol: glPointSizePointerOES doing : LD_PRELOAD=/opt/vc/lib/libGLESv2.so gst-inspect-1.0 gives: (gst-plugin-scanner:1970): GStreamer-WARNING **: Failed to load plugin '/usr/local/lib/gstreamer-1.0/libgstopengl.so': /usr/local/lib/libgstgl-1.0.so.0: undefined symbol: gst_gl_context_glx_new ** (gst-plugin-scanner:1970): ERROR **: Could not get Gst.Element ** (gst-plugin-scanner:1971): ERROR **: Could not get Gst.Element Isn't glx the X OpenGL extension?
There's a difference between CFLAGS=blah ./autogen.sh and ./autogen.sh CFLAGS=blah. The second form places the flags inside the automake files where as the first form requires that you pass the flags to make as well. > '/usr/local/lib/gstreamer-1.0/libgstopengl.so': /opt/vc/lib/libEGL.so: > undefined symbol: glPointSizePointerOES This suggests that you need to set LD_LIBRARY_PATH to include /opt/vc/lib so that the libraries can find each other. > '/usr/local/lib/gstreamer-1.0/libgstopengl.so': > /usr/local/lib/libgstgl-1.0.so.0: undefined symbol: gst_gl_context_glx_new Obviously it found some x11/glx files on your system and is trying to use them. You can disable them by passing --disable-glx --disable-x11 to ./configure. A config.log would be helpful in determining what it found.
K, that makes sense however passing these vars like that to autogen.sh results in configure: error: unrecognized option: `-I/opt/vc/include/interface/vcos/pthreads' Try `./configure --help' for more information configure failed It chokes on the spaces...
You probably need to surround the flags with an extra pair of quotes or some other shell escaping for autogen.sh or you could pass the flags to configure directly.
Yeah, I tried many types of escaping haven't found a working one yet. I did get it to compile again passing the vars to make directly. Still seeing linking errors Failed to load plugin '/usr/local/lib/gstreamer-1.0/libgstopengl.so': /opt/vc/lib/libEGL.so: undefined symbol: glPointSizePointerOES which are resolved by doing LD_PRELOAD=/opt/vc/lib/libGLESv2.so gst-inspect-1.0 The env contains LD_LIBRARY_PATH=/usr/local/lib/:/opt/vc/lib I don't understand why it does link I didn't have this much trouble when building the latest from git? I'm using a script to build gstreamer completely: https://gist.github.com/sphaero/02717b0b35501ad94863 Here's troublesome plugins-bad https://gist.github.com/sphaero/02717b0b35501ad94863#file-gstreamer-build-sh-L112 Here's troublesome omx: https://gist.github.com/sphaero/02717b0b35501ad94863#file-gstreamer-build-sh-L141
Are there any libGLESv2.so/libEGL.so, etc in /usr/local/lib because if there is, that will be used before the ones in /opt/vc/lib
nope, I also noticed that it didn't build GLES2 support. I'm adding --enable-egl --enable-gles2 However I expected that to be detected...
It conflicts with the mesa provided includes in raspbian. $ make CFLAGS+="-Wno-error -Wno-redundant-decls -I/opt/vc/include -I/opt/vc/include/interface/vc os/pthreads -I/opt/vc/include/interface/vmcs_host/linux" \ > CPPFLAGS+="-Wno-error -Wno-redundant-decls -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmc s_host/linux" \ > CXXFLAGS+="-Wno-redundant-decls" LDFLAGS+="-L/opt/vc/lib" (CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/pi/src/gstreamer/gst-plugins-bad/missing --run autoheader) rm -f stamp-h1 touch config.h.in cd . && /bin/bash ./config.status config.h config.status: creating config.h config.status: config.h is unchanged make all-recursive make[1]: Entering directory '/home/pi/src/gstreamer/gst-plugins-bad' Making all in gst-libs make[2]: Entering directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs' Making all in gst make[3]: Entering directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs/gst' Making all in interfaces make[4]: Entering directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs/gst/interfaces' make all-am make[5]: Entering directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs/gst/gl/dispmanx' CC libgstgl_dispmanx_la-gstglwindow_dispmanx_egl.lo In file included from ../../../../gst-libs/gst/gl/gstglapi.h:61:0, from ../gstgl_fwd.h:26, from gstglwindow_dispmanx_egl.c:27: /opt/vc/include/GLES2/gl2.h:65:26: error: conflicting types for 'GLintptr' ../../../../gst-libs/gst/gl/glprototypes/gstgl_compat.h:37:19: note: previous declaration of 'GLintptr' was here /opt/vc/include/GLES2/gl2.h:66:26: error: conflicting types for 'GLsizeiptr' ../../../../gst-libs/gst/gl/glprototypes/gstgl_compat.h:34:19: note: previous declaration of 'GLsizeiptr' was here In file included from /usr/include/GL/gl.h:2085:0, from ../../../../gst-libs/gst/gl/gstglapi.h:80, from ../gstgl_fwd.h:26, from gstglwindow_dispmanx_egl.c:27: /usr/include/GL/glext.h:5327:19: error: conflicting types for 'GLintptr' /opt/vc/include/GLES2/gl2.h:65:26: note: previous declaration of 'GLintptr' was here /usr/include/GL/glext.h:5328:19: error: conflicting types for 'GLsizeiptr' /opt/vc/include/GLES2/gl2.h:66:26: note: previous declaration of 'GLsizeiptr' was here In file included from /usr/include/GL/gl.h:2085:0, from ../../../../gst-libs/gst/gl/gstglapi.h:80, from ../gstgl_fwd.h:26, from gstglwindow_dispmanx_egl.c:27: /usr/include/GL/glext.h:5728:21: error: conflicting types for 'glBufferData' /opt/vc/include/GLES2/gl2.h:514:37: note: previous declaration of 'glBufferData' was here /usr/include/GL/glext.h:5729:21: error: conflicting types for 'glBufferSubData' /opt/vc/include/GLES2/gl2.h:515:37: note: previous declaration of 'glBufferSubData' was here Makefile:743: recipe for target 'libgstgl_dispmanx_la-gstglwindow_dispmanx_egl.lo' failed make[5]: *** [libgstgl_dispmanx_la-gstglwindow_dispmanx_egl.lo] Error 1 make[5]: Leaving directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs/gst/gl/dispmanx' Makefile:1107: recipe for target 'all-recursive' failed make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs/gst/gl' Makefile:706: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs/gst' Makefile:695: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/home/pi/src/gstreamer/gst-plugins-bad/gst-libs' Makefile:860: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/pi/src/gstreamer/gst-plugins-bad' Makefile:788: recipe for target 'all' failed make: *** [all] Error 2
Please attach the generated config.log file to this bug.
Created attachment 291351 [details] config.log from raspbian on a rpi
Heh, it's not disabling desktop GL support fully. You can workaround that by explicitly passing --disable-opengl to configure which means you don't need the --enable-egl --enable-gles2 flags anymore.
K, I finally got a successful execution. Although I think LDFLAGS+="-L/opt/vc/lib/ -lGLESv2 -lEGL" shouldn't be necessary, right? Weird that I didn't have so much trouble for git latest. I'm going to try a full clean build once more.
You might need LDFLAGS+="-L/opt/vc/lib" and maybe CPPFLAGS+="-I/opt/vc/include" (and maybe the same for CFLAGS), but the "-lGLESv2 -lEGL" should not be needed. Can you provide a config.log with setting the above (but not -lGLESv2 -lEGL)?
Created attachment 291632 [details] config.log from a rpi ./autogen.sh --disable-gtk-doc --disable-examples --disable-x11 --disable-glx --disable-glx --disable-opengl see install script: https://gist.github.com/sphaero/02717b0b35501ad94863
That looks good, does it work? :)
gst-launch-1.0 -v filesrc location=test.h264 ! decodebin ! queue ! glimagesink running smooth, ~35% cpu. That's good :) (omxplayer does <19% however) I still have test more omx pipelines as I'm having trouble with pipelines like: gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! decodebin ! queue ! glimagesink sync=false and a sender from a desktop: gst-launch-1.0 ximagesrc use-damage=false ! videoconvert ! x264enc ! rtph264pay ! udpsink host=nellie port=5000
Ow btw that example pipeline just gives a green screen with a tiny square in the top left showing random colors
That seems to work here without omx. If you could open a bug against gst-omx with your results of what works/doesn't that would be great.
Already fixed, the rpi can't handle h264 levels beyond 4.1. Thnx for assistance!