[meson] Build error: ‘PL_COLOR_REF_WHITE’ undeclared
I'm trying to build vlc. With the latest source code(commit: f4a9017d). I run
meson setup build
cd build
ninja -j10
Then I got:
[2/1521] Compiling C object modules/video_output/libvlc_libplacebo_utils.a.p/libplacebo_utils.c.o
FAILED: modules/video_output/libvlc_libplacebo_utils.a.p/libplacebo_utils.c.o
ccache cc -Imodules/video_output/libvlc_libplacebo_utils.a.p -Imodules/video_output -I../modules/video_output -I. -I.. -Iinclude -I../include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O0 -g -DHAVE_CONFIG_H=1 '-DGETTEXT_PACKAGE="vlc"' -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wduplicated-branches -Wduplicated-cond -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wshadow=local -Wmultistatement-macros -pipe -Wall -Werror-implicit-function-declaration -fvisibility=hidden -fPIC -MD -MQ modules/video_output/libvlc_libplacebo_utils.a.p/libplacebo_utils.c.o -MF modules/video_output/libvlc_libplacebo_utils.a.p/libplacebo_utils.c.o.d -o modules/video_output/libvlc_libplacebo_utils.a.p/libplacebo_utils.c.o -c ../modules/video_output/libplacebo/utils.c
../modules/video_output/libplacebo/utils.c: In function ‘vlc_placebo_ColorSpace’:
../modules/video_output/libplacebo/utils.c:395:45: error: ‘PL_COLOR_REF_WHITE’ undeclared (first use in this function); did you mean ‘PL_COLOR_SDR_WHITE’?
395 | float sig_peak = fmt->lighting.MaxCLL / PL_COLOR_REF_WHITE;
| ^~~~~~~~~~~~~~~~~~
| PL_COLOR_SDR_WHITE
../modules/video_output/libplacebo/utils.c:395:45: note: each undeclared identifier is reported only once for each function it appears in
../modules/video_output/libplacebo/utils.c:411:10: error: ‘struct pl_color_space’ has no member named ‘light’
411 | .light = PL_COLOR_LIGHT_UNKNOWN,
| ^~~~~
../modules/video_output/libplacebo/utils.c:411:22: error: ‘PL_COLOR_LIGHT_UNKNOWN’ undeclared (first use in this function); did you mean ‘PL_COLOR_TRC_UNKNOWN’?
411 | .light = PL_COLOR_LIGHT_UNKNOWN,
| ^~~~~~~~~~~~~~~~~~~~~~
| PL_COLOR_TRC_UNKNOWN
../modules/video_output/libplacebo/utils.c:412:10: error: ‘struct pl_color_space’ has no member named ‘sig_peak’
412 | .sig_peak = sig_peak,
| ^~~~~~~~
../modules/video_output/libplacebo/utils.c:412:22: warning: excess elements in struct initializer
412 | .sig_peak = sig_peak,
| ^~~~~~~~
../modules/video_output/libplacebo/utils.c:412:22: note: (near initialization for ‘(anonymous)’)
../modules/video_output/libplacebo/utils.c:413:10: error: ‘struct pl_color_space’ has no member named ‘sig_avg’
413 | .sig_avg = sig_avg,
| ^~~~~~~
../modules/video_output/libplacebo/utils.c:413:22: warning: excess elements in struct initializer
413 | .sig_avg = sig_avg,
| ^~~~~~~
The compiler can't find the definition of PL_COLOR_REF_WHITE
. After searching the source code I found this PL_COLOR_REF_WHITE
is not defined in vlc. And also the struct member sig_peak
and sig_avg
.
I know vlc's meson build is not complete yet, so I tried the traditional ./configure
and make
way, and the result is the same. I know vlc could pass the build on CI/CD. So I wonder where are these symbols get their definition? How could I build vlc without errors?
My environment: Arch Linux, kernel 6.3.8, Gnome Wayland, intel i7 12700H, nvidia 3060 mobile with nvidia's proprietary driver with nvidia open kernel modules, meson 1.1.1, GCC 13.1.1.