Bug 13786

Summary: gstreamer build not determinstic (setcap)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Richard Purdie <richard.purdie>
Component: multimediaAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alex.kanavin, crg7475, meta.mr.watcher, meta.watcher, randy.macleod
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Richard Purdie 2020-02-06 23:20:51 UTC
The gstreamer build (gstreamer1.0_1.16.1.bb) is showing determinism issues depending on whether setcap is installed on the buildhost or not. The autotools fix would be:

# setcap may not exist on the host
CACHED_CONFIGUREVARS = "ac_cv_path_SETCAP=${sbindir}"

Unfortunately I don't know the meson equivalent.

The diffoscope difference shows a dependency on libcap in some builds and not in others.
Comment 1 Carlos Rafael Giani 2020-02-07 06:12:55 UTC
The relevant location in the meson based builds is here: https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/master/libs/gst/helpers/meson.build#L67

This meson.build file also contains PTP related checks that may similarly cause nondeterministic builds, though I am not sure this really is the case. Worth checking too.
Comment 2 Alexander Kanavin 2020-02-19 15:38:32 UTC
I think simply adding a dependency on whatever native recipe provides setcap, and then making sure target libcap is there as well should be enough?
Comment 3 Alexander Kanavin 2020-02-19 15:38:58 UTC
Reading that meson code, it does look for setcap in PATH first before falling back to hardcoded host paths.