video-play example compilation failure
Created by: harryhaaren
With a fresh git clone, Im seeing some build issues on an Ubuntu 15.10 system, output of Ninja below. It seems like libsdl2-dev isn't correctly used, so output of dpkg -s libsdl2-dev
pasted below Ninja output.
Is there a required libsdl2 version required? Meson file doesn't specify a version (spa/meson.build) sdl_dep = dependency('sdl2', required : false)
...
$ ninja
[133/146] Compiling C object 'src/examples/video-play@exe/video-play.c.o'.
FAILED: src/examples/video-play@exe/video-play.c.o
cc -Isrc/examples/video-play@exe -Isrc/examples -I../src/examples -Isrc -I../src -I. -I../ -Ispa/include -I../spa/include -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99
-O2 -g -D_REENTRANT -MMD -MQ 'src/examples/video-play@exe/video-play.c.o' -MF 'src/examples/video-play@exe/video-play.c.o.d' -o 'src/examples/video-play@exe/video-play.c.o' -c ../src/examples/video-play.c
../src/examples/video-play.c:201:2: error: ‘SDL_PIXELFORMAT_NV12’ undeclared here (not in a function)
SDL_PIXELFORMAT_NV12, offsetof(struct spa_type_video_format, NV12),}, {
^
../src/examples/video-play.c:202:1: error: ‘SDL_PIXELFORMAT_NV21’ undeclared here (not in a function)
SDL_PIXELFORMAT_NV21, offsetof(struct spa_type_video_format, NV21),}};
^
[134/146] Compiling C object 'src/examples/local-v4l2@exe/local-v4l2.c.o'.
FAILED: src/examples/local-v4l2@exe/local-v4l2.c.o
cc -Isrc/examples/local-v4l2@exe -Isrc/examples -I../src/examples -Isrc -I../src -I. -I../ -Ispa/include -I../spa/include -I/usr/include/SDL2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99
-O2 -g -D_REENTRANT -MMD -MQ 'src/examples/local-v4l2@exe/local-v4l2.c.o' -MF 'src/examples/local-v4l2@exe/local-v4l2.c.o.d' -o 'src/examples/local-v4l2@exe/local-v4l2.c.o' -c ../src/examples/local-v4l2.c
../src/examples/local-v4l2.c:155:2: error: ‘SDL_PIXELFORMAT_NV12’ undeclared here (not in a function)
SDL_PIXELFORMAT_NV12, offsetof(struct spa_type_video_format, NV12),}, {
^
../src/examples/local-v4l2.c:156:1: error: ‘SDL_PIXELFORMAT_NV21’ undeclared here (not in a function)
SDL_PIXELFORMAT_NV21, offsetof(struct spa_type_video_format, NV21),}};
^
[138/146] Compiling C object 'src/gst/gstpipewire@sha/gstpipewiresrc.c.o'.
ninja: build stopped: subcommand failed.
$ dpkg -s libsdl2-dev
Package: libsdl2-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 4081
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Source: libsdl2
Version: 2.0.2+dfsg1-6ubuntu2
Replaces: libsdl-1.3-dev