mpv-player / mpv-build

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

DRM_FORMAT_XRGB16161616 is "undeclared"? #184

Closed tsjnachos117 closed 2 years ago

tsjnachos117 commented 2 years ago

I can't seem to build mpv in Debian 11 or Linux Mint 20. Everytime I try, I get an error about a function (relating to the DRM vo, I assume) being "undeclared". I'm trying to use the dpkg-buildpackage command.

Here is my error. (Via pastebin)

Here is my ffmpeg_options file:

    --enable-libx264
    --enable-libxvid
    --enable-libmp3lame
    --enable-libopus
    --enable-libdav1d
    --enable-libaom
    --enable-libvorbis

And my mpv_options file:

    --enable-dvdnav
    --enable-cdda

Here is my build command, as I typed it into the command line:

    dpkg-buildpackage --build=binary -uc -us -j4

I tried deleting and re-cloning the entire mpv-build directory (including mpv, ffmpeg, and libass), and re-running mk-build-deps, but that didn't help.

I have attached the ffmpeg_build/ffbuild/config.log, libass/config.log, and mpv/build/config.log files below.

config-logs.tar.gz

tsjnachos117 commented 2 years ago

I just tried bypassing dpkg-buildpackage with the ./clean; ./build -j4 &> full-log.txt commands, and it failed. Here's the output: full-log.txt

avih commented 2 years ago

This seems like a regression from https://github.com/mpv-player/mpv/commit/defb02daa461200f4de972c57c4ac8dc108feb5f

Maybe missing some configure/build checks.

tsjnachos117 commented 2 years ago

FYI, I just finished trying to do the same in Arch. This time, it was successful! I guess this only affects Debian, Ubuntu, and Mint?

avih commented 2 years ago

I guess this only affects Debian, Ubuntu, and Mint?

Apparently if depends on kernel version. But the fact that the build assumes blindly that they're available is a bug, which should be fixed, and hopefully it will soon.

tsjnachos117 commented 2 years ago

This seems like a regression from mpv-player/mpv@defb02d

Maybe missing some configure/build checks.

I'm not so sure. I can't read code very well, but I just did what will probably be my last test for now, and found that it does build on Debian if you add --disable-drm to mpv_options. In previous attempts, I tried to disable vaapi and wayland (since that's mentioned in the commit description), but that didn't help.FWIW, these are complilation error, not runtime errors.

I guess this only affects Debian, Ubuntu, and Mint?

Apparently if depends on kernel version. But the fact that the build assumes blindly that they're available is a bug, which should be fixed, and hopefully it will soon.

FWIW, these are complilation error, not runtime errors. So, unless waf (or whatever) depends on "linux-headers" type packages, I'm not sure how much this matters. I could be wrong, though.

Dudemanguy commented 2 years ago

In previous attempts, I tried to disable vaapi and wayland (since that's mentioned in the commit description), but that didn't help.FWIW, these are complilation error, not runtime errors.

According to your build logs, pkg-config isn't able to find wayland-protocols on your machine so the feature isn't enabled which is why it had no effect on you being able to compile or not. The code is in drm_common though which is why the drm stuff tripped it.

avih commented 2 years ago

it does build on Debian if you add --disable-drm

No, this is not a (good) solution. You do want DRM, but the issue is that the new code assumes blindly that the headers are new enough. This needs to be fixed on the mpv side, and it will be fixed.

tsjnachos117 commented 2 years ago

it does build on Debian if you add --disable-drm

No, this is not a (good) solution. You do want DRM, but the issue is that the new code assumes blindly that the headers are new enough. This needs to be fixed on the mpv side, and it will be fixed.

I didn't mean to imply that this is a solution. It's more of a "in case knowing this helps"... thing. (It also works as a workaround, although using an older version would probably be better.)