Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 820116 - media-video/pipewire-0.3.39 does not have an option to disable building pipewire-v4l2
Summary: media-video/pipewire-0.3.39 does not have an option to disable building pipew...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Sam James
URL: https://gitlab.freedesktop.org/pipewi...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-25 05:42 UTC by Jason Chan
Modified: 2022-12-02 05:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log of pipewire-0.3.39 showing pipewire-v4l2 being built (pipewire-0.3.39.log.xz,29.68 KB, application/x-xz)
2021-10-25 05:58 UTC, Jason Chan
Details
Build log with pipewire-v4l2 disabled (pipewire-0.3.39-no-pipewire-v4l2.log.xz,29.64 KB, application/x-xz)
2021-10-25 05:59 UTC, Jason Chan
Details
-O3 -flto -fno-semantic-interposition (pipewire-0.3.30-v4l2-fno-semantic-interposition-fail.log,480.78 KB, text/x-log)
2021-10-25 06:08 UTC, Jason Chan
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ;)