AnimMouse / ffmpeg-stable-autobuild

Automated stable nonfree builds of FFmpeg for Windows using GitHub Actions
https://www.animmouse.com/projects/ffmpeg-stable-autobuild/
Mozilla Public License 2.0
203 stars 8 forks source link

Win32 build failing due to libdav1d #60

Closed AnimMouse closed 3 years ago

AnimMouse commented 3 years ago
CC  libavcodec/libdav1d.o
libavcodec/libdav1d.c: In function 'libdav1d_init':
libavcodec/libdav1d.c:148:7: error: 'Dav1dSettings' has no member named 'n_tile_threads'; did you mean 'n_threads'?
  148 |     s.n_tile_threads = dav1d->tile_threads
      |       ^~~~~~~~~~~~~~
      |       n_threads
In file included from ./libavutil/avutil.h:296,
                 from ./libavutil/avassert.h:31,
                 from libavcodec/libdav1d.c:24:
libavcodec/libdav1d.c:150:52: error: 'DAV1D_MAX_TILE_THREADS' undeclared (first use in this function); did you mean 'DAV1D_MAX_THREADS'?
  150 |                      : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
./libavutil/common.h:105:28: note: in definition of macro 'FFMIN'
  105 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                            ^
libavcodec/libdav1d.c:150:52: note: each undeclared identifier is reported only once for each function it appears in
  150 |                      : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
./libavutil/common.h:105:28: note: in definition of macro 'FFMIN'
  105 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                            ^
libavcodec/libdav1d.c:151:6: error: 'Dav1dSettings' has no member named 'n_frame_threads'
  151 |     s.n_frame_threads = dav1d->frame_threads
      |      ^
In file included from ./libavutil/avutil.h:296,
                 from ./libavutil/avassert.h:31,
                 from libavcodec/libdav1d.c:24:
libavcodec/libdav1d.c:153:48: error: 'Dav1dSettings' has no member named 'n_tile_threads'; did you mean 'n_threads'?
  153 |                       : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);
      |                                                ^~~~~~~~~~~~~~
./libavutil/common.h:105:22: note: in definition of macro 'FFMIN'
  105 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                      ^
libavcodec/libdav1d.c:153:65: error: 'DAV1D_MAX_FRAME_THREADS' undeclared (first use in this function); did you mean 'DAV1D_MAX_THREADS'?
  153 |                       : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
./libavutil/common.h:105:28: note: in definition of macro 'FFMIN'
  105 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                            ^
libavcodec/libdav1d.c:153:48: error: 'Dav1dSettings' has no member named 'n_tile_threads'; did you mean 'n_threads'?
  153 |                       : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);
      |                                                ^~~~~~~~~~~~~~
./libavutil/common.h:105:40: note: in definition of macro 'FFMIN'
  105 | #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
      |                                        ^
libavcodec/libdav1d.c:155:13: error: 'Dav1dSettings' has no member named 'n_frame_threads'
  155 |            s.n_frame_threads, s.n_tile_threads);
      |             ^
libavcodec/libdav1d.c:155:33: error: 'Dav1dSettings' has no member named 'n_tile_threads'; did you mean 'n_threads'?
  155 |            s.n_frame_threads, s.n_tile_threads);
      |                                 ^~~~~~~~~~~~~~
      |                                 n_threads
libavcodec/libdav1d.c: At top level:
libavcodec/libdav1d.c:462:94: error: 'DAV1D_MAX_TILE_THREADS' undeclared here (not in a function); did you mean 'DAV1D_MAX_THREADS'?
  462 |     { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },
      |                                                                                              ^~~~~~~~~~~~~~~~~~~~~~
      |                                                                                              DAV1D_MAX_THREADS
libavcodec/libdav1d.c:463:97: error: 'DAV1D_MAX_FRAME_THREADS' undeclared here (not in a function); did you mean 'DAV1D_MAX_THREADS'?
  463 |     { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },
      |                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                 DAV1D_MAX_THREADS
CC  libavcodec/libdavs2.o
make: *** [ffbuild/common.mak:67: libavcodec/libdav1d.o] Error 1
make: *** Waiting for unfinished jobs....
##[error]Process completed with exit code 1.
AnimMouse commented 3 years ago

Needed to disable libdav1d as dav1d has diverged. Already disabled on 64 bit, but still enabled on 32 bit n4.4 builds.

AnimMouse commented 3 years ago

Fixed on https://github.com/rdp/ffmpeg-windows-build-helpers/pull/593 1fe8dfb080ac6bbc6776d92b1fa51f599dae5b43

Vangelis66 commented 3 years ago

Apologies if my query appears dumb :wink: , but...

https://github.com/rdp/ffmpeg-windows-build-helpers/pull/593 -- Disable libdav1d on stable builds including 32 bit builds --

https://github.com/rdp/ffmpeg-windows-build-helpers/commit/41b966a -- Disable libdav1d on stable builds including 32 bit builds --

https://github.com/AnimMouse/ffmpeg-stable-autobuild/commit/1fe8dfb =>

https://github.com/rdp/ffmpeg-windows-build-helpers/commit/1289748 -- Disable libdav1d on stable releases --

I downloaded your latest stable 32-bit offering from

https://github.com/AnimMouse/ffmpeg-stable-autobuild/releases/tag/m-2021-10-19-18-00

yet

ffmpeg -hide_banner -buildconf | findstr libdav1d => 

    --enable-libdav1d
    --disable-libdav1d

I realise the net effect of enable+disable is that libdav1d isn't compiled in the end, but wouldn't a more "elegant" solution be that the config option --enable-libdav1d be simply commented out in the original ./config, so that the resultant binaries contain absolutely no mention of libdav1d ?

I admit at first I foolishly missed :blush: the --disable-libdav1d flag in FFmpeg's banner, because it appears towards the very end of that long configuration string, while my eyes had focused, out of habit :stuck_out_tongue_winking_eye:, on the --enable-libdav1d flag that appears at the same spot as in previous ffmpeg builds with that lib built-in...

44

Once more, many thanks for the great service you're providing to the FFmpeg user communities! :+1:

AnimMouse commented 3 years ago

@Vangelis66

Apologies if my query appears dumb

No, any attempts to gain knowledge is definitely not dumb. 😉

but wouldn't a more "elegant''' solution be that the config option --enable-libdav1d be simply commented out in the original ./config, so that the resultant binaries contain absolutely no mention of libdav1d ?

True, I should have just removed the --enable-libdav1d line on this and created a logic like:

if [[ $ffmpeg_git_checkout_version == "master" ]]; then
 config_options+=" --enable-libdav1d"
fi

Well, it seems like I blindly followed rdp's commit just to fix that failing libdav1d on stable builds. 😜

But hopefully, the upstream will fix this so that we can build libdav1d on FFmpeg stable builds again.