Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 782553 - media-video/ffmpeg-4.4[opencl] possible race condition (tools/cl2c: line 27: libavfilter/opencl/colorkey.c: No such file or directory)
Summary: media-video/ffmpeg-4.4[opencl] possible race condition (tools/cl2c: line 27: ...
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: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 835497 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-12 18:22 UTC by Samuel Bernardo
Modified: 2022-03-17 09:56 UTC (History)
3 users (show)

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


Attachments
build log (build.log,66.91 KB, text/plain)
2021-04-12 18:24 UTC, Samuel Bernardo
Details
emerge info (emerge.info,9.49 KB, text/plain)
2021-04-12 18:24 UTC, Samuel Bernardo
Details
emerge -pqv (emerge.pqv,1.15 KB, text/plain)
2021-04-12 18:25 UTC, Samuel Bernardo
Details
ffmpeg-4.4.1-opencl-parallel-make-workaround.patch (ffmpeg-4.4.1-opencl-parallel-make-workaround.patch,388 bytes, patch)
2022-03-03 02:59 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Bernardo 2021-04-12 18:22:28 UTC
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 27: libavfilter/opencl/colorkey.c: No such file or directory
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 27: libavfilter/opencl/avgblur.c: No such file or directory
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 34: libavfilter/opencl/avgblur.c: No such file or directory
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 34: libavfilter/opencl/colorkey.c: No such file or directory
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 36: libavfilter/opencl/colorkey.c: No such file or directory
make: *** [/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/libavfilter/Makefile:569: libavfilter/opencl/colorkey.c] Error 1
make: *** Waiting for unfinished jobs....
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 36: libavfilter/opencl/avgblur.c: No such file or directory
make: *** [/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/libavfilter/Makefile:569: libavfilter/opencl/avgblur.c] Error 1
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 27: libavfilter/opencl/colorspace_common.c: No such file or directory
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 34: libavfilter/opencl/colorspace_common.c: No such file or directory
/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/tools/cl2c: line 36: libavfilter/opencl/colorspace_common.c: No such file or directory
make: *** [/var/tmp/portage/media-video/ffmpeg-4.4/work/ffmpeg-4.4/libavfilter/Makefile:569: libavfilter/opencl/colorspace_common.c] Error 1
 * ERROR: media-video/ffmpeg-4.4::gentoo failed (compile phase):
 *   emake failed
Comment 1 Samuel Bernardo 2021-04-12 18:24:42 UTC
Created attachment 699489 [details]
build log
Comment 2 Samuel Bernardo 2021-04-12 18:24:54 UTC
Created attachment 699492 [details]
emerge info
Comment 3 Samuel Bernardo 2021-04-12 18:25:07 UTC
Created attachment 699495 [details]
emerge -pqv
Comment 4 Ionen Wolkens gentoo-dev 2021-04-12 20:17:52 UTC
Race condition? In my own logs, before these I see:

    mkdir -p libavfilter/opencl/

..but it's missing here.

Try with some other MAKEOPTS values, or MAKEOPTS="-j1" to be sure.
Comment 5 Samuel Bernardo 2021-04-12 21:46:12 UTC
Thank you Ionen, I will try that way after the emerge world finishes.
Comment 6 Samuel Bernardo 2021-04-12 23:12:49 UTC
Yes, with MAKEOPTS="-j1" solved the issue. Compiled and installed with success after that.
Comment 7 Tomasz Golinski 2021-12-09 12:07:10 UTC
I had the same problem with ffmpeg-4.4-r1. My makeopts were rather excessive (due to distcc which was not running at the time): MAKEOPTS="-j20 -l4". I tuned them down to -j6 -l4 and I was able to build the package successfully.
Comment 8 Peter Levine 2022-03-03 02:59:22 UTC
Created attachment 766170 [details, diff]
ffmpeg-4.4.1-opencl-parallel-make-workaround.patch

Not sure exactly where the bug is but forcing `make` serialization of .c file generation in libavfilter/opencl seems to work around it.
Comment 9 Michael Moon 2022-03-07 14:03:19 UTC
I just ran into this today with ffmpeg-4.4.1-r2 and -j8, the patch from comment #8 seems to solve it - but ffmpeg takes significantly longer to compile!

4 minutes → 14 minutes :/
Comment 10 Ionen Wolkens gentoo-dev 2022-03-17 09:56:04 UTC
*** Bug 835497 has been marked as a duplicate of this bug. ***