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

ERROR: libplacebo >= 4.192.0 not found using pkg-config #2543

Closed atplsx closed 4 months ago

atplsx commented 8 months ago

logs.zip

ultrasound1372 commented 8 months ago

Same here, although tracing it gives something interesting. I rebuilt libplacebo in this session to help analyze. This output came out of the config.log file for FFmpeg.

ccache g++ -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -static-libgcc -static-libstdc++ -L/local64/lib -L/mingw64/lib -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--pic-executable,-e,mainCRTStartup -Wl,--image-base,0x140000000 -IC:/tools/mabs/local64/include -DPL_STATIC -IC:/tools/mabs/local64/include/spirv_cross -IC:/tools/mabs/msys64/mingw64/include -LC:/tools/mabs/local64/lib -Llib -LC:/tools/mabs/msys64/mingw64/lib -pthread -o /tmp/ffconf.topnbryS/test.exe /tmp/ffconf.topnbryS/test.o -lplacebo -lm -lshlwapi -lversion -lshaderc_combined -lspirv-cross -lvulkan -llcms2 -llcms2_fast_float -lm -liconv -lpsapi -lstdc++ -lstdc++
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x56a): undefined reference to `__imp_CM_Open_DevNode_Key'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x77d): undefined reference to `__imp_CM_Get_Device_ID_ListW'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x809): undefined reference to `__imp_CM_Get_Device_ID_List_SizeW'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x8e2): undefined reference to `__imp_CM_Get_Sibling'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x8fd): undefined reference to `__imp_CM_Locate_DevNodeW'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x923): undefined reference to `__imp_CM_Get_DevNode_Status'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0x9d1): undefined reference to `__imp_CM_Get_Child'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0xa74): undefined reference to `__imp_CM_Get_Device_IDW'
C:/tools/mabs/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/mabs/local64/lib/libvulkan.a(loader_windows.c.obj):loader_windows:(.text+0xab7): undefined reference to `__imp_CM_Get_DevNode_Registry_PropertyW'
collect2.exe: error: ld returned 1 exit status
ERROR: libplacebo >= 4.192.0 not found using pkg-config

logs.zip
Will try clearing and rebuilding Vulcan to see if this fixes the issue, although it's strange that libplacebo itself built fine but FFmpeg gives a libplacebo error when Vulcan fails. Considering I'd think libplacebo would be the one linking vulcan wouldn't it?

ultrasound1372 commented 8 months ago

@atplsx If you look at your ffbuild/config.log, which is under build-static, at the very bottom the error you were getting is related to glslang. Try deleting build/glslang-git and local64/(include/glslang, lib/libglslang.a, lib/libglslang-default-resource-limits.a), and perhaps anything about glslang in local64/lib/pkgconfig, and try running the build again? That's what I did for my Vulcan thing although vulcan headers were also in shared and it works, configures properly and make succeeds.. The error here is that it seems as if FFmpeg's configure script is giving errors about the wrong library when presumably one of its dependencies fails.

1480c1 commented 4 months ago

Should be fixed with https://github.com/m-ab-s/media-autobuild_suite/commit/e9fc1af2098bd3740b5391c658dc01e501b81d68