Skip to content

Assorted fixes for a Win32 build from PowerShell#18056

Open
amyspark wants to merge 3 commits into
mpv-player:masterfrom
amyspark:assorted-fixes-win32-build
Open

Assorted fixes for a Win32 build from PowerShell#18056
amyspark wants to merge 3 commits into
mpv-player:masterfrom
amyspark:assorted-fixes-win32-build

Conversation

@amyspark
Copy link
Copy Markdown

@amyspark amyspark commented Jun 1, 2026

Hi all,

Coming here from https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/work_items/75, this is a MR to address the issues I found when trying to set up mpv as per the Windows build instructions.

I found the following bits:

  • The libjxl_threads override couldn't be accepted by the FFmpeg wrap because of a missing version (it checks for 0.7.0 or higher)
  • subrandr uses cp to move a generated static library, which is not available under PowerShell (easily fixable with an inline Python script)
  • lastly, the use of meson.build_options() which was added in meson: bump required version to 1.3.0 #14907 needs one to also escape backslashes properly, otherwise they are interpreted by Clang as escape sequences.

All feedback is appreciated. Thanks in advance for the review!

amyspark added 3 commits June 1, 2026 13:48
This fixes compiling when using Windows-style paths in the Meson
configuration line, e.g.

> '-Dc_args=-IC:\mpv\subprojects\amf-headers'
Replace `cp` with an inline Python script.
…figuration

For some reason, there does is a default version set for libjxl, but not
for libjxl_threads. This makes Meson reject the latter as a valid
override for what's requested by FFmpeg (>= 0.7.0, instead detected as
undefined).
Copy link
Copy Markdown
Member

@kasper93 kasper93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libjxl_threads override couldn't be accepted by the FFmpeg wrap because of a missing version (it checks for 0.7.0 or higher)

Which CMake version do you use? This is known regression in CMake 4.1.1, but was seemingly fixed in 4.1.2 and onward. I have not seen this issue since. See mesonbuild/meson#15530 for more details.

Comment thread ci/build-win32.ps1
command: [
python,
'-c',
'import shutil; import sys; shutil.copy(sys.argv[1], sys.argv[2])',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shutil.copy2 please

Comment thread ci/build-win32.ps1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit prefix should be ci/win32: ... or something, it's not subrandr change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants