GNOME Bugzilla – Bug 796205
testegl.c not building on rpi
Last modified: 2018-11-03 13:02:10 UTC
Trying to build gst-omx on the rpi: testegl.c:68:22: fatal error: bcm_host.h: No such file or directory This file is provided in /opt/vc/include/bcm_host.h I tried passing -I/opt/vc/include/ so it can find it but then I'm hitting multi declarations in their EGL headers: In file included from /opt/vc/include/interface/vcos/vcos.h:118:0, from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33, from /opt/vc/include/EGL/eglplatform.h:110, from /opt/vc/include/EGL/egl.h:36, from testegl.c:42: /opt/vc/include/interface/vcos/pthreads/vcos_platform.h:792:23: error: redundant redeclaration of ‘_vcos_thread_sem_wait’ [-Werror=redundant-decls] VCOS_INLINE_DECL void _vcos_thread_sem_wait(void); ^~~~~~~~~~~~~~~~~~~~~ /opt/vc/include/interface/vcos/pthreads/vcos_platform.h:644:6: note: previous definition of ‘_vcos_thread_sem_wait’ was here void _vcos_thread_sem_wait(void) { I'm not familiar with the rpi headers so I'm not sure of what's the proper fix here.
The rpi headers won't work without -Wno-error=redundant-decls. They are full of them.
Created attachment 372170 [details] [review] testegl: move up pi specific macros We need to define __VCCOREVER__ and disable redundant-decls before including the egl.h from the pi.
Created attachment 372171 [details] [review] testelg: include eglext.h Neded for the declaration of eglSaneChooseConfigBRCM().
Created attachment 372172 [details] [review] testegl: properly detect and use rpi specific libs Use pkg-config to detect and configure rpi specific libs used in testegl rather than hardcoding their flags.
Ping? Those patches fix this warning when build gst-omx master on the pi: ../examples/egl/testegl.c:451:7: warning: implicit declaration of function ‘eglSaneChooseConfigBRCM’ [-Wimplicit-function-declaration] eglSaneChooseConfigBRCM (state->display, attribute_list, &config, 1,
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-omx/issues/23.