mpv-player / mpv-build

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

waflib error before compiling on mingw x64 using waf #204

Closed MartinEesmaa closed 1 year ago

MartinEesmaa commented 1 year ago

Hello, I have a problem about waf before compiling started.

First, I tried to uninstall and reinstall waf again, but didn't work.

waf configure command:

LDFLAGS="-static" ./waf configure --enable-asm --disable-javascript --disable-vapoursynth --enable-sdl2 --enable-sdl2-gamepad --enable-dvdnav --enable-libbluray --enable-static-build --enable-libmpv-shared --disable-sixel --disable-shaderc --disable-libplacebo --disable-jpeg

meson configure command:

LDFLAGS="-static" meson setup --reconfigure -Djavascript=disabled -Djpeg=disabled -Db_lto=true -Dsixel=disabled -Dshaderc=disabled -Dvapoursynth=disabled -Dlibplacebo=disabled --default-library=static -Db_ndebug=true -Dsdl2=enabled -Ddvdnav=enabled -Dlibmpv=true --prefer-static --buildtype=release ..

Here is the error log:

Waf: Entering directory `C:/msys64/home/marti/mpv/build'
[1/1] Compiling version.sh
Traceback (most recent call last):
  File "<string>", line 55, in <module>
  File "<string>", line 20, in run
OSError: [Errno 22] Invalid argument
[  2/487] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns
Waf: Leaving directory `C:/msys64/home/marti/mpv/build'
Build failed
Traceback (most recent call last):
  File "C:/msys64/home/marti/mpv/waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Context.py", line 181, in exec_command
    ret,out,err=Utils.run_process(cmd,kw,cargs)
  File "C:/msys64/home/marti/mpv/waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Utils.py", line 602, in run_process
    return run_prefork_process(cmd,kwargs,cargs)
  File "C:/msys64/home/marti/mpv/waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Utils.py", line 537, in run_prefork_process
    proc.stdin.write(obj)
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/msys64/home/marti/mpv/waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Task.py", line 180, in process
    ret=self.run()
  File "<string>", line 12, in f
  File "C:/msys64/home/marti/mpv/waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Task.py", line 173, in exec_command
    return self.generator.bld.exec_command(cmd,**kw)
  File "C:/msys64/home/marti/mpv/waf3-2.0.24-c88b74123ce8b9d1a27999f7cf96dff0/waflib/Context.py", line 183, in exec_command
    raise Errors.WafError('Execution failure: %s'%str(e),ex=e)
waflib.Errors.WafError: Execution failure: [Errno 22] Invalid argument

Only meson worked to compile, but did not link correctly from static. I didn't want to use meson from ninja, but I want to use only waf for easy to me.

Are there any solutions to fix my waflib problem, or I have to start all over again?

INFO: OS: Windows 11 Pro 22H1 Compilation program: MSYS2 MINGW x86_64 (GCC 12.2.0 Rev6)