Opened 4 months ago
#10796 new defect
LTO does not work with --enable-opencl
Reported by: | Oneric | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | git-master | Keywords: | LTO |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When building with --enable-opencl --enable-lto the build fails on current git master bfa1b7577dd646e84acafd0c82a8c2c6fe9c2a0a.
It used to work in the past, I haven’t kept record of each time it worked but at least up until feeeefc3db04810286cd647f235ced0ec6c3eba8 it still worked (also built with gcc 12).
Changing --enable-opencl for --disable-opencl results in a successful build.
Full config:
% gcc --version gcc (Debian 12.2.0-14) 12.2.0 % ./configure --enable-lto --cc=gcc --ld=gcc --samples=fate-suite --disable-shared --enable-static --enable-opencl
Full error log:
/usr/bin/ld: /tmp/ccx7sf4o.ltrans4.ltrans.o: in function `avgblur_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_avgblur_opencl.c:62: undefined reference to `ff_source_avgblur_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans6.ltrans.o: in function `filter_frame.lto_priv.32': ./ffmpeg/libavfilter/vf_colorkey_opencl.c:53: undefined reference to `ff_source_colorkey_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans6.ltrans.o: in function `convolution_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_convolution_opencl.c:65: undefined reference to `ff_source_convolution_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans12.ltrans.o: in function `neighbor_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_neighbor_opencl.c:58: undefined reference to `ff_source_neighbor_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans12.ltrans.o: in function `overlay_opencl_blend': ./ffmpeg/libavfilter/vf_overlay_opencl.c:54: undefined reference to `ff_source_overlay_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans12.ltrans.o: in function `nlmeans_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_nlmeans_opencl.c:101: undefined reference to `ff_source_nlmeans_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans13.ltrans.o: in function `filter_frame.lto_priv.95': ./ffmpeg/libavfilter/vf_pad_opencl.c:95: undefined reference to `ff_source_pad_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans15.ltrans.o: in function `tonemap_opencl_init': ./ffmpeg/libavfilter/vf_tonemap_opencl.c:243: undefined reference to `ff_source_tonemap_cl' /usr/bin/ld: ./ffmpeg/libavfilter/vf_tonemap_opencl.c:244: undefined reference to `ff_source_colorspace_common_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans15.ltrans.o: in function `transpose_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_transpose_opencl.c:47: undefined reference to `ff_source_transpose_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans15.ltrans.o: in function `unsharp_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_unsharp_opencl.c:72: undefined reference to `ff_source_unsharp_cl' /usr/bin/ld: /tmp/ccx7sf4o.ltrans17.ltrans.o: in function `xfade_opencl_activate.lto_priv.0': ./ffmpeg/libavfilter/vf_xfade_opencl.c:96: undefined reference to `ff_source_xfade_cl' collect2: error: ld returned 1 exit status make: *** [Makefile:133: ffprobe_g] Error 1 make: *** Waiting for unfinished jobs.... /usr/bin/ld: /tmp/ccSOwh70.ltrans3.ltrans.o: in function `avgblur_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_avgblur_opencl.c:62: undefined reference to `ff_source_avgblur_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans5.ltrans.o: in function `filter_frame.lto_priv.32': ./ffmpeg/libavfilter/vf_colorkey_opencl.c:53: undefined reference to `ff_source_colorkey_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans5.ltrans.o: in function `convolution_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_convolution_opencl.c:65: undefined reference to `ff_source_convolution_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans11.ltrans.o: in function `neighbor_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_neighbor_opencl.c:58: undefined reference to `ff_source_neighbor_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans11.ltrans.o: in function `nlmeans_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_nlmeans_opencl.c:101: undefined reference to `ff_source_nlmeans_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans12.ltrans.o: in function `overlay_opencl_blend': ./ffmpeg/libavfilter/vf_overlay_opencl.c:54: undefined reference to `ff_source_overlay_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans12.ltrans.o: in function `filter_frame.lto_priv.95': ./ffmpeg/libavfilter/vf_pad_opencl.c:95: undefined reference to `ff_source_pad_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans14.ltrans.o: in function `tonemap_opencl_init': ./ffmpeg/libavfilter/vf_tonemap_opencl.c:243: undefined reference to `ff_source_tonemap_cl' /usr/bin/ld: ./ffmpeg/libavfilter/vf_tonemap_opencl.c:244: undefined reference to `ff_source_colorspace_common_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans14.ltrans.o: in function `transpose_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_transpose_opencl.c:47: undefined reference to `ff_source_transpose_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans14.ltrans.o: in function `unsharp_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_unsharp_opencl.c:72: undefined reference to `ff_source_unsharp_cl' /usr/bin/ld: /tmp/ccSOwh70.ltrans16.ltrans.o: in function `xfade_opencl_activate.lto_priv.0': ./ffmpeg/libavfilter/vf_xfade_opencl.c:96: undefined reference to `ff_source_xfade_cl' collect2: error: ld returned 1 exit status make: *** [Makefile:133: ffplay_g] Error 1 /usr/bin/ld: /tmp/ccqEzyPi.ltrans5.ltrans.o: in function `avgblur_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_avgblur_opencl.c:62: undefined reference to `ff_source_avgblur_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans7.ltrans.o: in function `filter_frame.lto_priv.32': ./ffmpeg/libavfilter/vf_colorkey_opencl.c:53: undefined reference to `ff_source_colorkey_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans7.ltrans.o: in function `convolution_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_convolution_opencl.c:65: undefined reference to `ff_source_convolution_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans13.ltrans.o: in function `neighbor_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_neighbor_opencl.c:58: undefined reference to `ff_source_neighbor_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans13.ltrans.o: in function `overlay_opencl_blend': ./ffmpeg/libavfilter/vf_overlay_opencl.c:54: undefined reference to `ff_source_overlay_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans13.ltrans.o: in function `nlmeans_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_nlmeans_opencl.c:101: undefined reference to `ff_source_nlmeans_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans14.ltrans.o: in function `filter_frame.lto_priv.95': ./ffmpeg/libavfilter/vf_pad_opencl.c:95: undefined reference to `ff_source_pad_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans16.ltrans.o: in function `tonemap_opencl_init': ./ffmpeg/libavfilter/vf_tonemap_opencl.c:243: undefined reference to `ff_source_tonemap_cl' /usr/bin/ld: ./ffmpeg/libavfilter/vf_tonemap_opencl.c:244: undefined reference to `ff_source_colorspace_common_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans16.ltrans.o: in function `transpose_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_transpose_opencl.c:47: undefined reference to `ff_source_transpose_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans16.ltrans.o: in function `unsharp_opencl_filter_frame.lto_priv.0': ./ffmpeg/libavfilter/vf_unsharp_opencl.c:72: undefined reference to `ff_source_unsharp_cl' /usr/bin/ld: /tmp/ccqEzyPi.ltrans18.ltrans.o: in function `xfade_opencl_activate.lto_priv.0': ./ffmpeg/libavfilter/vf_xfade_opencl.c:96: undefined reference to `ff_source_xfade_cl' collect2: error: ld returned 1 exit status
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Note:
See TracTickets
for help on using tickets.