Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link error when building with ffmpeg 5 without vulkan support #120

Closed
CarterLi opened this issue Feb 14, 2022 · 3 comments
Closed

Link error when building with ffmpeg 5 without vulkan support #120

CarterLi opened this issue Feb 14, 2022 · 3 comments

Comments

@CarterLi
Copy link
Contributor

[0/1] Regenerating build files.
The Meson build system
Version: 0.61.1
Source dir: /Users/carter/libplacebo
Build dir: /Users/carter/libplacebo/build
Build type: native build
Project name: libplacebo
Project version: 4.195.0
C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C linker for the host machine: cc ld64 711
C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C++ linker for the host machine: c++ ld64 711
Host machine cpu family: aarch64
Host machine cpu: arm64
Compiler for C supports arguments -Wincompatible-pointer-types: YES (cached)
Compiler for C supports link arguments -Wl,--exclude-libs=ALL: NO (cached)
Program python3 found: YES (/opt/homebrew/opt/python@3.10/bin/python3.10)
WARNING: Python files installed by Meson might not be found by python interpreter.
 This warning can be avoided by setting "python.platlibdir" option.
WARNING: Python files installed by Meson might not be found by python interpreter.
 This warning can be avoided by setting "python.purelibdir" option.
Library m found: YES
Dependency threads found: YES unknown (cached)
Header <pthread.h> has symbol "pthread_condattr_setclock" with dependency threads: NO (cached)
Dependency vulkan found: YES 1.2.198.1 (cached)
Found pkg-config: /opt/homebrew/bin/pkg-config (0.29.2)
Found CMake: /opt/homebrew/bin/cmake (3.22.2)
Run-time dependency epoxy found: NO (tried pkgconfig, framework and cmake)
Dependency shaderc found: YES 2019.1 (cached)
Dependency spirv-cross-c-shared found: YES 0.48.0 (cached)
Library version found: NO
Check usable header "d3d11_4.h" : NO (cached)
Run-time dependency libunwind found: NO (tried pkgconfig, framework and cmake)
Has header "execinfo.h" : YES (cached)
Library execinfo found: NO
Message: Skipping `glslang` because `shaderc` is available
Dependency lcms2 found: YES 2.13 (cached)
Configuring config.h using configuration
Configuring config_internal.h using configuration
Run-time dependency glfw3 found: NO (tried pkgconfig, framework and cmake)
Dependency sdl2 found: YES 2.0.20 (cached)
Dependency SDL2_image found: YES 2.0.5 (cached)
Dependency threads found: YES unknown (cached)
Dependency libavcodec found: YES 59.18.100 (cached)
Dependency libavformat found: YES 59.16.100 (cached)
Dependency libavutil found: YES 57.17.100 (cached)
Has header "nuklear.h" : YES (cached)
Configuring config_demos.h using configuration
Build targets in project: 9

libplacebo 4.195.0

  User defined options
    backend        : ninja
    buildtype      : release
    debug          : True
    vulkan-registry: /usr/local/share/vulkan/registry/vk.xml

Found ninja-1.10.2 at /opt/homebrew/bin/ninja
Cleaning... 41 files.
[27/61] Compiling C object demos/plplay.p/plplay.c.o
../demos/plplay.c:229:15: warning: 'thread_safe_callbacks' is deprecated [-Wdeprecated-declarations]
    p->codec->thread_safe_callbacks = 1;
              ^
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavcodec/avcodec.h:1478:5: note: 'thread_safe_callbacks' has been explicitly marked deprecated here
    attribute_deprecated
    ^
/opt/homebrew/Cellar/ffmpeg/5.0/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
1 warning generated.
[61/61] Linking target demos/plplay
FAILED: demos/plplay
cc  -o demos/plplay demos/plplay.p/plplay.c.o demos/plplay.p/window.c.o demos/plplay.p/utils.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -Wl,-rpath,@loader_path/../src -Wl,-rpath,/opt/homebrew/Cellar/ffmpeg/5.0/lib -Wl,-rpath,/opt/homebrew/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,/opt/homebrew/Cellar/little-cms2/2.13/lib demos/libsdl-vk.a src/libplacebo.195.dylib demos/libnuklear.a /opt/homebrew/Cellar/ffmpeg/5.0/lib/libavcodec.dylib /opt/homebrew/Cellar/ffmpeg/5.0/lib/libavformat.dylib /opt/homebrew/Cellar/ffmpeg/5.0/lib/libavutil.dylib /opt/homebrew/lib/libSDL2.dylib /usr/local/lib/libvulkan.dylib -lm
Undefined symbols for architecture arm64:
  "_av_vkfmt_from_pixfmt", referenced from:
      _map_frame in plplay.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

OS: macOS 12.2.1 ( M1 )
Dependencies: Homebrew ffmpeg 5 ( built without vulkan support ), vulkan sdk for mac 1.2.198.1

@haasn
Copy link
Owner

haasn commented Feb 14, 2022

Hi, this is a known issue upstream. @cyanreg

I suppose we could work around it for plplay in particular.

@lavilao
Copy link

lavilao commented Apr 15, 2022

short answer:
add the demos=false option
long answer:
cd libplacebo-master
mkdir build && cd build
meson .. -D demos=false
cd ..
DESTDIR="/testt/" ninja -C build install
this will put the compiled libplacbo on a folder "/test" after you can copy it to your root and replace the distro provided ones, this was tested on manjaro hope it helps you

@haasn
Copy link
Owner

haasn commented Jul 5, 2022

Fixed upstream now.

@haasn haasn closed this as completed Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants