haasn / libplacebo

Official mirror of libplacebo

Home Page:http://libplacebo.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to cross-compile with -Dglslang=enabled

GahvoiMu opened this issue · comments

meson fails to detect the static libraries.

980f257 and later:

Build type: cross build
Project name: libplacebo
Project version: 7.339.0
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 13.0.0 "x86_64-w64-mingw32-gcc (GCC) 13-win32")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.41
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 13.0.0 "x86_64-w64-mingw32-g++ (GCC) 13-win32")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.41
C compiler for the build machine: cc (gcc 13.2.0 "cc (Debian 13.2.0-4) 13.2.0")
C linker for the build machine: cc ld.bfd 2.41
C++ compiler for the build machine: c++ (gcc 13.2.0 "c++ (Debian 13.2.0-4) 13.2.0")
C++ linker for the build machine: c++ ld.bfd 2.41
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Compiler for C supports arguments -Wincompatible-pointer-types: YES
Compiler for C supports link arguments -Wl,--exclude-libs=ALL: YES
Configuring libplacebo.rc using configuration
Configuring demos.rc using configuration
Library m found: YES
Program python3 found: YES (/usr/bin/python3)
Found pkg-config: /usr/bin/pkgconf (1.8.1)
Found CMake: NO
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Library execinfo found: NO
Checking for function "backtrace_symbols" with dependency -lexecinfo: NO
Check usable header "dbghelp.h" : YES
Library shlwapi found: YES
Fetching value of define "__MINGW32__" : 1
Program x86_64-w64-mingw32-dlltool found: YES
Run-time dependency shaderc found: YES
Library glslang-default-resource-limits found: YES
Library SPIRV found: NO

../src/glsl/meson.build:34:16: ERROR: C++ static library 'SPIRV' not found

1030d61 and earlier:

Build type: cross build
Project name: libplacebo
Project version: 5.256.0
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 13.0.0 "x86_64-w64-mingw32-gcc (GCC) 13-win32")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.41
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 13.0.0 "x86_64-w64-mingw32-g++ (GCC) 13-win32")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.41
C compiler for the build machine: cc (gcc 13.2.0 "cc (Debian 13.2.0-4) 13.2.0")
C linker for the build machine: cc ld.bfd 2.41
C++ compiler for the build machine: c++ (gcc 13.2.0 "c++ (Debian 13.2.0-4) 13.2.0")
C++ linker for the build machine: c++ ld.bfd 2.41
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Compiler for C supports arguments -Wincompatible-pointer-types: YES
Compiler for C supports link arguments -Wl,--exclude-libs=ALL: YES
Library m found: YES
Program python3 found: YES (/usr/bin/python3)
Found pkg-config: /usr/bin/pkgconf (1.8.1)
Found CMake: NO
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Library execinfo found: NO
Checking for function "backtrace_symbols" with dependency -lexecinfo: NO
Run-time dependency shaderc found: YES
Library glslang found: YES
Library MachineIndependent found: YES
Library OSDependent found: YES
Library HLSL found: YES
Library OGLCompiler found: YES
Library GenericCodeGen found: YES
Library SPVRemapper found: YES
Library SPIRV found: YES
Library SPIRV-Tools-opt found: YES
Library SPIRV-Tools found: YES
Library pthread found: YES
Library glslang-default-resource-limits found: YES
Has header "glslang/build_info.h" : YES
Check usable header "d3d11.h" : YES
Check usable header "d3d11_4.h" : YES
Check usable header "dxgi1_6.h" : YES
Run-time dependency spirv-cross-c-shared found: YES 0.57.0
Library version found: YES
Run-time dependency vulkan found: YES 1.3.268
Run-time dependency lcms2 found: YES 2.16
Run-time dependency dovi found: YES 3.2.0
Configuring config.h using configuration
Configuring config_internal.h using configuration
Build targets in project: 4

libplacebo 5.256.0

  Optional features
    d3d11          : YES
    gl-proc-addr   : YES
    glslang        : YES
    lcms           : YES
    libdovi        : YES
    opengl         : YES
    shaderc        : YES
    vk-proc-addr   : YES
    vulkan         : YES

meson fails to detect the static libraries.

Works as expected. This means that the SPIRV build is not compatible/found. Could you show how you build spirv and glslang?

Before this change it would crash during runtime in unexpected ways, even if it did build it was broken binary.

FWIW you can reference mpv ci scripts how to build everything correctly https://github.com/mpv-player/mpv/blob/master/ci/build-mingw64.sh (it builds also libplacebo and its dependencies)

Updated meson and rebuilt everything and now things work as expected. 🤷
Sorry for the inconvenience.

@GahvoiMu could you please help me out , how to resolve the below issue and as well i have been trie3d the steps provided by you but not helping out

#275

thanks