Summary: | media-video/ffmpeg-4.4.4-r3[libv4l] fails to compile (in v4l2.c) with musl | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nick Doyle <njd.dev> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | ionen, w12101111, waltercool |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Nick Doyle
2023-07-30 14:06:58 UTC
Created attachment 866676 [details]
build.log
(In reply to 12101111 from comment #2) > Fixed by upstream: > https://github.com/FFmpeg/FFmpeg/commit/00b64fca55a3a009c9d0e391c85f4fd3291e5d12 It actually isn't (tested with ffmpeg-7.1.1 and musl), there's two issues. First to clarify, USE=v4l and USE=libv4l are different, the former only uses linux-headers, the latter uses media-libs/libv4l. USE=v4l's issue (bug #940733) is indeed fixed by the above commit which properly detects it (7.1 ebuild is trying to pass -DHAVE_POSIX_IOCTL like it did for -D__musl__ but it actually does not need to, it works). By doing so, struct video_data uses the one without unsigned long int: int (*ioctl_f)(int fd, int request, ...) Then, if USE=libv4l is enabled, that SET_WRAPPERS(v4l2_) macro will create: s->ioctl_f = v4l2_ioctl 's' is a video_data struct, and if we look at v42l_ioctl in system's libv4l2.h: LIBV4L_PUBLIC int v4l2_ioctl(int fd, unsigned long int request, ...); ... and that's a mismatch with the POSIX one that got enabled. Might add that this also happens with gcc14 nowadays which does not like this either. Also, given this can use both types at same time, without HAVE_POSIX_IOCTL it'll just fail on the 2nd one. if (s->use_libv4l2) { SET_WRAPPERS(v4l2_); } else { SET_WRAPPERS(); May opt to simply mask the USE until we have a proper solution. |