mpv-player / mpv-build

🔨 Helper scripts to compile mpv on Linux
http://mpv.io
414 stars 108 forks source link

error: implicit declaration of function 'mp_csp_to_avcol_spc' #226

Closed bocchi810 closed 3 days ago

bocchi810 commented 10 months ago

if i build the mpv, i got this error this is my log:

[93/256] Compiling C object libmpv.so.2.2.0.p/filters_f_lavfi.c.o
FAILED: libmpv.so.2.2.0.p/filters_f_lavfi.c.o 
cc -Ilibmpv.so.2.2.0.p -I. -I.. -Icommon -Ietc -Iplayer/javascript -Iplayer/lua -Isub -Ivideo/out -I/home/hhm/mpv-build-master/build_libs/include -I/usr/include/uuid -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -fvisibility=hidden -fdiagnostics-color=always -Wall -Winvalid-pch -std=c11 -O3 -D_FILE_OFFSET_BITS=64 -Werror=implicit-function-declaration -Wempty-body -Wdisabled-optimization -Wstrict-prototypes -Wno-format-zero-length -Wno-redundant-decls -Wvla -Wno-format-truncation -Wimplicit-fallthrough -fno-math-errno -Wformat -Werror=format-security -Wundef -Wmissing-prototypes -Wshadow -Wno-switch -Wparentheses -Wpointer-arith -Wno-pointer-sign -Wno-unused-result -D_GNU_SOURCE -fPIC -fPIC -pthread -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -DPL_STATIC -MD -MQ libmpv.so.2.2.0.p/filters_f_lavfi.c.o -MF libmpv.so.2.2.0.p/filters_f_lavfi.c.o.d -o libmpv.so.2.2.0.p/filters_f_lavfi.c.o -c ../filters/f_lavfi.c
../filters/f_lavfi.c: In function 'init_pads':
../filters/f_lavfi.c:496:35: error: implicit declaration of function 'mp_csp_to_avcol_spc' [-Werror=implicit-function-declaration]
  496 |             params->color_space = mp_csp_to_avcol_spc(fmt->params.color.space);
      |                                   ^~~~~~~~~~~~~~~~~~~
../filters/f_lavfi.c:496:72: error: 'struct pl_color_space' has no member named 'space'
  496 |             params->color_space = mp_csp_to_avcol_spc(fmt->params.color.space);
      |                                                                        ^
../filters/f_lavfi.c:497:35: error: implicit declaration of function 'mp_csp_levels_to_avcol_range' [-Werror=implicit-function-declaration]
  497 |             params->color_range = mp_csp_levels_to_avcol_range(fmt->params.color.levels);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../filters/f_lavfi.c:497:81: error: 'struct pl_color_space' has no member named 'levels'
  497 |             params->color_range = mp_csp_levels_to_avcol_range(fmt->params.color.levels);
      |                                                                                 ^
cc1: some warnings being treated as errors
[98/256] Compiling C object libmpv.so.2.2.0.p/demux_demux_mkv.c.o
ninja: build stopped: subcommand failed.
Dudemanguy commented 10 months ago

Just git pull mpv again and it should work.

bocchi810 commented 10 months ago

Just git pull mpv again and it should work.

I did this but the problem is still not solved

Dudemanguy commented 10 months ago

What commit is the mpv repo on? The latest at this time of writing is 7f595aa.

bocchi810 commented 10 months ago

What commit is the mpv repo on? The latest at this time of writing is 7f595aa.

It's 7f595aa too

llyyr commented 10 months ago

What commit is the mpv repo on? The latest at this time of writing is 7f595aa.

It's 7f595aa too

That doesn't make any sense, the error you're getting is fixed by https://github.com/mpv-player/mpv/commit/d00a00e180afb70bec4a1145fb0c0815a892e08d