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.49k stars 257 forks source link

[mingw64] [libplacebo-git] meson.build:47:12: ERROR: C++ static library 'OGLCompiler' not found #2576

Closed statusquont closed 4 months ago

statusquont commented 5 months ago

Hello, building for 64-bit, it fails on libplacebo-git

I've attached the relevant logs and pasted the error message below. Hopefully I followed the instructions correctly. I appreciate your time with any helpful responses!

meson-log.txt ab-suite.meson.log logs.zip

├ Running meson...
Likely error (tail of the failed operation logfile):
Run-time dependency shaderc_combined found: NO (tried pkgconfig and cmake)
Library glslang-default-resource-limits found: YES
Library SPIRV found: NO
Library SPIRV found: YES
Library MachineIndependent found: YES
Library OSDependent found: YES

../src/glsl/meson.build:47:12: ERROR: C++ static library 'OGLCompiler' not found

A full log can be found at C:/mabs/build/libplacebo-git/build-64bit/meson-logs/meson-log.txt
meson failed. Check C:/mabs/build/libplacebo-git/build-64bit/ab-suite.meson.log
This is required for other packages, so this script will exit.
statusquont commented 5 months ago

I tried to comment out that library in ffmpeg_options.txt file

#--enable-libplacebo

and then re-ran the media-autobuild_suite.bat script. It got much further along this time, but then failed on ffmpeg-git

ab-suite.make.log logs.zip

├ Compiling shared FFmpeg...
├ Running configure...
├ Running make...
Likely error (tail of the failed operation logfile):
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x295): undefined reference to `cmsCloseProfile'
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x2a2): undefined reference to `cmsCloseProfile'
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x388): undefined reference to `cmsCloseProfile'
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x408): more undefined references to `cmsCloseProfile' follow
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x47f): undefined reference to `cmsDeleteTransform'
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x487): undefined reference to `cmsCloseProfile'
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x498): undefined reference to `cmsDeleteTransform'
C:/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/mabs/local64/lib/libjxl_cms.a(jxl_cms.cc.o):jxl_cms.cc:(.text.unlikely+0x4a0): undefined reference to `cmsCloseProfile'
collect2.exe: error: ld returned 1 exit status
make: *** [/build/ffmpeg-git/ffbuild/library.mak:119: libavcodec/avcodec-60.dll] Error 1
make failed. Check C:/mabs/build/ffmpeg-git/build-shared-64bit/ab-suite.make.log
This is required for other packages, so this script will exit.
  Creating diagnostics file...
Ajaja commented 5 months ago

@statusquont Just change in media-autobuild_suite\local64\lib\pkgconfig\libjxl_cms.pc Requires: to Requires: lcms2

hydra3333 commented 5 months ago

That line already had Requires: libhwy libbrotlienc libbrotlidec libjxl_cms note the libjxl_cms

so I added lcms2 on the end of the line and am re-running ...

edit: Um, no, that change didn't fix anything.

Ajaja commented 5 months ago

@hydra3333 Requires: ... libjxl_cms can not be in libjxl_cms.pc Obviously you changed a different file.

maclauk commented 5 months ago

I had the same original problem of "'OGLCompiler' not found"

The combination of #--enable-libplacebo and Requires: lcms2 allowed me to successfully build FFMPEG.

hydra3333 commented 5 months ago

edit: @Ajaja you are indeed correct, apologies. inattention is a confounding blighter.

L4cache commented 5 months ago

edit: @Ajaja you are indeed correct, apologies. inattention is a confounding blighter.

I think a better way would be add FORCE_SYSTEM_LCMS2 to -DJPEGXL_{FORCE_SYSTEM_BROTLI,STATIC}=ON

Like this -DJPEGXL_{FORCE_SYSTEM_BROTLI,FORCE_SYSTEM_LCMS2,STATIC}=ON

(The final effect of this is equal to modify the .pc file like you do)

Or use skcms, by deleting SKCMS from the "=OFF" list above. What the difference between lcms2 and skcms? Why jxl official cmake enable skcms by default and m-ab-s disable skcms by default? Curious.

sithtoast commented 5 months ago

Here's a issue on the libplacebo git that has a patch to compile. https://github.com/haasn/libplacebo/issues/226

jfe1205 commented 5 months ago

Is there a way to apply this patch during the build process as there does not seem to be any urgency to apply it to the git?

cantrell216 commented 5 months ago

I got this error till i turned on mpv=1. Then rebuild if you want with mpv=2. Seemed to grap a little extra from shaderc or libplacebo with it on. idk.

jfe1205 commented 5 months ago

Can't pretend to understand why, but that worked for me too! Thanks for the tip.

Edit: Having looked at the different meson.build that is used with MPV enabled, I do now understand, but why it should need a different meson.build is beyond me!

jfe1205 commented 4 months ago

This can now be marked as fixed, I believe as all builds fine now, thanks.