Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 820116

Summary: media-video/pipewire-0.3.39 does not have an option to disable building pipewire-v4l2
Product: Gentoo Linux Reporter: Jason Chan <graysonchsi>
Component: Current packagesAssignee: Sam James <sam>
Status: UNCONFIRMED ---    
Severity: normal CC: 89q1r14hd, asturm, kajanos, leio
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gitlab.freedesktop.org/pipewire/pipewire/-/compare/0.3.38...0.3.39?from_project_id=4753&page=3&view=inline#ca9bb7eff80503c97c83505e8acea4002fd87ac6
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log of pipewire-0.3.39 showing pipewire-v4l2 being built
Build log with pipewire-v4l2 disabled
-O3 -flto -fno-semantic-interposition

Description Jason Chan 2021-10-25 05:42:38 UTC
media-video/pipewire-0.3.39 has added a meson option named 'pipewire-v4l2', enabled by default. pipewire-v4l2 is a separate option from v4l2 in meson_options.txt.

I suggest to add:

$(meson_native_use_feature pipewire-v4l pipewire-v4l2)

to emesonargs, along with the associated USE flag and depends.

Reproducible: Always

Steps to Reproduce:
1. # USE="bluetooth doc extra gstreamer pipewire-alsa systemd -echo-cancel -jack-client -jack-sdk -test -v4l" emerge "=media-video/pipewire-0.3.39"
Actual Results:  
Unexpected v4l integration added.

Expected Results:  
No v4l integration or dependencies needed.

emerge --info | head -n1
Portage 3.0.28 (python 3.8.12-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.2.0, glibc-2.33-r7, linux-5.10.40 x86_64)

When using custom *FLAGS to build, pipewire-v4l2 fails to build. Won't open a separate issue for this since it should be sent to upstream. There are also many compiler warnings when using the Gentoo default *FLAGS.
Comment 1 Jason Chan 2021-10-25 05:58:52 UTC
Created attachment 746553 [details]
Build log of pipewire-0.3.39 showing pipewire-v4l2 being built
Comment 2 Jason Chan 2021-10-25 05:59:29 UTC
Created attachment 746556 [details]
Build log with pipewire-v4l2 disabled
Comment 3 Jason Chan 2021-10-25 06:08:40 UTC
Created attachment 746559 [details]
-O3 -flto -fno-semantic-interposition
Comment 4 Niklāvs Koļesņikovs 2021-10-25 14:47:36 UTC
The first two logs show the package configuring, so no action to take. ;)
The third log is failure that's almost certainly due to weird flags and may not even count as a bug but I don't know since you're using some _weird_ flags.

It is not imppossible that I have missed one of the pw-v4l2 source files including a V4L2 specific header but a quick glance only finds /usr/include/linux/videodev2.h which belongs to sys-kernel/linux-headers package. If you could provide a log that showed a missing include or library, that would help to pinpoint and fix the issue (if there is such). ;)

Furthermore I checked the Portage recorded dependencies and I'm not seeing any dynamic linking with anything V4L2:
/usr/lib64/pipewire-0.3/v4l2/libpw-v4l2.so libpipewire-0.3.so.0,libdl.so.2,libpthread.so.0,libc.so.6

pw-v4l2 is a very small program that has no perceivable impact on compile time and is currently not known to have anything but the most common and trivial dependencies that are always satisfied - therefore per Gentoo guidelines it should not be controlled by a USE flag. You can use `MYMESONARGS="-Dpipewire-v4l2=disabled" emerge -v1 media-video/pipewire` to work around that (untested but seems like I got the syntax right) but it looks like you already knew that.

Because v4l IUSE is already present, it would be okay to add it under that but the two features are actually orthogonal to one another (PipeWire can in theory use libcamera while exposing emulated v4l2 interface to clients). As far as I'm concerned, you'll need to find an actual reason why we should not follow upstream choice and always build pw-v4l2.

Therefore I recommend closing this as NEEDINFO (or straight to NOTABUG).
Comment 5 Niklāvs Koļesņikovs 2021-10-25 14:48:21 UTC
Sorry the early typo, I meant the logs show the package building and passing all the tests not configuring. ;)