m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.51k stars 262 forks source link

[mingw64] [glslang] Python gets bad path to gen_extension_headers.py #2462

Closed DoctorHayes closed 1 year ago

DoctorHayes commented 1 year ago

I am just building the 64-bit version in Windows 11. I also commented out --enable-libglslang in ffmpeg_options.txt, but it is still attempting to compile the library.

Here is the relevant error:

cmd.exe /C "cd /D C:\media-autobuild\build\glslang-git\build-64bit\StandAlone && C:\media-autobuild\msys64\usr\bin\python3.11.exe C:/media-autobuild/build/glslang-git/StandAlone/../gen_extension_headers.py -i C:/media-autobuild/build/glslang-git/StandAlone/../glslang/ExtensionHeaders -o C:/media-autobuild/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h"
/trunk/msys64/usr/bin/python3.11.exe: can't open file '/trunk/build/glslang-git/build-64bit/StandAlone/C:/media-autobuild/build/glslang-git/StandAlone/../gen_extension_headers.py': [Errno 2] No such file or directory
ninja: build stopped: subcommand failed.
build failed. Check C:/media-autobuild/build/glslang-git/build-64bit/ab-suite.build.log
This is required for other packages, so this script will exit.

logs.zip

I can edit the Python command manually to get it to work, (removing /trunk/build/glslang-git/build-64bit/StandAlone/). But my changes get blown out when I rerun the script. Let me know if there is a quick workaround or fix.

Fishman0919 commented 1 year ago

Same.

jon-waltman commented 1 year ago

I have the same issue. Looking at the compile script: https://github.com/m-ab-s/media-autobuild_suite/blob/de449072e2916afc37d0c4c0f405d43970b30ef2/build/media-suite_compile.sh#L1980-L1981 ...it looks like you need to do ALL of the below to skip the glslang build as a workaround:

Note I haven't tested this yet as I'm still trying to figure out what is lost by dropping the dependency.

Edit: It looks like glslang and placebo are just extra filter options in ffmpeg.

DoctorHayes commented 1 year ago

Thanks, jon-waltman, those configuration changes allowed it to build successfully without libglslang.

Biswa96 commented 1 year ago

Could you try uninstalling the msys2 python with pacman -R python command?

Fishman0919 commented 1 year ago

same with "pacman -R python"

19:25:09 ┌ glslang git ................................. [Updates found] 19:25:09 ├ Running dependencies... 19:25:28 ├ Running cmak logs.zip e... 19:25:40 ├ Running pre ninja from glslang_extra.sh... 19:25:40 ├ Running build... Likely error (tail of the failed operation logfile): /trunk/msys64/usr/bin/python3.11.exe: can't open file '/trunk/build/glslang-git/build-64bit/StandAlone/C:/MAS/build/glslang-git/StandAlone/../gen_extension_headers.py': [Errno 2] No such file or directory [420/422] Linking CXX executable StandAlone\spirv-remap.exe ninja: build stopped: subcommand failed. [1/5] cmd.exe /C "cd /D C:\MAS\build\glslang-git\build-64bit\External\spirv-tools && C:\MAS\msys64\mingw64\bin\cmake.exe -DCHANGES_FILE=C:/MAS/build/glslang-git/External/spirv-tools/CHANGES -DTEMPLATE_FILE=C:/MAS/build/glslang-git/External/spirv-tools/cmake/SPIRV-Tools.pc.in -DOUT_FILE=C:/MAS/build/glslang-git/build-64bit/External/spirv-tools/SPIRV-Tools.pc -DCMAKE_INSTALL_PREFIX=C:/MAS/local64 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include "-DSPIRV_LIBRARIES=-lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link" -P C:/MAS/build/glslang-git/External/spirv-tools/cmake/write_pkg_config.cmake" [2/5] cmd.exe /C "cd /D C:\MAS\build\glslang-git\build-64bit\External\spirv-tools && C:\MAS\msys64\mingw64\bin\cmake.exe -DCHANGES_FILE=C:/MAS/build/glslang-git/External/spirv-tools/CHANGES -DTEMPLATE_FILE=C:/MAS/build/glslang-git/External/spirv-tools/cmake/SPIRV-Tools-shared.pc.in -DOUT_FILE=C:/MAS/build/glslang-git/build-64bit/External/spirv-tools/SPIRV-Tools-shared.pc -DCMAKE_INSTALL_PREFIX=C:/MAS/local64 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include -DSPIRV_SHARED_LIBRARIES=-lSPIRV-Tools-shared -P C:/MAS/build/glslang-git/External/spirv-tools/cmake/write_pkg_config.cmake" [3/5] Generating C:/MAS/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h FAILED: include/glslang/glsl_intrinsic_header.h C:/MAS/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h cmd.exe /C "cd /D C:\MAS\build\glslang-git\build-64bit\StandAlone && C:\MAS\msys64\usr\bin\python3.11.exe C:/MAS/build/glslang-git/StandAlone/../gen_extension_headers.py -i C:/MAS/build/glslang-git/StandAlone/../glslang/ExtensionHeaders -o C:/MAS/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h" /trunk/msys64/usr/bin/python3.11.exe: can't open file '/trunk/build/glslang-git/build-64bit/StandAlone/C:/MAS/build/glslang-git/StandAlone/../gen_extension_headers.py': [Errno 2] No such file or directory ninja: build stopped: subcommand failed. build failed. Check C:/MAS/build/glslang-git/build-64bit/ab-suite.build.log This is required for other packages, so this script will exit. 19:34:22 Creating diagnostics file...

Attach C:\MAS\build\logs.zip to the GitHub issue. Make sure the suite is up-to-date before reporting an issue. It might've been fixed already.

Try running the build again at a later time.

Georgecolla commented 1 year ago

is someone have any solution i have this issue and i think that is from this path /trunk/build/glslang-git/build-64bit/StandAlone/C:/media-autobuild_suite-master/build/glslang-git/StandAlone/../gen_extension_headers.py it wanna be ./trunk/build/glslang-git/StandAlone/../gen_extension_headers.py or ./trunk/build/glslang-git/gen_extension_headers.py plz if anyone have any solution type it i tried to edit glslang-git but when i run build again its updated from github and return again and didnt work??

hydra3333 commented 1 year ago

Edit: It looks like glslang and placebo are just extra filter options in ffmpeg.

isn't libglslang necessary to use vulkan filters ?

I have mpv=2 and comment out libplacebo and libglslang fails.

 glslang git  ........................................ [Recently updated]
├ Running dependencies...
├ Running cmake...
├ Running build...
Likely error (tail of the failed operation logfile):
/trunk/msys64/usr/bin/python3.11.exe: can't open file '/trunk/build/glslang-git/build-64bit/StandAlone/C:/MABS/build/glslang-git/StandAlone/../gen_extension_headers.py': [Errno 2] No such file or directory
[420/422] Linking CXX executable StandAlone\spirv-remap.exe
ninja: build stopped: subcommand failed.
[1/5] cmd.exe /C "cd /D C:\MABS\build\glslang-git\build-64bit\External\spirv-tools && C:\MABS\msys64\mingw64\bin\cmake.exe -DCHANGES_FILE=C:/MABS/build/glslang-git/External/spirv-tools/CHANGES -DTEMPLATE_FILE=C:/MABS/build/glslang-git/External/spirv-tools/cmake/SPIRV-Tools.pc.in -DOUT_FILE=C:/MABS/build/glslang-git/build-64bit/External/spirv-tools/SPIRV-Tools.pc -DCMAKE_INSTALL_PREFIX=C:/MABS/local64 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include "-DSPIRV_LIBRARIES=-lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link" -P C:/MABS/build/glslang-git/External/spirv-tools/cmake/write_pkg_config.cmake"
[2/5] cmd.exe /C "cd /D C:\MABS\build\glslang-git\build-64bit\External\spirv-tools && C:\MABS\msys64\mingw64\bin\cmake.exe -DCHANGES_FILE=C:/MABS/build/glslang-git/External/spirv-tools/CHANGES -DTEMPLATE_FILE=C:/MABS/build/glslang-git/External/spirv-tools/cmake/SPIRV-Tools-shared.pc.in -DOUT_FILE=C:/MABS/build/glslang-git/build-64bit/External/spirv-tools/SPIRV-Tools-shared.pc -DCMAKE_INSTALL_PREFIX=C:/MABS/local64 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_INCLUDEDIR=include -DSPIRV_SHARED_LIBRARIES=-lSPIRV-Tools-shared -P C:/MABS/build/glslang-git/External/spirv-tools/cmake/write_pkg_config.cmake"
[3/5] Generating C:/MABS/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h
FAILED: include/glslang/glsl_intrinsic_header.h C:/MABS/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h
cmd.exe /C "cd /D C:\MABS\build\glslang-git\build-64bit\StandAlone && C:\MABS\msys64\usr\bin\python3.11.exe C:/MABS/build/glslang-git/StandAlone/../gen_extension_headers.py -i C:/MABS/build/glslang-git/StandAlone/../glslang/ExtensionHeaders -o C:/MABS/build/glslang-git/build-64bit/include/glslang/glsl_intrinsic_header.h"
/trunk/msys64/usr/bin/python3.11.exe: can't open file '/trunk/build/glslang-git/build-64bit/StandAlone/C:/MABS/build/glslang-git/StandAlone/../gen_extension_headers.py': [Errno 2] No such file or directory
ninja: build stopped: subcommand failed.
build failed. Check C:/MABS/build/glslang-git/build-64bit/ab-suite.build.log
This is required for other packages, so this script will exit.
  Creating diagnostics file...
Biswa96 commented 1 year ago

This should be fixes after this https://github.com/m-ab-s/media-autobuild_suite/commit/8ae921e6ca517c29633e42994ad5bfd78db2bb8f commit. Please run git pull in the cloned repository.

Georgecolla commented 1 year ago

This should be fixes after this 8ae921e commit. Please run git pull in the cloned repository.

plz i didnt understand what should i do,, i opened very very compilicated file and every file got another file till i get lost what should i do with this problem this path is wrong /trunk/build/glslang-git/build-64bit/StandAlone/C:/media-autobuild_suite-master/build/glslang-git/StandAlone/../gen_extension_headers.py and the correct path of is /trunk/build/glslang-git/StandAlone/../gen_extension_headers.py and i cant change this path in glslang-git cause when i made it it update when i run it again what should i do and what can i do?? plz can u help me??

Biswa96 commented 1 year ago

Just go to the media-autobuild_suite directory and run git pull command. Then try to rebuild things as usual.

Georgecolla commented 1 year ago

Just go to the media-autobuild_suite directory and run git pull command. Then try to rebuild things as usual.

after i updated it it gives me vmaf git ................................................... [Up-to-date] Likely error (tail of the failed operation logfile): LDFLAGS: -pipe -static-libgcc -static-libstdc++ vcs_fetch ++ git rev-parse --git-dir

Georgecolla commented 1 year ago

Just go to the media-autobuild_suite directory and run git pull command. Then try to rebuild things as usual.

after i updated it it gives me vmaf git ................................................... [Up-to-date] Likely error (tail of the failed operation logfile): LDFLAGS: -pipe -static-libgcc -static-libstdc++ vcs_fetch ++ git rev-parse --git-dir

Biswa96 commented 1 year ago

Failed to connect to aomedia.googlesource.com port 443 after 21053 ms: Couldn't connect to server

That's network issue in your system and not related to this project.

hydra3333 commented 1 year ago

try locating and deleting the glslang git folder then re-running ... after fixing your network issue.