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 784026 - gl: not finding bcm_host with meson
gl: not finding bcm_host with meson
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-21 09:20 UTC by Guillaume Desmottes
Modified: 2017-06-22 16:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gl: meson: use cc.find_library() to detect 'bcm_host' (1.04 KB, patch)
2017-06-21 09:20 UTC, Guillaume Desmottes
committed Details | Review
meson: Re-add pkg-config support for bcm_host (1.11 KB, patch)
2017-06-22 14:35 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
meson: Re-add pkg-config support for bcm_host (1.12 KB, patch)
2017-06-22 16:21 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Guillaume Desmottes 2017-06-21 09:20:22 UTC
I'm trying to build gst-plugins-bad on the raspberry pi using meson with:

- c_args ['-I/opt/vc/include', '-I/opt/vc/include/interface/vcos/pthreads', '-I/opt/vc/include/interface/vmcs_host/linux']
- c_link_args ['-L/opt/vc/lib']
- with_gl_api gles2
- with_gl_platform egl
- with_gl_winsys dispmanx

Meson isn't able to find bcm_host as no pkg-config file is provided. We use AC_CHECK_LIB with the autotools so I think we should use cc.find_library() instead of dependency()
Comment 1 Guillaume Desmottes 2017-06-21 09:20:48 UTC
Created attachment 354142 [details] [review]
gl: meson: use cc.find_library() to detect 'bcm_host'

On the raspberry pi no pkg-config file is provided for the bcm_host
library. We are using AC_CHECK_LIB to detect this lib with autotools,
cc.find_library() library is a closer meson equivalent.
Comment 2 Nicolas Dufresne (ndufresne) 2017-06-21 15:44:39 UTC
Attachment 354142 [details] pushed as 859daad - gl: meson: use cc.find_library() to detect 'bcm_host'
Comment 3 Sebastian Dröge (slomo) 2017-06-21 16:18:33 UTC
Isn't there a pkg-config file for this stuff now in later versions?
Comment 4 Nicolas Dufresne (ndufresne) 2017-06-21 17:49:11 UTC
That I don't know, I expected this patch to be right since this is what we do in configure.ac. We don't even try to get a pkg-config in there. Worst case, it won't be hard to implement a pkg-config check with fallback to find_library. Just let us know if it matters.
Comment 5 Sebastian Dröge (slomo) 2017-06-22 08:52:13 UTC
pkg-config would have the advantage to also allow picking up CFLAGS, LDFLAGS, etc as needed without you having to provide them yourself. I think checking for both would be useful, unless everybody ships with the pkg-config files by now.
Comment 6 Guillaume Desmottes 2017-06-22 08:52:50 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> Isn't there a pkg-config file for this stuff now in later versions?

Not in the latest raspbian Jessie. Are you using another distribution on pi ?
Comment 7 Matthew Waters (ystreet00) 2017-06-22 14:00:17 UTC
Yes, later raspberrypi-userland has .pc files in them which you should use.  The pushed patch is incorrect as it should try dependency(), then find_library().
Comment 8 Nicolas Dufresne (ndufresne) 2017-06-22 14:23:11 UTC
Its a bit of an exaggeration, previously it did not work on the recommended distro now it works on both, but I take your point and will write the fallback.
Comment 9 Nicolas Dufresne (ndufresne) 2017-06-22 14:35:22 UTC
Created attachment 354250 [details] [review]
meson: Re-add pkg-config support for bcm_host

Now we just fallback to find_library for Rasbian jessy and older.
Comment 10 Guillaume Desmottes 2017-06-22 15:45:26 UTC
Review of attachment 354250 [details] [review]:

::: gst-libs/gst/gl/meson.build
@@ +521,3 @@
+  # support older distribution
+  bcm_host_dep = dependency('bcm_host', required : false)
+  if not bcm_host_dep.fount()

should be .found()
Comment 11 Nicolas Dufresne (ndufresne) 2017-06-22 16:21:49 UTC
Created attachment 354256 [details] [review]
meson: Re-add pkg-config support for bcm_host

v2: Actually tested it this time, sorry. fount->found and added missing
endif, this is not Python or C.
Comment 12 Nicolas Dufresne (ndufresne) 2017-06-22 16:23:46 UTC
Attachment 354256 [details] pushed as 55e701a - meson: Re-add pkg-config support for bcm_host