From e7713dc48e1581e2c539600ccc52cc0ba9c152cf Mon Sep 17 00:00:00 2001 From: barts Date: Wed, 17 Jan 2024 08:43:39 +0100 Subject: [PATCH 1/5] cmake: added release workflow. --- .github/workflows/release.yml | 66 +++++++ .github/workflows/tests.yml | 16 +- .gitignore | 1 + README.md | 89 ++++++++- app/CMakeLists.txt | 17 +- cmake/FindFFmpeg_patched.cmake | 334 +++++++++++++++++++++++++++++++++ scripts/configure | 87 +++++++++ scripts/install-ffmpeg | 150 +++++++++++++++ scripts/install-ffmpeg-static | 149 +++++++++++++++ scripts/install-qt | 33 ++-- scripts/install-vulkan | 21 +++ src/CMakeLists.txt | 24 ++- 12 files changed, 955 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 cmake/FindFFmpeg_patched.cmake create mode 100755 scripts/configure create mode 100755 scripts/install-ffmpeg create mode 100755 scripts/install-ffmpeg-static create mode 100755 scripts/install-vulkan diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4499b4c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: Release + +on: + push: + tags: + - 'v[0-9]+\.[0-9]+\.[0-9]+' + +jobs: + build-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Update apt-get database + run: | + sudo apt-get update -y + sudo apt-get upgrade -y + + - name: Install build dependencies + run: sudo apt-get install -y clang ninja-build git cmake llvm pkg-config + + - name: Install vulkan + run: ./scripts/install-vulkan + + - name: Install project dependencies + run: | + sudo apt-get install -y libboost-all-dev libspdlog-dev + + - name: Install ffmpeg + run: ./scripts/install-ffmpeg + + - name: Download Qt source + env: + QT_INSTALLER_JWT_TOKEN: ${{ secrets.QT_INSTALLER_JWT_TOKEN }} + run: | + mkdir /tmp/Qt + ./scripts/install-qt --root /tmp/Qt qt.qt6.661.src + + - name: Build Qt from source with static linking + env: + CC: gcc + CXX: g++ + CXXFLAGS: -Wall + run: | + sudo apt-get install -y '^libxcb.*-dev' build-essential libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libpulse-dev libqt5x11extras5 libssl-dev libssl1.0 libwayland-dev libwayland-egl1-mesa libwayland-server0 libx11-xcb-dev libxi-dev libxkbcommon-dev libxkbcommon-dev libxkbcommon-x11-dev libxrender-dev openssl + src=/tmp/Qt/6.6.1/Src + $src/configure -release -static -prefix $PWD/3rdparty/Qt -submodules qtbase,qtmultimedia,qtwayland -no-pch -no-gstreamer -- -S $src -B $src/build -Wdev -DFFMPEG_DIR=$PWD/3rdparty/ffmpeg + cmake --build $src/build + cmake --install $src/build + + - name: Build project + run: | + ./scripts/configure -- -DBUILD_TESTING=ON + cmake --build ./build --target package + + - name: Run tests + run: ctest --test-dir ./build --verbose + + - name: Publish + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + draft: true + files: ./build/*.tar.gz diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7199826..085ec51 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - develop pull_request: branches: - main @@ -18,25 +17,26 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Update apt-get database + - name: Install build dependencies run: | sudo apt-get update -y sudo apt-get upgrade -y + sudo apt-get install -y clang ninja-build git cmake - - name: Install build dependencies - run: sudo apt-get install -y clang ninja-build git cmake + - name: Install vulkan + run: ./scripts/install-vulkan - name: Install project dependencies env: QT_INSTALLER_JWT_TOKEN: ${{ secrets.QT_INSTALLER_JWT_TOKEN }} run: | - sudo apt-get install -y libboost-all-dev libspdlog-dev - sudo apt-get install -y build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5 '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libpulse-dev - ./scripts/install-qt + sudo apt-get install -y libboost-all-dev libspdlog-dev + sudo apt-get install -y build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5 '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libpulse-dev libwayland-dev libwayland-egl1-mesa libwayland-server0 + ./scripts/install-qt --root $PWD/3rdparty/Qt qt.qt6.661.gcc_64 qt.qt6.661.addons.qtmultimedia - name: Build project run: | - cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON + ./scripts/configure -- -DBUILD_TESTING=ON -DCMAKE_PREFIX_PATH=$PWD/3rdparty/Qt/6.6.1/gcc_64/lib/cmake cmake --build build - name: Run tests diff --git a/.gitignore b/.gitignore index 5199ba6..3e19acd 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ Session.vim nvim.shada include/version.h 3rdparty/Qt +3rdparty/ffmpeg # This file is used to ignore files which are generated # ---------------------------------------------------------------------------- diff --git a/README.md b/README.md index cb88264..30591af 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # README +[![Tests](https://github.com/BartSte/snapshot/actions/workflows/tests.yml/badge.svg)](https://github.com/BartSte/snapshot/actions/workflows/tests.yml) +[![Release](https://github.com/BartSte/snapshot/actions/workflows/release.yml/badge.svg)](https://github.com/BartSte/snapshot/actions/workflows/release.yml) + > WORK IN PROGRESS! > This project is still under development. The code is still experimental and > is subject to change. @@ -414,7 +417,58 @@ more information. to run the app. - [ ] Publish the directory tree as an archive as a release. Other more sophisticated release methods can be used later. - - Issues: + - Issue FFmpeg: + + - On ubuntu, the includes (headers I guess) are not included in the apt + package, in contrast to the arch package. As a solution, I build ffmpeg + from source. I build them with static linking which gives some new + issues when building the project. Now I am thinking.. I guess I have 3 + options: + + 1. statical link ffmpeg to the project. + 2. dynamically link ffmpeg to the project and include the ffmpeg libs in + the release. + 3. dynamically link ffmpeg to the project and let the user install ffmpeg + themselves. This could be useful when the user needs different + versions of ffmpeg to make it work with their hardware. + + On arch, I can just install static ffmpeg using AUR (its located at + /opt/ffmpeg063). + + Update: I think I fixed it: + + - I created the install-ffmpeg script to build ffmpeg from source. It is + installed in ./3rdparty/ffmpeg. + - After that, the -DFFMPEG_DIR=$PWD/3rdparty/ffmpeg flag is added to the + cmake command. This makes sure that the ffmpeg libs are found. This + results in: + + ``` + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DFFMPEG_DIR=$PWD/3rdparty/ffmpeg + ``` + + Now I hit a known bug: https://bugreports.qt.io/browse/QTBUG-115052 when + building ffmpeg statically. So, I can apply the patch that is provided + and try again -> now I get an error that some functions are not undefined + so I probably miss some libs... I will go forward with the shared ffmpeg. + In the pipeline, I get the following error: + + ``` + CMake Error at /home/runner/work/snapshot/snapshot/build/app/cmake_install.cmake:66 (file): + file Could not resolve runtime dependencies: + libavcodec.so.60 + libavutil.so.58 + libswresample.so.4 + Call Stack (most recent call first): + /home/runner/work/snapshot/snapshot/build/cmake_install.cmake:48 (include) + CPack Error: Error when generating package: snapshot + FAILED: CMakeFiles/package.util + cd /home/runner/work/snapshot/snapshot/build && /usr/local/bin/cpack --config ./CPackConfig.cmake + ninja: build stopped: subcommand failed. + Error: Process completed with exit code + ``` + + - Issues graphics: - On WSL I get the following error: @@ -425,11 +479,38 @@ more information. libEGL warning: egl: failed to create dri2 screen ``` - - On ubuntu, fresh install, I get the following error: + According to bing: ``` - barts@zbook:~$ ./snapshot-0.0.0-Linux/snapshot -h - 1012: __vdso_timeSegmentation fault + It seems that you are encountering an error while running your Qt app on + Arch Linux with WSL. The error message you provided indicates that the + vkCreateInstance function failed with the error code + VK_ERROR_INCOMPATIBLE_DRIVER. This error is usually caused by a mismatch + between the Vulkan driver and the hardware it is running on 1. + + One possible solution is to install the latest graphics drivers for your + system 2. Another possible solution is to try running the app without any + Vulkan layers at all 3. + + It’s also worth noting that there is an ongoing issue with + hardware-accelerated Vulkan in WSL2 4. You may want to check if this issue + is related to your problem. + + I hope this helps! ``` + An idea is to check for differences in the output of `pldd` when comparing + an snapshot app that uses a dynamic Qt6 and one that uses a static Qt6. I + the past, a dynamic Qt6 worked on WSL, so it is likely that something goes + wrong during the static linking. + + I think it has to do with support for the GPU. I think it is not possible + to make a stand-alone structure that support all GPU's. So it is likely to + be better that the user installs the GPU drivers themselves. I am not sure + what the best way is to do this. It does explain why the build on the + ubuntu server fails on my arch machine, but when I build it myself, it + works. This may also be the case on my WSL+arch machine when I install the + GPU drivers as is explained + [here](https://github.com/lutris/docs/blob/master/InstallingDrivers.md#amd--intel). + - [ ] Cross compile for raspberry pi diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index c3f6ae1..79bef49 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,7 +1,22 @@ add_executable(snapshot main.cpp ${CMAKE_SOURCE_DIR}/resources/resources.qrc) target_link_libraries(snapshot PRIVATE snapshotapp) -install(TARGETS snapshot RUNTIME_DEPENDENCIES POST_EXCLUDE_REGEXES ".*libc.*") +install( + TARGETS snapshot + RUNTIME_DEPENDENCIES + POST_EXCLUDE_REGEXES + ".*libc.*" + ".*libm\..*" + ".*libavcodec.*" + ".*libavdevice.*" + ".*libavfilter.*" + ".*libavformat.*" + ".*libavutil.*" + ".*libpostproc.*" + ".*libswresample.*" + ".*libswscale.*" + ".*libvmaf.*") +install(FILES ${FFMPEG_LIBRARIES} DESTINATION lib) install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/snapshot DESTINATION .) set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) diff --git a/cmake/FindFFmpeg_patched.cmake b/cmake/FindFFmpeg_patched.cmake new file mode 100644 index 0000000..a061221 --- /dev/null +++ b/cmake/FindFFmpeg_patched.cmake @@ -0,0 +1,334 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause +#.rst: +# FindFFmpeg +# ---------- +# +# Try to find the required ffmpeg components (default: AVFORMAT, AVUTIL, AVCODEC) +# +# Next variables can be used to hint FFmpeg libs search: +# +# :: +# +# PC__LIBRARY_DIRS +# PC_FFMPEG_LIBRARY_DIRS +# PC__INCLUDE_DIRS +# PC_FFMPEG_INCLUDE_DIRS +# +# Once done this will define +# +# :: +# +# FFMPEG_FOUND - System has the all required components. +# FFMPEG_INCLUDE_DIRS - Include directory necessary for using the required components headers. +# FFMPEG_LIBRARIES - Link these to use the required ffmpeg components. +# FFMPEG_LIBRARY_DIRS - Link directories +# FFMPEG_DEFINITIONS - Compiler switches required for using the required ffmpeg components. +# +# For each of the components it will additionally set. +# +# :: +# +# AVCODEC +# AVDEVICE +# AVFORMAT +# AVFILTER +# AVUTIL +# POSTPROC +# SWSCALE +# +# the following variables will be defined +# +# :: +# +# _FOUND - System has +# FFMPEG__FOUND - System has (as checked by FHSPA) +# _INCLUDE_DIRS - Include directory necessary for using the headers +# _LIBRARIES - Link these to use +# _LIBRARY_DIRS - Link directories +# _DEFINITIONS - Compiler switches required for using +# _VERSION - The components version +# +# the following import targets is created +# +# :: +# +# FFmpeg::FFmpeg - for all components +# FFmpeg:: - where in lower case (FFmpeg::avcodec) for each components +# +# Copyright (c) 2006, Matthias Kretz, +# Copyright (c) 2008, Alexander Neundorf, +# Copyright (c) 2011, Michael Jansen, +# Copyright (c) 2017, Alexander Drozdov, +# + +include(FindPackageHandleStandardArgs) + +# The default components were taken from a survey over other FindFFMPEG.cmake files +if (NOT FFmpeg_FIND_COMPONENTS) + set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL) +endif () + +# +### Macro: set_component_found +# +# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIRS is present. +# +macro(set_component_found _component ) + if (${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS) + # message(STATUS " - ${_component} found.") + set(${_component}_FOUND TRUE) + set(${CMAKE_FIND_PACKAGE_NAME}_${_component}_FOUND TRUE) + else () + # message(STATUS " - ${_component} not found.") + endif () +endmacro() + +find_package(PkgConfig QUIET) +if (NOT PKG_CONFIG_FOUND AND NOT FFMPEG_DIR) + set(FFMPEG_DIR "/usr/local") +endif() +# +### Macro: find_component +# +# Checks for the given component by invoking pkgconfig and then looking up the libraries and +# include directories. +# +macro(find_component _component _pkgconfig _library _header) + + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + if (PKG_CONFIG_FOUND AND NOT FFMPEG_DIR) + pkg_check_modules(PC_${_component} ${_pkgconfig}) + endif () + + if (FFMPEG_DIR OR FFMPEG_ROOT) + set(__find_ffmpeg_backup_root_dir "${CMAKE_FIND_ROOT_PATH}") + endif() + + if(FFMPEG_DIR) + list(APPEND CMAKE_FIND_ROOT_PATH "${FFMPEG_DIR}") + endif() + + if(FFMPEG_ROOT) + list(APPEND CMAKE_FIND_ROOT_PATH "${FFMPEG_ROOT}") + endif() + + find_path(${_component}_INCLUDE_DIRS ${_header} + HINTS + ${PC_${_component}_INCLUDEDIR} + ${PC_${_component}_INCLUDE_DIRS} + ${PC_FFMPEG_INCLUDE_DIRS} + PATHS + ${FFMPEG_DIR} + PATH_SUFFIXES + ffmpeg include + ) + + find_library(${_component}_LIBRARY NAMES ${PC_${_component}_LIBRARIES} ${_library} + HINTS + ${PC_${_component}_LIBDIR} + ${PC_${_component}_LIBRARY_DIRS} + ${PC_FFMPEG_LIBRARY_DIRS} + PATHS + ${FFMPEG_DIR} + PATH_SUFFIXES + lib + ) + + if(FFMPEG_DIR OR FFMPEG_ROOT) + set(CMAKE_FIND_ROOT_PATH "${__find_ffmpeg_backup_root_dir}") + endif() + + get_filename_component(${_component}_LIBRARY_DIR_FROM_FIND ${${_component}_LIBRARY} DIRECTORY) + get_filename_component(${_component}_LIBRARY_FROM_FIND ${${_component}_LIBRARY} NAME) + + set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.") + set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.") + set(${_component}_LIBRARY_DIRS ${${_component}_LIBRARY_DIR_FROM_FIND} CACHE STRING "The ${_component} library dirs.") + set(${_component}_LIBRARIES ${${_component}_LIBRARY_FROM_FIND} CACHE STRING "The ${_component} libraries.") + +# message("Libs" ${FFMPEG_DIR} ${${_component}_LIBRARIES} ${${_component}_LIBRARY_DIRS}) + +# message(STATUS "L0: ${${_component}_LIBRARIES}") +# message(STATUS "L1: ${PC_${_component}_LIBRARIES}") +# message(STATUS "L2: ${_library}") +# message(STATUS "L3: ${${_component}_LIBRARY}") +# message(STATUS "L4: ${${_component}_LIBRARY_DIRS}") + + set_component_found(${_component}) + mark_as_advanced( + ${_component}_LIBRARY + ${_component}_INCLUDE_DIRS + ${_component}_LIBRARY_DIRS + ${_component}_LIBRARIES + ${_component}_DEFINITIONS + ${_component}_VERSION) + +endmacro() + +# Clear the previously cached variables, because they are recomputed every time +# the Find script is included. +set(FFMPEG_INCLUDE_DIRS "") +set(FFMPEG_LIBRARIES "") +set(FFMPEG_DEFINITIONS "") +set(FFMPEG_LIBRARY_DIRS "") + +# Check for all possible component. +find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h) +find_component(AVFORMAT libavformat avformat libavformat/avformat.h) +find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h) +find_component(AVUTIL libavutil avutil libavutil/avutil.h) +find_component(AVFILTER libavfilter avfilter libavfilter/avfilter.h) +find_component(SWSCALE libswscale swscale libswscale/swscale.h) +find_component(POSTPROC libpostproc postproc libpostproc/postprocess.h) +find_component(SWRESAMPLE libswresample swresample libswresample/swresample.h) + +# Linking to private FFmpeg libraries is only needed if it was built statically +# Only one of the components needs to be tested +if(AVCODEC_LIBRARY AND ${AVCODEC_LIBRARY} MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") + set(FFMPEG_IS_STATIC TRUE CACHE INTERNAL "") +endif() + +if (FFMPEG_IS_STATIC AND (ANDROID OR LINUX)) + set(ENABLE_DYNAMIC_RESOLVE_OPENSSL_SYMBOLS TRUE CACHE INTERNAL "") +endif() + +set(ENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS ${LINUX} CACHE INTERNAL "") + +function(__try_add_dynamic_resolve_dependency dep added) + set(added TRUE PARENT_SCOPE) + + if(ENABLE_DYNAMIC_RESOLVE_OPENSSL_SYMBOLS AND + (${dep} STREQUAL "ssl" OR ${dep} STREQUAL "crypto")) + set(DYNAMIC_RESOLVE_OPENSSL_SYMBOLS TRUE CACHE INTERNAL "") + elseif(ENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS AND ${dep} STREQUAL "va") + set(DYNAMIC_RESOLVE_VAAPI_SYMBOLS TRUE CACHE INTERNAL "") + elseif(ENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS AND ${dep} STREQUAL "va-drm") + set(DYNAMIC_RESOLVE_VA_DRM_SYMBOLS TRUE CACHE INTERNAL "") + elseif(ENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS AND ${dep} STREQUAL "va-x11") + set(DYNAMIC_RESOLVE_VA_X11_SYMBOLS TRUE CACHE INTERNAL "") + else() + set(added FALSE PARENT_SCOPE) + endif() +endfunction() + +# Function parses package config file to find the static library dependencies +# and adds them to the target library. +function(__ffmpeg_internal_set_dependencies lib) + set(PC_FILE ${FFMPEG_DIR}/lib/pkgconfig/lib${lib}.pc) + if(EXISTS ${PC_FILE}) + file(READ ${PC_FILE} pcfile) + + set(prefix_l "(^| )\\-l") + set(suffix_lib "\\.lib($| )") + + string(REGEX REPLACE ".*Libs:([^\n\r]+).*" "\\1" out "${pcfile}") + string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_dependency ${out}) + string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_dependency_lib ${out}) + + string(REGEX REPLACE ".*Libs.private:([^\n\r]+).*" "\\1" out "${pcfile}") + string(REGEX MATCHALL "${prefix_l}[^ ]+" libs_private_dependency ${out}) + string(REGEX MATCHALL "[^ ]+${suffix_lib}" libs_private_dependency_lib ${out}) + + list(APPEND deps_no_suffix ${libs_dependency} ${libs_private_dependency}) + foreach(dependency ${deps_no_suffix}) + string(REGEX REPLACE ${prefix_l} "" dependency ${dependency}) + if(NOT ${lib} STREQUAL ${dependency}) + __try_add_dynamic_resolve_dependency(${dependency} added) + if(NOT added) + target_link_libraries(FFmpeg::${lib} INTERFACE ${dependency}) + endif() + endif() + endforeach() + + list(APPEND deps_lib_suffix ${libs_dependency_lib} ${libs_private_dependency_lib}) + foreach(dependency ${deps_lib_suffix}) + string(REGEX REPLACE ${suffix_lib} "" dependency ${dependency}) + target_link_libraries(FFmpeg::${lib} INTERFACE ${dependency}) + endforeach() + endif() +endfunction() + +# Check for cached results. If there are skip the costly part. +#if (NOT FFMPEG_LIBRARIES) + + # Check if the required components were found and add their stuff to the FFMPEG_* vars. + foreach (_component ${FFmpeg_FIND_COMPONENTS}) + if (${_component}_FOUND) + # message(STATUS "Libs: ${${_component}_LIBRARIES} | ${PC_${_component}_LIBRARIES}") + + # message(STATUS "Required component ${_component} present.") + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARY}) + set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS}) + + list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS}) + list(APPEND FFMPEG_LIBRARY_DIRS ${${_component}_LIBRARY_DIRS}) + + string(TOLOWER ${_component} _lowerComponent) + if (NOT TARGET FFmpeg::${_lowerComponent}) + add_library(FFmpeg::${_lowerComponent} INTERFACE IMPORTED) + set_target_properties(FFmpeg::${_lowerComponent} PROPERTIES + INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES ${${_component}_INCLUDE_DIRS} + INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY}" + INTERFACE_LINK_DIRECTORIES "${${_component}_LIBRARY_DIRS}" + ) + target_link_libraries(FFmpeg::${_lowerComponent} INTERFACE "${${_component}_LIBRARY}") + if(FFMPEG_IS_STATIC) + __ffmpeg_internal_set_dependencies(${_lowerComponent}) + endif() + + if (UNIX AND NOT APPLE) + target_link_options(FFmpeg::${_lowerComponent} INTERFACE "-Wl,--exclude-libs=lib${_lowerComponent}") + endif () + endif() + else() + # message(STATUS "Required component ${_component} missing.") + endif() + endforeach () + + # Build the include path with duplicates removed. + if (FFMPEG_INCLUDE_DIRS) + list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) + endif () + + # cache the vars. + set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE) + set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg cflags." FORCE) + set(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBRARY_DIRS} CACHE STRING "The FFmpeg library dirs." FORCE) + + mark_as_advanced(FFMPEG_INCLUDE_DIRS + FFMPEG_LIBRARIES + FFMPEG_DEFINITIONS + FFMPEG_LIBRARY_DIRS) + +#endif () + +if (NOT TARGET FFmpeg::FFmpeg) + add_library(FFmpeg INTERFACE) + set_target_properties(FFmpeg PROPERTIES + INTERFACE_COMPILE_OPTIONS "${FFMPEG_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${FFMPEG_LIBRARIES}" + INTERFACE_LINK_DIRECTORIES "${FFMPEG_LIBRARY_DIRS}") + add_library(FFmpeg::FFmpeg ALIAS FFmpeg) +endif() + +# Now set the noncached _FOUND vars for the components. +foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE) + set_component_found(${_component}) +endforeach () + +# Compile the list of required vars +set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS) +foreach (_component ${FFmpeg_FIND_COMPONENTS}) + list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS) +endforeach () + +# Give a nice error message if some of the required vars are missing. +find_package_handle_standard_args(FFmpeg + REQUIRED_VARS ${_FFmpeg_REQUIRED_VARS} + HANDLE_COMPONENTS +) diff --git a/scripts/configure b/scripts/configure new file mode 100755 index 0000000..7dee053 --- /dev/null +++ b/scripts/configure @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +set -euo pipefail + +usage="Usage: $0 +Configures a build of the project. It is assumed that the depedencies are +installed and are discoverable by cmake. The following is the default behavior: +- The generator is Ninja +- The build type is Release +- The build is stored in a folder named build in the root of the project +- The testst are not build (can be enabled with \`-- -DBUILD_TESTING=ON\`) + +All arguments after -- are directly appended to cmake. + +Additionally, the following is supported by default: +- A custom build of Qt 6.6 may be located at 3rdparty/Qt +- A custom build of ffmpeg may be located at 3rdparty/ffmpeg, where: + - 3rdparty/ffmpeg/lib contains the shared libraries + - 3rdparty/ffmpeg/include contains the headers + +Options: + --help Show this help message + --clean Remove the build folder before configuring + --no-patch Do not patch FindFFmpeg.cmake to fix a bug in Qt 6.6" + +this_dir=$(dirname "$(realpath "${BASH_SOURCE:-$0}")") + +root="$this_dir/.." +patch=true +qt_dir="$root/3rdparty/Qt" +ffmpeg_dir="$root/3rdparty/ffmpeg" + +clean() { + echo "Remove old build folder" + rm "$root/build" -rf || true +} + +copy_patched_findffmpeg() { + echo "Apply patch to fix FindFFmpeg.cmake" + original="$qt_dir/lib/cmake/Qt6/FindFFmpeg.cmake" + rm "$original" || true + cp "$root/cmake/FindFFmpeg_patched.cmake" "$original" +} + +configure() { + echo "Configure build" + cmake \ + -G "Ninja" \ + -S "$root" \ + -B "$root/build" \ + -DBUILD_TESTING=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DFFMPEG_DIR="$ffmpeg_dir" \ + -DCMAKE_PREFIX_PATH="$qt_dir/lib/cmake" \ + "$@" +} + +while [[ $# -gt 0 ]]; do + case "$1" in + --help) + echo "$usage" + exit 0 + ;; + --clean) + clean + shift + ;; + --no-patch) + patch=false + shift + ;; + --) + shift + break + ;; + *) + echo "Unknown argument: $1" + echo "$usage" + exit 1 + ;; + esac +done + +if [[ -d "$qt_dir/lib/cmake/Qt6" && "$patch" == true ]]; then + copy_patched_findffmpeg +fi + +configure "$@" diff --git a/scripts/install-ffmpeg b/scripts/install-ffmpeg new file mode 100755 index 0000000..96c823b --- /dev/null +++ b/scripts/install-ffmpeg @@ -0,0 +1,150 @@ +#!/usr/bin/env bash +set -euxo pipefail + +this_dir=$(dirname "$(realpath "${BASH_SOURCE:-$0}")") +usage="$(basename "$0") [-h] [-s, --source-dir] [-b, --build-dir] -- Compiles ffmpeg from source + +The packages managers \`apt\` and \`pacman\` are supported. + +where: + -h, --help show this help text + -s, --source-dir ffmpeg source directory (default: $HOME/ffmpeg_sources) + -b, --build-dir ffmpeg build directory (default: $this_dir/../3rdparty/ffmpeg)" + +source_dir="$HOME/ffmpeg_sources" +build_dir="$this_dir/../3rdparty/ffmpeg" +while [[ $# -gt 0 ]]; do + key="$1" + case $key in + -h | --help) + echo "$usage" + exit + ;; + -s | --source-dir) + source_dir="$2" + shift + shift + ;; + -b | --build-dir) + build_dir="$2" + shift + shift + ;; + *) + echo "Unknown option: $key" + echo "$usage" + exit 1 + ;; + esac +done +bin_dir="$build_dir/bin" + +install_dependencies() { + if command -v apt-get &>/dev/null; then + echo "apt-get found" + install_dependencies_apt + elif command -v pacman &>/dev/null; then + echo "pacman found" + install_dependencies_pacman + else + echo "No supported package manager found" + exit 1 + fi +} + +install_dependencies_apt() { + echo "Updating apt-get" + sudo apt-get update -qq + echo "Installing build tools and dependencies" + sudo apt-get -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev gnutls-bin libunistring-dev libaom-dev libdav1d-dev tar + + echo "Installing ffmpeg dependencies" + sudo apt-get -y install nasm libx264-dev libx265-dev libvpx-dev libfdk-aac-dev libopus-dev libdav1d-dev libnuma-dev +} + +install_dependencies_pacman() { + echo "Installing build tools and dependencies" + sudo pacman -S --noconfirm --needed autoconf automake cmake git libass freetype2 sdl2 libtool libva libvdpau libvorbis libxcb meson ninja pkgconf texinfo wget yasm zlib gnutls libunistring aom dav1d tar + + echo "Installing ffmpeg dependencies" + sudo pacman -S --noconfirm --needed nasm x264 x265 libvpx fdkaac opus numactl +} + +compile_libaom() { + echo "Compiling libaom" + cd ~/ffmpeg_sources && + git -C aom pull 2>/dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && + mkdir -p aom_build && + cd aom_build && + PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$build_dir" -DENABLE_TESTS=OFF -DENABLE_NASM=on ../aom && + PATH="$bin_dir:$PATH" make -j"$(nproc)" && + make install +} + +compile_libsvtav1() { + echo "Compiling libsvtav1" + cd ~/ffmpeg_sources && + git -C SVT-AV1 pull 2>/dev/null || git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git && + mkdir -p SVT-AV1/build && + cd SVT-AV1/build && + PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$build_dir" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. && + PATH="$bin_dir:$PATH" make -j"$(nproc)" && + make install +} + +compile_libvmaf() { + echo "Compiling libvmaf" + cd ~/ffmpeg_sources && + wget https://github.com/Netflix/vmaf/archive/v2.3.1.tar.gz && tar xvf v2.3.1.tar.gz && + mkdir -p vmaf-2.3.1/libvmaf/build && + cd vmaf-2.3.1/libvmaf/build && + meson setup -Denable_tests=false -Denable_docs=false --buildtype=release --default-library=static .. --prefix "$build_dir" --bindir="$bin_dir" --libdir="$build_dir/lib" && + ninja && + ninja install +} + +compile_ffmpeg() { + echo "Compiling ffmpeg" + cd ~/ffmpeg_sources && + wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && + tar xjvf ffmpeg-snapshot.tar.bz2 && + cd ffmpeg && + PATH="$bin_dir:$PATH" PKG_CONFIG_PATH="$build_dir/lib/pkgconfig" ./configure \ + --prefix="$build_dir" \ + --enable-shared \ + --disable-static \ + --extra-cflags="-I$build_dir/include" \ + --extra-ldflags="-L$build_dir/lib" \ + --extra-libs="-lpthread -lm" \ + --ld="g++" \ + --bindir="$bin_dir" \ + --enable-gpl \ + --enable-gnutls \ + --enable-libaom \ + --enable-libass \ + --enable-libfdk-aac \ + --enable-libfreetype \ + --enable-libmp3lame \ + --enable-libopus \ + --enable-libsvtav1 \ + --enable-libdav1d \ + --enable-libvorbis \ + --enable-libvpx \ + --enable-libx264 \ + --enable-libx265 \ + --enable-nonfree && + PATH="$bin_dir:$PATH" make -j"$(nproc)" && + make install && + hash -r +} + +dir=$(pwd) + +mkdir -p "$source_dir" "$bin_dir" +install_dependencies +compile_libaom +compile_libsvtav1 +compile_libvmaf +compile_ffmpeg + +cd "$dir" diff --git a/scripts/install-ffmpeg-static b/scripts/install-ffmpeg-static new file mode 100755 index 0000000..fe05648 --- /dev/null +++ b/scripts/install-ffmpeg-static @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +set -euxo pipefail + +this_dir=$(dirname "$(realpath "${BASH_SOURCE:-$0}")") +usage="$(basename "$0") [-h] [-s, --source-dir] [-b, --build-dir] -- Compiles ffmpeg from source + +The packages managers \`apt\` and \`pacman\` are supported. + +where: + -h, --help show this help text + -s, --source-dir ffmpeg source directory (default: $HOME/ffmpeg_sources) + -b, --build-dir ffmpeg build directory (default: $this_dir/../3rdparty/ffmpeg)" + +source_dir="$HOME/ffmpeg_sources" +build_dir="$this_dir/../3rdparty/ffmpeg" +while [[ $# -gt 0 ]]; do + key="$1" + case $key in + -h | --help) + echo "$usage" + exit + ;; + -s | --source-dir) + source_dir="$2" + shift + shift + ;; + -b | --build-dir) + build_dir="$2" + shift + shift + ;; + *) + echo "Unknown option: $key" + echo "$usage" + exit 1 + ;; + esac +done +bin_dir="$build_dir/bin" + +install_dependencies() { + if command -v apt-get &>/dev/null; then + echo "apt-get found" + install_dependencies_apt + elif command -v pacman &>/dev/null; then + echo "pacman found" + install_dependencies_pacman + else + echo "No supported package manager found" + exit 1 + fi +} + +install_dependencies_apt() { + echo "Updating apt-get" + sudo apt-get update -qq + echo "Installing build tools and dependencies" + sudo apt-get -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev gnutls-bin libunistring-dev libaom-dev libdav1d-dev tar + + echo "Installing ffmpeg dependencies" + sudo apt-get -y install nasm libx264-dev libx265-dev libvpx-dev libfdk-aac-dev libopus-dev libdav1d-dev libnuma-dev +} + +install_dependencies_pacman() { + echo "Installing build tools and dependencies" + sudo pacman -S --noconfirm --needed autoconf automake cmake git libass freetype2 sdl2 libtool libva libvdpau libvorbis libxcb meson ninja pkgconf texinfo wget yasm zlib gnutls libunistring aom dav1d tar + + echo "Installing ffmpeg dependencies" + sudo pacman -S --noconfirm --needed nasm x264 x265 libvpx fdkaac opus numactl +} + +compile_libaom() { + echo "Compiling libaom" + cd ~/ffmpeg_sources && + git -C aom pull 2>/dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && + mkdir -p aom_build && + cd aom_build && + PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$build_dir" -DENABLE_TESTS=OFF -DENABLE_NASM=on ../aom && + PATH="$bin_dir:$PATH" make -j"$(nproc)" && + make install +} + +compile_libsvtav1() { + echo "Compiling libsvtav1" + cd ~/ffmpeg_sources && + git -C SVT-AV1 pull 2>/dev/null || git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git && + mkdir -p SVT-AV1/build && + cd SVT-AV1/build && + PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$build_dir" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. && + PATH="$bin_dir:$PATH" make -j"$(nproc)" && + make install +} + +compile_libvmaf() { + echo "Compiling libvmaf" + cd ~/ffmpeg_sources && + wget https://github.com/Netflix/vmaf/archive/v2.3.1.tar.gz && tar xvf v2.3.1.tar.gz && + mkdir -p vmaf-2.3.1/libvmaf/build && + cd vmaf-2.3.1/libvmaf/build && + meson setup -Denable_tests=false -Denable_docs=false --buildtype=release --default-library=static .. --prefix "$build_dir" --bindir="$bin_dir" --libdir="$build_dir/lib" && + ninja && + ninja install +} + +compile_ffmpeg() { + echo "Compiling ffmpeg" + cd ~/ffmpeg_sources && + wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && + tar xjvf ffmpeg-snapshot.tar.bz2 && + cd ffmpeg && + PATH="$bin_dir:$PATH" PKG_CONFIG_PATH="$build_dir/lib/pkgconfig" ./configure \ + --pkg-config-flags="--static" \ + --prefix="$build_dir" \ + --extra-cflags="-I$build_dir/include" \ + --extra-ldflags="-L$build_dir/lib" \ + --extra-libs="-lpthread -lm" \ + --ld="g++" \ + --bindir="$bin_dir" \ + --enable-gpl \ + --enable-gnutls \ + --enable-libaom \ + --enable-libass \ + --enable-libfdk-aac \ + --enable-libfreetype \ + --enable-libmp3lame \ + --enable-libopus \ + --enable-libsvtav1 \ + --enable-libdav1d \ + --enable-libvorbis \ + --enable-libvpx \ + --enable-libx264 \ + --enable-libx265 \ + --enable-nonfree && + PATH="$bin_dir:$PATH" make -j"$(nproc)" && + make install && + hash -r +} + +dir=$(pwd) + +mkdir -p "$source_dir" "$bin_dir" +install_dependencies +compile_libaom +compile_libsvtav1 +compile_libvmaf +compile_ffmpeg + +cd "$dir" diff --git a/scripts/install-qt b/scripts/install-qt index 55bbd48..5caae82 100755 --- a/scripts/install-qt +++ b/scripts/install-qt @@ -1,7 +1,7 @@ #!/usr/bin/env bash -set -euo pipefail +set -euxo pipefail -usage="Usage: $0 +usage="Usage: $0 Installs Qt 6.6.1 to 3rdparty/Qt. For this script to work, you need to set the QT_INSTALLER_JWT_TOKEN environment variable to your jwt token. Check the @@ -11,21 +11,32 @@ Optionally, you can add more Qt packages to install by adding them as arguments. Options: + -r, --root The root directory to install Qt to. -h, --help Show this help message and exit" -if [[ "$*" == *-h* ]] || [[ "$*" == *--help* ]]; then - echo "$usage" - exit 0 -fi +packages="" +while [[ $# -gt 0 ]]; do + case "$1" in + -r | --root) + install_dir="$2" + shift + shift + ;; + -h | --help) + echo "$usage" + exit 0 + ;; + *) + packages="$packages $1" + shift + ;; + esac +done tmp_dir=$(mktemp -d) -this_dir=$(dirname "$(realpath "${BASH_SOURCE:-$0}")") -install_dir="$this_dir/../3rdparty/Qt" -base="qt.qt6.661.gcc_64" -multimedia="qt.qt6.661.addons.qtmultimedia" curl "https://d13lb3tujbc8s0.cloudfront.net/onlineinstallers/qt-unified-linux-x64-4.6.1-online.run" -o "$tmp_dir/qt-installer.run" chmod +x "$tmp_dir/qt-installer.run" -"$tmp_dir/qt-installer.run" --root "$install_dir" --accept-licenses --accept-obligations --default-answer --confirm-command install $base $multimedia $@ +"$tmp_dir/qt-installer.run" --root "$install_dir" --accept-licenses --accept-obligations --default-answer --confirm-command install $packages rm -rf "$tmp_dir" diff --git a/scripts/install-vulkan b/scripts/install-vulkan new file mode 100755 index 0000000..5ae794c --- /dev/null +++ b/scripts/install-vulkan @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euxo pipefail + +usage="Usage: install-vulkan + +Used when running apt package manager to install vulkan sdk using a PPA +repository" + +while [[ $# -gt 0 ]]; do + case "$1" in + -h | --help) + echo "$usage" + exit 0 + ;; + esac +done + +wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc +sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list +sudo apt update +sudo apt -y install vulkan-sdk diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 04f0445..ab80f41 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,11 +1,8 @@ -list(APPEND CMAKE_PREFIX_PATH - ${CMAKE_SOURCE_DIR}/3rdparty/Qt/6.6.1/gcc_64/lib/cmake) -list(APPEND CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/3rdparty/Qt/lib/cmake) - set(Boost_USE_STATIC_LIBS ON) find_package(spdlog REQUIRED) find_package(Boost REQUIRED COMPONENTS filesystem) -find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia MultimediaWidgets) +find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia MultimediaWidgets + WaylandClient) message(STATUS "Qt6 was found at ${Qt6_DIR}") @@ -27,7 +24,18 @@ target_link_libraries( Qt6::Widgets Qt6::Multimedia Qt6::MultimediaWidgets - Qt6::QWaylandIntegrationPlugin) + Qt6::QWaylandEglPlatformIntegrationPlugin + Qt6::QWaylandIntegrationPlugin + Qt6::QXcbIntegrationPlugin + Qt6::QFFmpegMediaPlugin) -qt_import_plugins(snapshotapp INCLUDE_BY_TYPE platforms - Qt6::QWaylandIntegrationPlugin) +qt_import_plugins( + snapshotapp + INCLUDE_BY_TYPE + platforms + Qt6::QWaylandEglPlatformIntegrationPlugin + Qt6::QWaylandIntegrationPlugin + Qt6::QXcbIntegrationPlugin + INCLUDE_BY_TYPE + multimedia + Qt6::QFFmpegMediaPlugin) From eb32960517cffcf2d0f703614900ef60b1dd5d8f Mon Sep 17 00:00:00 2001 From: barts Date: Wed, 17 Jan 2024 09:23:35 +0100 Subject: [PATCH 2/5] fix: exclude c libs from release --- app/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 79bef49..0a77f97 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -5,8 +5,13 @@ install( TARGETS snapshot RUNTIME_DEPENDENCIES POST_EXCLUDE_REGEXES + # Compatability with standard C libraries across linux distributions + # is assumed. ".*libc.*" ".*libm\..*" + ".*libdbm\..*" + ".*libpthread\..*" + # FFmpeg libraries are added manually below due to an unknown issue. ".*libavcodec.*" ".*libavdevice.*" ".*libavfilter.*" @@ -16,7 +21,11 @@ install( ".*libswresample.*" ".*libswscale.*" ".*libvmaf.*") + +# Copy FFmpeg libraries to the install directory. install(FILES ${FFMPEG_LIBRARIES} DESTINATION lib) + +# Copy the entrypoint to the install directory. install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/snapshot DESTINATION .) set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) From eb098e7289fe26391d4ae7cc9a6754b56fa381e7 Mon Sep 17 00:00:00 2001 From: barts Date: Wed, 17 Jan 2024 10:44:21 +0100 Subject: [PATCH 3/5] fix: add platform plugins --- README.md | 230 +++++++++++++++++++++++++++++++++++---------- src/CMakeLists.txt | 22 +++-- 2 files changed, 195 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 30591af..50826b9 100644 --- a/README.md +++ b/README.md @@ -417,56 +417,186 @@ more information. to run the app. - [ ] Publish the directory tree as an archive as a release. Other more sophisticated release methods can be used later. - - Issue FFmpeg: - - - On ubuntu, the includes (headers I guess) are not included in the apt - package, in contrast to the arch package. As a solution, I build ffmpeg - from source. I build them with static linking which gives some new - issues when building the project. Now I am thinking.. I guess I have 3 - options: - - 1. statical link ffmpeg to the project. - 2. dynamically link ffmpeg to the project and include the ffmpeg libs in - the release. - 3. dynamically link ffmpeg to the project and let the user install ffmpeg - themselves. This could be useful when the user needs different - versions of ffmpeg to make it work with their hardware. - - On arch, I can just install static ffmpeg using AUR (its located at - /opt/ffmpeg063). - - Update: I think I fixed it: - - - I created the install-ffmpeg script to build ffmpeg from source. It is - installed in ./3rdparty/ffmpeg. - - After that, the -DFFMPEG_DIR=$PWD/3rdparty/ffmpeg flag is added to the - cmake command. This makes sure that the ffmpeg libs are found. This - results in: - - ``` - cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DFFMPEG_DIR=$PWD/3rdparty/ffmpeg - ``` - - Now I hit a known bug: https://bugreports.qt.io/browse/QTBUG-115052 when - building ffmpeg statically. So, I can apply the patch that is provided - and try again -> now I get an error that some functions are not undefined - so I probably miss some libs... I will go forward with the shared ffmpeg. - In the pipeline, I get the following error: - - ``` - CMake Error at /home/runner/work/snapshot/snapshot/build/app/cmake_install.cmake:66 (file): - file Could not resolve runtime dependencies: - libavcodec.so.60 - libavutil.so.58 - libswresample.so.4 - Call Stack (most recent call first): - /home/runner/work/snapshot/snapshot/build/cmake_install.cmake:48 (include) - CPack Error: Error when generating package: snapshot - FAILED: CMakeFiles/package.util - cd /home/runner/work/snapshot/snapshot/build && /usr/local/bin/cpack --config ./CPackConfig.cmake - ninja: build stopped: subcommand failed. - Error: Process completed with exit code - ``` + + - Ffmpeg libs are missing from build? And also other libs? This is the ldd + afterd the LD_LIBRARY_PATH is set to ./lib: + + ``` + # Assumed to be on system + linux-vdso.so.1 (0x00007fff26bdf000) + libm.so.6 => /usr/lib/libm.so.6 (0x00007f822530f000) + libc.so.6 => /usr/lib/libc.so.6 (0x00007f8224e1e000) + /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f822a7d1000) + + libz.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libz.so.1 (0x00007f8225c5b000) + libSM.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libSM.so.6 (0x00007f8226035000) + libEGL.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libEGL.so.1 (0x00007f8225c9e000) + libGLX.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libGLX.so.0 (0x00007f82275cc000) + libICE.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libICE.so.6 (0x00007f8226016000) + libX11.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libX11.so.6 (0x00007f82262c0000) + libdrm.so.2 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libdrm.so.2 (0x00007f8225c88000) + libfmt.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libfmt.so.8 (0x00007f822a7ae000) + libgbm.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgbm.so.1 (0x00007f8225c77000) + libxcb.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb.so.1 (0x00007f8225cb1000) + libffi.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libffi.so.8 (0x00007f8225b76000) + libbsd.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libbsd.so.0 (0x00007f8219cff000) + libXau.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXau.so.6 (0x00007f8223682000) + libogg.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libogg.so.0 (0x00007f821663a000) + liblz4.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/liblz4.so.1 (0x00007f8215896000) + libXext.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXext.so.6 (0x00007f8228eec000) + libjpeg.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libjpeg.so.8 (0x00007f8225d7f000) + libtiff.so.5 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libtiff.so.5 (0x00007f8225cf8000) + libudev.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libudev.so.1 (0x00007f8225ba7000) + libzstd.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libzstd.so.1 (0x00007f8225536000) + liblzma.so.5 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/liblzma.so.5 (0x00007f8224650000) + libopus.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libopus.so.0 (0x00007f82237a2000) + libwebp.so.7 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwebp.so.7 (0x00007f8222993000) + libuuid.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libuuid.so.1 (0x00007f8223691000) + libjbig.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libjbig.so.0 (0x00007f8222927000) + libpcre.so.3 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpcre.so.3 (0x00007f821858a000) + libFLAC.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libFLAC.so.8 (0x00007f821571c000) + libpulse.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpulse.so.0 (0x00007f8228f53000) + libgcc_s.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgcc_s.so.1 (0x00007f8225b83000) + libexpat.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libexpat.so.1 (0x00007f8219d17000) + libXdmcp.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXdmcp.so.6 (0x00007f8222456000) + libOpenGL.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libOpenGL.so.0 (0x00007f8228ebe000) + libXrandr.so.2 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXrandr.so.2 (0x00007f8228f01000) + libdbus-1.so.3 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libdbus-1.so.3 (0x00007f82260db000) + libicuuc.so.70 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libicuuc.so.70 (0x00007f8225605000) + libpng16.so.16 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpng16.so.16 (0x00007f8227591000) + libstdc++.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libstdc++.so.6 (0x00007f8225000000) + libvorbis.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libvorbis.so.0 (0x00007f8223775000) + libX11-xcb.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libX11-xcb.so.1 (0x00007f8226011000) + libgio-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgio-2.0.so.0 (0x00007f8228fa8000) + libxcb-glx.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-glx.so.0 (0x00007f8225cdb000) + libxcb-shm.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-shm.so.0 (0x00007f8226088000) + libxcb-xkb.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-xkb.so.1 (0x00007f8226040000) + libselinux.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libselinux.so.1 (0x00007f8225293000) + libXrender.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXrender.so.1 (0x00007f8223c9a000) + libsystemd.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libsystemd.so.0 (0x00007f8219939000) + libdeflate.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libdeflate.so.0 (0x00007f8219cdb000) + libpcre2-8.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpcre2-8.so.0 (0x00007f82184f3000) + libsndfile.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libsndfile.so.1 (0x00007f8218474000) + libasyncns.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libasyncns.so.0 (0x00007f8219cd3000) + libgcrypt.so.20 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgcrypt.so.20 (0x00007f8215758000) + libfreetype.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libfreetype.so.6 (0x00007f8226129000) + libglib-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libglib-2.0.so.0 (0x00007f82253fc000) + libharfbuzz.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libharfbuzz.so.0 (0x00007f82261f1000) + libicui18n.so.70 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libicui18n.so.70 (0x00007f8225800000) + libpcre2-16.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpcre2-16.so.0 (0x00007f8225bd1000) + libxcb-sync.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-sync.so.1 (0x00007f822607e000) + libxcb-util.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-util.so.1 (0x00007f8223688000) + libicudata.so.70 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libicudata.so.70 (0x00007f8216800000) + libapparmor.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libapparmor.so.1 (0x00007f82198d2000) + libbrotlidec.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libbrotlidec.so.1 (0x00007f82291e1000) + libxcb-icccm.so.4 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-icccm.so.4 (0x00007f8228b57000) + libxcb-image.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-image.so.0 (0x00007f8228b51000) + libxcb-randr.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-randr.so.0 (0x00007f822752f000) + libxcb-shape.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-shape.so.0 (0x00007f822605e000) + libxkbcommon.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxkbcommon.so.0 (0x00007f8226094000) + libvorbisenc.so.2 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libvorbisenc.so.2 (0x00007f82236ca000) + libgraphite2.so.3 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgraphite2.so.3 (0x00007f8222dd9000) + libgpg-error.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgpg-error.so.0 (0x00007f821563d000) + libfontconfig.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libfontconfig.so.1 (0x00007f8227547000) + libxcb-cursor.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-cursor.so.0 (0x00007f8225e00000) + libxcb-render.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-render.so.0 (0x00007f8226063000) + libxcb-xfixes.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-xfixes.so.0 (0x00007f8226072000) + libGLdispatch.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libGLdispatch.so.0 (0x00007f8219d48000) + libgobject-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgobject-2.0.so.0 (0x00007f8229181000) + libwayland-egl.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-egl.so.1 (0x00007f822a7a9000) + libxcb-keysyms.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-keysyms.so.1 (0x00007f8227542000) + libgmodule-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgmodule-2.0.so.0 (0x00007f8225b4c000) + libbrotlicommon.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libbrotlicommon.so.1 (0x00007f8225b53000) + libxkbcommon-x11.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxkbcommon-x11.so.0 (0x00007f8228b5e000) + libwayland-client.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-client.so.0 (0x00007f82291ef000) + libwayland-cursor.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-cursor.so.0 (0x00007f822a79f000) + libwayland-server.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-server.so.0 (0x00007f8219923000) + libxcb-render-util.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-render-util.so.0 (0x00007f822608d000) + libpulsecommon-15.99.so => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpulsecommon-15.99.so (0x00007f8224d99000) + + # FFmpeg libs are missing... + libavformat.so.60 => /usr/lib/libavformat.so.60 (0x00007f8228c00000) + libavcodec.so.60 => /usr/lib/libavcodec.so.60 (0x00007f8227600000) + libswresample.so.4 => /usr/lib/libswresample.so.4 (0x00007f8228f10000) + libswscale.so.7 => /usr/lib/libswscale.so.7 (0x00007f8228b69000) + libavutil.so.58 => /usr/lib/libavutil.so.58 (0x00007f8226400000) + + # Other missing libs? + libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007f822245e000) + libSvtAv1Enc.so.1 => /usr/lib/libSvtAv1Enc.so.1 (0x00007f8219e00000) + libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f8216632000) + libaom.so.3 => /usr/lib/libaom.so.3 (0x00007f8222e00000) + libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f82198e7000) + libbluray.so.2 => /usr/lib/libbluray.so.2 (0x00007f8224860000) + libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007f82166f1000) + libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f8225b39000) + libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f8218430000) + libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f8223ceb000) + libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f821661f000) + libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f8215a00000) + libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f8215627000) + libdav1d.so.7 => /usr/lib/libdav1d.so.7 (0x00007f8223e24000) + libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f821566e000) + libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f821606a000) + libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f82247ba000) + libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f8224400000) + libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f82158b6000) + libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f8224635000) + libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f8216650000) + libhwy.so.1 => /usr/lib/libhwy.so.1 (0x00007f8216645000) + libicudata.so.74 => /usr/lib/libicudata.so.74 (0x00007f8213800000) + libicuuc.so.74 => /usr/lib/libicuuc.so.74 (0x00007f8216400000) + libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f8218452000) + libjbig.so.2.1 => /usr/lib/libjbig.so.2.1 (0x00007f8215630000) + libjxl.so.0.8 => /usr/lib/libjxl.so.0.8 (0x00007f8222a00000) + libjxl_threads.so.0.8 => /usr/lib/libjxl_threads.so.0.8 (0x00007f8225b2f000) + libmd.so.0 => /usr/lib/libmd.so.0 (0x00007f821660f000) + libmodplug.so.1 => /usr/lib/libmodplug.so.1 (0x00007f8224aa1000) + libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f82252bf000) + libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007f8224388000) + libmpg123.so.0 => /usr/lib/libmpg123.so.0 (0x00007f82167a3000) + libmvec.so.1 => /usr/lib/libmvec.so.1 (0x00007f8215907000) + libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f8216699000) + libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007f822460c000) + libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007f8225270000) + libopenjp2.so.7 => /usr/lib/libopenjp2.so.7 (0x00007f822431b000) + libopenmpt.so.0 => /usr/lib/libopenmpt.so.0 (0x00007f82248bd000) + libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f821626a000) + libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f8216000000) + libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f8218420000) + libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f8215f34000) + libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f8215f4d000) + libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8222451000) + librav1e.so.0.6 => /usr/lib/librav1e.so.0.6 (0x00007f8222600000) + librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f8223800000) + libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f8224644000) + libsoxr.so.0 => /usr/lib/libsoxr.so.0 (0x00007f822248e000) + libspeex.so.1 => /usr/lib/libspeex.so.1 (0x00007f82242fe000) + libsrt.so.1.5 => /usr/lib/libsrt.so.1.5 (0x00007f82246e8000) + libssh.so.4 => /usr/lib/libssh.so.4 (0x00007f822467b000) + libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f821843b000) + libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f8215663000) + libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007f82242e4000) + libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007f8223cb3000) + libtiff.so.6 => /usr/lib/libtiff.so.6 (0x00007f821568e000) + libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f82160b0000) + libva-drm.so.2 => /usr/lib/libva-drm.so.2 (0x00007f82242df000) + libva-x11.so.2 => /usr/lib/libva-x11.so.2 (0x00007f8223cac000) + libva.so.2 => /usr/lib/libva.so.2 (0x00007f822369a000) + libvdpau.so.1 => /usr/lib/libvdpau.so.1 (0x00007f8223ca7000) + libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007f8219cc8000) + libvpl.so.2 => /usr/lib/libvpl.so.2 (0x00007f8222938000) + libvpx.so.8 => /usr/lib/libvpx.so.8 (0x00007f8224000000) + libwebpmux.so.3 => /usr/lib/libwebpmux.so.3 (0x00007f8225286000) + libx264.so.164 => /usr/lib/libx264.so.164 (0x00007f8219a00000) + libx265.so.199 => /usr/lib/libx265.so.199 (0x00007f8218600000) + libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f821662b000) + libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f8224c2f000) + libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007f82224f1000) + ``` + + Above is the build from the ubuntu pipeline. How does it look for a local + build on Arch? - Issues graphics: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ab80f41..4e89891 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,6 +16,18 @@ target_include_directories( ${Boost_INCLUDE_DIRS} INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/snapshotapp_autogen/include) +set(PLATFORM_PLUGINS + Qt6::QEglFSIntegrationPlugin + Qt6::QLinuxFbIntegrationPlugin + Qt6::QMinimalEglIntegrationPlugin + Qt6::QMinimalIntegrationPlugin + Qt6::QOffscreenIntegrationPlugin + Qt6::QVkKhrDisplayIntegrationPlugin + Qt6::QVncIntegrationPlugin + Qt6::QWaylandEglPlatformIntegrationPlugin + Qt6::QWaylandIntegrationPlugin + Qt6::QXcbIntegrationPlugin) + target_link_libraries( snapshotapp PUBLIC spdlog::spdlog_header_only @@ -24,18 +36,14 @@ target_link_libraries( Qt6::Widgets Qt6::Multimedia Qt6::MultimediaWidgets - Qt6::QWaylandEglPlatformIntegrationPlugin - Qt6::QWaylandIntegrationPlugin - Qt6::QXcbIntegrationPlugin - Qt6::QFFmpegMediaPlugin) + Qt6::QFFmpegMediaPlugin + ${PLATFORM_PLUGINS}) qt_import_plugins( snapshotapp INCLUDE_BY_TYPE platforms - Qt6::QWaylandEglPlatformIntegrationPlugin - Qt6::QWaylandIntegrationPlugin - Qt6::QXcbIntegrationPlugin + ${PLATFORM_PLUGINS} INCLUDE_BY_TYPE multimedia Qt6::QFFmpegMediaPlugin) From 1f3d12cc5cf47d2c7ca2406c2f0fb5b3a1a9ede1 Mon Sep 17 00:00:00 2001 From: barts Date: Wed, 17 Jan 2024 17:27:09 +0100 Subject: [PATCH 4/5] fix: conflicting/missing ffmpeg libs --- README.md | 190 ++++++++++++++++++++++++++++++++++++++++++++- app/CMakeLists.txt | 31 ++++---- src/CMakeLists.txt | 1 + 3 files changed, 204 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 50826b9..555688a 100644 --- a/README.md +++ b/README.md @@ -596,7 +596,195 @@ more information. ``` Above is the build from the ubuntu pipeline. How does it look for a local - build on Arch? + build on Arch? Wel, this: + + ``` + # Assumed to be on system + linux-vdso.so.1 (0x00007ffd75140000) + libm.so.6 => /usr/lib/libm.so.6 (0x00007f8072f0a000) + libc.so.6 => /usr/lib/libc.so.6 (0x00007f807021e000) + + # Bundled libs + libz.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libz.so.1 (0x00007f8072d88000) + libts.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libts.so.0 (0x00007f8074b32000) + libSM.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libSM.so.6 (0x00007f80732ed000) + libb2.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libb2.so.1 (0x00007f8072ff7000) + libdl.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libdl.so.2 (0x00007f806e5d5000) + libX11.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libX11.so.6 (0x00007f80738bd000) + libGLX.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libGLX.so.0 (0x00007f8076159000) + libICE.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libICE.so.6 (0x00007f80732cf000) + libEGL.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libEGL.so.1 (0x00007f807309c000) + libxcb.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb.so.1 (0x00007f8073054000) + libdrm.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libdrm.so.2 (0x00007f807303d000) + libgbm.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libgbm.so.1 (0x00007f807302d000) + libffi.so.8 => /home/barts/snapshot-0.0.0-Linux/./lib/libffi.so.8 (0x00007f806e5da000) + libXau.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libXau.so.6 (0x00007f80650d1000) + libogg.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libogg.so.0 (0x00007f8063360000) + liblz4.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/liblz4.so.1 (0x00007f8062b5d000) + libfmt.so.10 => /home/barts/snapshot-0.0.0-Linux/./lib/libfmt.so.10 (0x00007f80779ea000) + libXext.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libXext.so.6 (0x00007f80764df000) + libudev.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libudev.so.1 (0x00007f807341a000) + libjpeg.so.8 => /home/barts/snapshot-0.0.0-Linux/./lib/libjpeg.so.8 (0x00007f80731c7000) + libtiff.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libtiff.so.6 (0x00007f8073139000) + libwebp.so.7 => /home/barts/snapshot-0.0.0-Linux/./lib/libwebp.so.7 (0x00007f80730b8000) + libzstd.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libzstd.so.1 (0x00007f8072da7000) + liblzma.so.5 => /home/barts/snapshot-0.0.0-Linux/./lib/liblzma.so.5 (0x00007f8072570000) + libopus.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libopus.so.0 (0x00007f806eebd000) + libkrb5.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libkrb5.so.3 (0x00007f8065128000) + libuuid.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libuuid.so.1 (0x00007f80650e3000) + libgomp.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libgomp.so.1 (0x00007f8063b6a000) + libpulse.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libpulse.so.0 (0x00007f80765ab000) + libgcc_s.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libgcc_s.so.1 (0x00007f8072d61000) + libbz2.so.1.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libbz2.so.1.0 (0x00007f8072d4e000) + libexpat.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libexpat.so.1 (0x00007f8063ccd000) + libevdev.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libevdev.so.2 (0x00007f80654d3000) + libwacom.so.9 => /home/barts/snapshot-0.0.0-Linux/./lib/libwacom.so.9 (0x00007f80650ec000) + libXdmcp.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libXdmcp.so.6 (0x00007f8063bd1000) + libFLAC.so.12 => /home/barts/snapshot-0.0.0-Linux/./lib/libFLAC.so.12 (0x00007f8062b17000) + libXrandr.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libXrandr.so.2 (0x00007f80779b8000) + libresolv.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libresolv.so.2 (0x00007f80764bf000) + libOpenGL.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libOpenGL.so.0 (0x00007f8074b73000) + libpng16.so.16 => /home/barts/snapshot-0.0.0-Linux/./lib/libpng16.so.16 (0x00007f8074b39000) + libdbus-1.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libdbus-1.so.3 (0x00007f8073451000) + libinput.so.10 => /home/barts/snapshot-0.0.0-Linux/./lib/libinput.so.10 (0x00007f80733c6000) + libjasper.so.7 => /home/barts/snapshot-0.0.0-Linux/./lib/libjasper.so.7 (0x00007f8073274000) + libicuuc.so.74 => /home/barts/snapshot-0.0.0-Linux/./lib/libicuuc.so.74 (0x00007f8072600000) + libstdc++.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libstdc++.so.6 (0x00007f8070400000) + libvorbis.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libvorbis.so.0 (0x00007f806e19a000) + libjbig.so.2.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libjbig.so.2.1 (0x00007f80650d6000) + libgio-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgio-2.0.so.0 (0x00007f80736e4000) + libxcb-shm.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-shm.so.0 (0x00007f807333e000) + libxcb-xkb.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-xkb.so.1 (0x00007f80732f8000) + libX11-xcb.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libX11-xcb.so.1 (0x00007f80732ca000) + libwebpmux.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libwebpmux.so.3 (0x00007f8073126000) + libxcb-glx.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-glx.so.0 (0x00007f807307f000) + libXrender.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libXrender.so.1 (0x00007f806e5f3000) + libsystemd.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libsystemd.so.0 (0x00007f8063bd9000) + libpcre2-8.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libpcre2-8.so.0 (0x00007f8063acf000) + libsndfile.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libsndfile.so.1 (0x00007f8063a48000) + libasyncns.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libasyncns.so.0 (0x00007f8063a3e000) + libgcrypt.so.20 => /home/barts/snapshot-0.0.0-Linux/./lib/libgcrypt.so.20 (0x00007f8062b82000) + libfreetype.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libfreetype.so.6 (0x00007f8073616000) + libharfbuzz.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libharfbuzz.so.0 (0x00007f8073508000) + libxcb-sync.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-sync.so.1 (0x00007f8073335000) + libsharpyuv.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libsharpyuv.so.0 (0x00007f80730ae000) + libicui18n.so.74 => /home/barts/snapshot-0.0.0-Linux/./lib/libicui18n.so.74 (0x00007f8072a00000) + libicudata.so.74 => /home/barts/snapshot-0.0.0-Linux/./lib/libicudata.so.74 (0x00007f8070800000) + libpcre2-16.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libpcre2-16.so.0 (0x00007f8072e7a000) + libglib-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libglib-2.0.so.0 (0x00007f80728b4000) + libk5crypto.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libk5crypto.so.3 (0x00007f80650fa000) + libkeyutils.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libkeyutils.so.1 (0x00007f806ee7f000) + libxcb-util.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-util.so.1 (0x00007f80654ca000) + libbrotlidec.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libbrotlidec.so.1 (0x00007f80764d0000) + libxkbcommon.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxkbcommon.so.0 (0x00007f807337d000) + libxcb-icccm.so.4 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-icccm.so.4 (0x00007f8073366000) + libxcb-image.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-image.so.0 (0x00007f8073360000) + libxcb-randr.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-randr.so.0 (0x00007f8073349000) + libxcb-shape.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-shape.so.0 (0x00007f8073317000) + libwebpdemux.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libwebpdemux.so.2 (0x00007f8073133000) + libvorbisenc.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libvorbisenc.so.2 (0x00007f806dd55000) + libgraphite2.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libgraphite2.so.3 (0x00007f806dc51000) + libgudev-1.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgudev-1.0.so.0 (0x00007f806333d000) + libgpg-error.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgpg-error.so.0 (0x00007f8062aaf000) + libfontconfig.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libfontconfig.so.1 (0x00007f80734a2000) + libxcb-cursor.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-cursor.so.0 (0x00007f807336d000) + libxcb-xfixes.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-xfixes.so.0 (0x00007f807332c000) + libxcb-render.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-render.so.0 (0x00007f807331d000) + libGLdispatch.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libGLdispatch.so.0 (0x00007f8063cf8000) + libgssapi_krb5.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libgssapi_krb5.so.2 (0x00007f80761ac000) + libgobject-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgobject-2.0.so.0 (0x00007f8074b9e000) + libwayland-egl.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-egl.so.1 (0x00007f80761a7000) + libxcb-keysyms.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-keysyms.so.1 (0x00007f807335b000) + libgthread-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgthread-2.0.so.0 (0x00007f8072da2000) + libkrb5support.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libkrb5support.so.0 (0x00007f806e5e5000) + libgmodule-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgmodule-2.0.so.0 (0x00007f806e133000) + libbrotlicommon.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libbrotlicommon.so.1 (0x00007f806dc74000) + libxkbcommon-x11.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxkbcommon-x11.so.0 (0x00007f8073374000) + libwayland-cursor.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-cursor.so.0 (0x00007f807619d000) + libwayland-client.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-client.so.0 (0x00007f807618b000) + libpulsecommon-16.1.so => /home/barts/snapshot-0.0.0-Linux/./lib/libpulsecommon-16.1.so (0x00007f807282d000) + libwayland-server.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-server.so.0 (0x00007f8063bbb000) + libxcb-render-util.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-render-util.so.0 (0x00007f8073343000) + libdouble-conversion.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libdouble-conversion.so.3 (0x00007f8073015000) + + # FFmpeg libs are missing... + libavformat.so.60 => /usr/lib/libavformat.so.60 (0x00007f8076200000) + libavcodec.so.60 => /usr/lib/libavcodec.so.60 (0x00007f8227600000) + libswresample.so.4 => /usr/lib/libswresample.so.4 (0x00007f8228f10000) + libswscale.so.7 => /usr/lib/libswscale.so.7 (0x00007f8228b69000) + libavutil.so.58 => /usr/lib/libavutil.so.58 (0x00007f8226400000) + + # Other missing libs? + libva.so.2 => /usr/lib/libva.so.2 (0x00007f806e16a000) + libssh.so.4 => /usr/lib/libssh.so.4 (0x00007f806fac1000) + libvpx.so.8 => /usr/lib/libvpx.so.8 (0x00007f806f600000) + libaom.so.3 => /usr/lib/libaom.so.3 (0x00007f806e600000) + libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f8070687000) + libvpl.so.2 => /usr/lib/libvpl.so.2 (0x00007f806dcfa000) + libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f806e127000) + libhwy.so.1 => /usr/lib/libhwy.so.1 (0x00007f806336b000) + libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007f80734f2000) + libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f8070696000) + libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f806fe06000) + libsoxr.so.0 => /usr/lib/libsoxr.so.0 (0x00007f806dc97000) + libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f806376a000) + libmvec.so.1 => /usr/lib/libmvec.so.1 (0x00007f8062d07000) + libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f8062ad5000) + libmtdev.so.1 => /usr/lib/libmtdev.so.1 (0x00007f8076152000) + libsrt.so.1.5 => /usr/lib/libsrt.so.1.5 (0x00007f806fb2e000) + libdav1d.so.7 => /usr/lib/libdav1d.so.7 (0x00007f806f8e5000) + libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f806f4c7000) + libjxl.so.0.8 => /usr/lib/libjxl.so.0.8 (0x00007f806e200000) + libspeex.so.1 => /usr/lib/libspeex.so.1 (0x00007f806eea0000) + libvdpau.so.1 => /usr/lib/libvdpau.so.1 (0x00007f806f8e0000) + libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f8063db0000) + libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f8063599000) + libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f8062ccb000) + libbluray.so.2 => /usr/lib/libbluray.so.2 (0x00007f80725a3000) + librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f806f000000) + libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f8072564000) + libx264.so.164 => /usr/lib/libx264.so.164 (0x00007f8065200000) + libx265.so.199 => /usr/lib/libx265.so.199 (0x00007f8063e00000) + libva-drm.so.2 => /usr/lib/libva-drm.so.2 (0x00007f8070682000) + libva-x11.so.2 => /usr/lib/libva-x11.so.2 (0x00007f807067b000) + libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007f806e13a000) + libmpg123.so.0 => /usr/lib/libmpg123.so.0 (0x00007f80639e1000) + libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f8063541000) + libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f8062e00000) + libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f8063353000) + libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f8062aa6000) + libmodplug.so.1 => /usr/lib/libmodplug.so.1 (0x00007f8070090000) + libopenmpt.so.0 => /usr/lib/libopenmpt.so.0 (0x00007f806feac000) + libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f806fc00000) + libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007f806ef88000) + libopenjp2.so.7 => /usr/lib/libopenjp2.so.7 (0x00007f806ef1b000) + librav1e.so.0.6 => /usr/lib/librav1e.so.0.6 (0x00007f806de00000) + libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f806f496000) + libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f8063840000) + libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f80634f8000) + libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f806335b000) + libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f8062ae0000) + libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007f80654f1000) + libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f8063378000) + libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f806334a000) + libSvtAv1Enc.so.1 => /usr/lib/libSvtAv1Enc.so.1 (0x00007f8065600000) + libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007f806e1c8000) + libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007f806ee86000) + libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007f806378e000) + libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f80635b0000) + libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f806342b000) + libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007f80639d6000) + libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f8062b00000) + libjxl_threads.so.0.8 => /usr/lib/libjxl_threads.so.0.8 (0x00007f807280f000) + libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f80634eb000) + libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007f8072817000) + libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007f806f49e000) + libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f80634a5000) + libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f8063495000) + /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8077a12000) + ``` + + Inspect later whether they are the same... - Issues graphics: diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 0a77f97..65f1419 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -7,23 +7,20 @@ install( POST_EXCLUDE_REGEXES # Compatability with standard C libraries across linux distributions # is assumed. - ".*libc.*" - ".*libm\..*" - ".*libdbm\..*" - ".*libpthread\..*" - # FFmpeg libraries are added manually below due to an unknown issue. - ".*libavcodec.*" - ".*libavdevice.*" - ".*libavfilter.*" - ".*libavformat.*" - ".*libavutil.*" - ".*libpostproc.*" - ".*libswresample.*" - ".*libswscale.*" - ".*libvmaf.*") - -# Copy FFmpeg libraries to the install directory. -install(FILES ${FFMPEG_LIBRARIES} DESTINATION lib) + ".*libc\.so.*" + ".*libm\.so.*" + ".*libdbm\.so.*" + ".*libpthread\.so.*" + # The FFmpeg libraries are added explicitly below to avoid conflicts + # libs that are installed elsewhere on the system + ".*libswscale\.so.*" + ".*libavutil\.so.*" + ".*libavcodec\.so.*" + ".*libavformat\.so.*" + ".*libswresample\.so.*" + POST_INCLUDE_FILES + # FFmpeg libraries are added explicitly below to avoid conflicts + ${FFMPEG_LIBRARIES}) # Copy the entrypoint to the install directory. install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/snapshot DESTINATION .) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4e89891..fc1ff73 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,7 @@ find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia MultimediaWidgets WaylandClient) message(STATUS "Qt6 was found at ${Qt6_DIR}") +message(STATUS "FFmpeg libraries are: ${FFMPEG_LIBRARIES}") file(GLOB_RECURSE SOURCES "${CMAKE_SOURCE_DIR}/src/*") file(GLOB_RECURSE INCLUDES "${CMAKE_SOURCE_DIR}/include/*") From f7d7bb696cb632a8b3644955ecb9d34457f35e94 Mon Sep 17 00:00:00 2001 From: barts Date: Wed, 17 Jan 2024 21:04:45 +0100 Subject: [PATCH 5/5] fix: removes gtest form packege build and added ffmpeg to installation. --- CMakeLists.txt | 1 + README.md | 370 +-------------------------------------------- app/CMakeLists.txt | 15 +- scripts/configure | 15 +- 4 files changed, 20 insertions(+), 381 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e4d34..a291399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ project( LANGUAGES CXX) option(BUILD_TESTING "Build tests" OFF) +option(INSTALL_GTEST OFF) message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") message(STATUS "Build tests: ${BUILD_TESTING}") diff --git a/README.md b/README.md index 555688a..a8b1d43 100644 --- a/README.md +++ b/README.md @@ -418,373 +418,11 @@ more information. - [ ] Publish the directory tree as an archive as a release. Other more sophisticated release methods can be used later. - - Ffmpeg libs are missing from build? And also other libs? This is the ldd - afterd the LD_LIBRARY_PATH is set to ./lib: + - When install the runtime deps, how can I: - ``` - # Assumed to be on system - linux-vdso.so.1 (0x00007fff26bdf000) - libm.so.6 => /usr/lib/libm.so.6 (0x00007f822530f000) - libc.so.6 => /usr/lib/libc.so.6 (0x00007f8224e1e000) - /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f822a7d1000) - - libz.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libz.so.1 (0x00007f8225c5b000) - libSM.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libSM.so.6 (0x00007f8226035000) - libEGL.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libEGL.so.1 (0x00007f8225c9e000) - libGLX.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libGLX.so.0 (0x00007f82275cc000) - libICE.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libICE.so.6 (0x00007f8226016000) - libX11.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libX11.so.6 (0x00007f82262c0000) - libdrm.so.2 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libdrm.so.2 (0x00007f8225c88000) - libfmt.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libfmt.so.8 (0x00007f822a7ae000) - libgbm.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgbm.so.1 (0x00007f8225c77000) - libxcb.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb.so.1 (0x00007f8225cb1000) - libffi.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libffi.so.8 (0x00007f8225b76000) - libbsd.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libbsd.so.0 (0x00007f8219cff000) - libXau.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXau.so.6 (0x00007f8223682000) - libogg.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libogg.so.0 (0x00007f821663a000) - liblz4.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/liblz4.so.1 (0x00007f8215896000) - libXext.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXext.so.6 (0x00007f8228eec000) - libjpeg.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libjpeg.so.8 (0x00007f8225d7f000) - libtiff.so.5 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libtiff.so.5 (0x00007f8225cf8000) - libudev.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libudev.so.1 (0x00007f8225ba7000) - libzstd.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libzstd.so.1 (0x00007f8225536000) - liblzma.so.5 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/liblzma.so.5 (0x00007f8224650000) - libopus.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libopus.so.0 (0x00007f82237a2000) - libwebp.so.7 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwebp.so.7 (0x00007f8222993000) - libuuid.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libuuid.so.1 (0x00007f8223691000) - libjbig.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libjbig.so.0 (0x00007f8222927000) - libpcre.so.3 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpcre.so.3 (0x00007f821858a000) - libFLAC.so.8 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libFLAC.so.8 (0x00007f821571c000) - libpulse.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpulse.so.0 (0x00007f8228f53000) - libgcc_s.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgcc_s.so.1 (0x00007f8225b83000) - libexpat.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libexpat.so.1 (0x00007f8219d17000) - libXdmcp.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXdmcp.so.6 (0x00007f8222456000) - libOpenGL.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libOpenGL.so.0 (0x00007f8228ebe000) - libXrandr.so.2 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXrandr.so.2 (0x00007f8228f01000) - libdbus-1.so.3 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libdbus-1.so.3 (0x00007f82260db000) - libicuuc.so.70 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libicuuc.so.70 (0x00007f8225605000) - libpng16.so.16 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpng16.so.16 (0x00007f8227591000) - libstdc++.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libstdc++.so.6 (0x00007f8225000000) - libvorbis.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libvorbis.so.0 (0x00007f8223775000) - libX11-xcb.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libX11-xcb.so.1 (0x00007f8226011000) - libgio-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgio-2.0.so.0 (0x00007f8228fa8000) - libxcb-glx.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-glx.so.0 (0x00007f8225cdb000) - libxcb-shm.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-shm.so.0 (0x00007f8226088000) - libxcb-xkb.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-xkb.so.1 (0x00007f8226040000) - libselinux.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libselinux.so.1 (0x00007f8225293000) - libXrender.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libXrender.so.1 (0x00007f8223c9a000) - libsystemd.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libsystemd.so.0 (0x00007f8219939000) - libdeflate.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libdeflate.so.0 (0x00007f8219cdb000) - libpcre2-8.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpcre2-8.so.0 (0x00007f82184f3000) - libsndfile.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libsndfile.so.1 (0x00007f8218474000) - libasyncns.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libasyncns.so.0 (0x00007f8219cd3000) - libgcrypt.so.20 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgcrypt.so.20 (0x00007f8215758000) - libfreetype.so.6 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libfreetype.so.6 (0x00007f8226129000) - libglib-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libglib-2.0.so.0 (0x00007f82253fc000) - libharfbuzz.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libharfbuzz.so.0 (0x00007f82261f1000) - libicui18n.so.70 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libicui18n.so.70 (0x00007f8225800000) - libpcre2-16.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpcre2-16.so.0 (0x00007f8225bd1000) - libxcb-sync.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-sync.so.1 (0x00007f822607e000) - libxcb-util.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-util.so.1 (0x00007f8223688000) - libicudata.so.70 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libicudata.so.70 (0x00007f8216800000) - libapparmor.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libapparmor.so.1 (0x00007f82198d2000) - libbrotlidec.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libbrotlidec.so.1 (0x00007f82291e1000) - libxcb-icccm.so.4 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-icccm.so.4 (0x00007f8228b57000) - libxcb-image.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-image.so.0 (0x00007f8228b51000) - libxcb-randr.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-randr.so.0 (0x00007f822752f000) - libxcb-shape.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-shape.so.0 (0x00007f822605e000) - libxkbcommon.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxkbcommon.so.0 (0x00007f8226094000) - libvorbisenc.so.2 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libvorbisenc.so.2 (0x00007f82236ca000) - libgraphite2.so.3 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgraphite2.so.3 (0x00007f8222dd9000) - libgpg-error.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgpg-error.so.0 (0x00007f821563d000) - libfontconfig.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libfontconfig.so.1 (0x00007f8227547000) - libxcb-cursor.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-cursor.so.0 (0x00007f8225e00000) - libxcb-render.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-render.so.0 (0x00007f8226063000) - libxcb-xfixes.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-xfixes.so.0 (0x00007f8226072000) - libGLdispatch.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libGLdispatch.so.0 (0x00007f8219d48000) - libgobject-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgobject-2.0.so.0 (0x00007f8229181000) - libwayland-egl.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-egl.so.1 (0x00007f822a7a9000) - libxcb-keysyms.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-keysyms.so.1 (0x00007f8227542000) - libgmodule-2.0.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libgmodule-2.0.so.0 (0x00007f8225b4c000) - libbrotlicommon.so.1 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libbrotlicommon.so.1 (0x00007f8225b53000) - libxkbcommon-x11.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxkbcommon-x11.so.0 (0x00007f8228b5e000) - libwayland-client.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-client.so.0 (0x00007f82291ef000) - libwayland-cursor.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-cursor.so.0 (0x00007f822a79f000) - libwayland-server.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libwayland-server.so.0 (0x00007f8219923000) - libxcb-render-util.so.0 => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libxcb-render-util.so.0 (0x00007f822608d000) - libpulsecommon-15.99.so => /home/barts/Downloads/snapshot-0.0.0-Linux/./lib/libpulsecommon-15.99.so (0x00007f8224d99000) - - # FFmpeg libs are missing... - libavformat.so.60 => /usr/lib/libavformat.so.60 (0x00007f8228c00000) - libavcodec.so.60 => /usr/lib/libavcodec.so.60 (0x00007f8227600000) - libswresample.so.4 => /usr/lib/libswresample.so.4 (0x00007f8228f10000) - libswscale.so.7 => /usr/lib/libswscale.so.7 (0x00007f8228b69000) - libavutil.so.58 => /usr/lib/libavutil.so.58 (0x00007f8226400000) - - # Other missing libs? - libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007f822245e000) - libSvtAv1Enc.so.1 => /usr/lib/libSvtAv1Enc.so.1 (0x00007f8219e00000) - libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f8216632000) - libaom.so.3 => /usr/lib/libaom.so.3 (0x00007f8222e00000) - libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f82198e7000) - libbluray.so.2 => /usr/lib/libbluray.so.2 (0x00007f8224860000) - libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007f82166f1000) - libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f8225b39000) - libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f8218430000) - libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f8223ceb000) - libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f821661f000) - libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f8215a00000) - libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f8215627000) - libdav1d.so.7 => /usr/lib/libdav1d.so.7 (0x00007f8223e24000) - libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f821566e000) - libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f821606a000) - libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f82247ba000) - libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f8224400000) - libgomp.so.1 => /usr/lib/libgomp.so.1 (0x00007f82158b6000) - libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f8224635000) - libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f8216650000) - libhwy.so.1 => /usr/lib/libhwy.so.1 (0x00007f8216645000) - libicudata.so.74 => /usr/lib/libicudata.so.74 (0x00007f8213800000) - libicuuc.so.74 => /usr/lib/libicuuc.so.74 (0x00007f8216400000) - libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f8218452000) - libjbig.so.2.1 => /usr/lib/libjbig.so.2.1 (0x00007f8215630000) - libjxl.so.0.8 => /usr/lib/libjxl.so.0.8 (0x00007f8222a00000) - libjxl_threads.so.0.8 => /usr/lib/libjxl_threads.so.0.8 (0x00007f8225b2f000) - libmd.so.0 => /usr/lib/libmd.so.0 (0x00007f821660f000) - libmodplug.so.1 => /usr/lib/libmodplug.so.1 (0x00007f8224aa1000) - libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f82252bf000) - libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007f8224388000) - libmpg123.so.0 => /usr/lib/libmpg123.so.0 (0x00007f82167a3000) - libmvec.so.1 => /usr/lib/libmvec.so.1 (0x00007f8215907000) - libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f8216699000) - libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007f822460c000) - libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007f8225270000) - libopenjp2.so.7 => /usr/lib/libopenjp2.so.7 (0x00007f822431b000) - libopenmpt.so.0 => /usr/lib/libopenmpt.so.0 (0x00007f82248bd000) - libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f821626a000) - libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f8216000000) - libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f8218420000) - libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f8215f34000) - libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f8215f4d000) - libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8222451000) - librav1e.so.0.6 => /usr/lib/librav1e.so.0.6 (0x00007f8222600000) - librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f8223800000) - libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f8224644000) - libsoxr.so.0 => /usr/lib/libsoxr.so.0 (0x00007f822248e000) - libspeex.so.1 => /usr/lib/libspeex.so.1 (0x00007f82242fe000) - libsrt.so.1.5 => /usr/lib/libsrt.so.1.5 (0x00007f82246e8000) - libssh.so.4 => /usr/lib/libssh.so.4 (0x00007f822467b000) - libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f821843b000) - libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f8215663000) - libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007f82242e4000) - libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007f8223cb3000) - libtiff.so.6 => /usr/lib/libtiff.so.6 (0x00007f821568e000) - libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f82160b0000) - libva-drm.so.2 => /usr/lib/libva-drm.so.2 (0x00007f82242df000) - libva-x11.so.2 => /usr/lib/libva-x11.so.2 (0x00007f8223cac000) - libva.so.2 => /usr/lib/libva.so.2 (0x00007f822369a000) - libvdpau.so.1 => /usr/lib/libvdpau.so.1 (0x00007f8223ca7000) - libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007f8219cc8000) - libvpl.so.2 => /usr/lib/libvpl.so.2 (0x00007f8222938000) - libvpx.so.8 => /usr/lib/libvpx.so.8 (0x00007f8224000000) - libwebpmux.so.3 => /usr/lib/libwebpmux.so.3 (0x00007f8225286000) - libx264.so.164 => /usr/lib/libx264.so.164 (0x00007f8219a00000) - libx265.so.199 => /usr/lib/libx265.so.199 (0x00007f8218600000) - libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f821662b000) - libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f8224c2f000) - libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007f82224f1000) - ``` - - Above is the build from the ubuntu pipeline. How does it look for a local - build on Arch? Wel, this: - - ``` - # Assumed to be on system - linux-vdso.so.1 (0x00007ffd75140000) - libm.so.6 => /usr/lib/libm.so.6 (0x00007f8072f0a000) - libc.so.6 => /usr/lib/libc.so.6 (0x00007f807021e000) - - # Bundled libs - libz.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libz.so.1 (0x00007f8072d88000) - libts.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libts.so.0 (0x00007f8074b32000) - libSM.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libSM.so.6 (0x00007f80732ed000) - libb2.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libb2.so.1 (0x00007f8072ff7000) - libdl.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libdl.so.2 (0x00007f806e5d5000) - libX11.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libX11.so.6 (0x00007f80738bd000) - libGLX.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libGLX.so.0 (0x00007f8076159000) - libICE.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libICE.so.6 (0x00007f80732cf000) - libEGL.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libEGL.so.1 (0x00007f807309c000) - libxcb.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb.so.1 (0x00007f8073054000) - libdrm.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libdrm.so.2 (0x00007f807303d000) - libgbm.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libgbm.so.1 (0x00007f807302d000) - libffi.so.8 => /home/barts/snapshot-0.0.0-Linux/./lib/libffi.so.8 (0x00007f806e5da000) - libXau.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libXau.so.6 (0x00007f80650d1000) - libogg.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libogg.so.0 (0x00007f8063360000) - liblz4.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/liblz4.so.1 (0x00007f8062b5d000) - libfmt.so.10 => /home/barts/snapshot-0.0.0-Linux/./lib/libfmt.so.10 (0x00007f80779ea000) - libXext.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libXext.so.6 (0x00007f80764df000) - libudev.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libudev.so.1 (0x00007f807341a000) - libjpeg.so.8 => /home/barts/snapshot-0.0.0-Linux/./lib/libjpeg.so.8 (0x00007f80731c7000) - libtiff.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libtiff.so.6 (0x00007f8073139000) - libwebp.so.7 => /home/barts/snapshot-0.0.0-Linux/./lib/libwebp.so.7 (0x00007f80730b8000) - libzstd.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libzstd.so.1 (0x00007f8072da7000) - liblzma.so.5 => /home/barts/snapshot-0.0.0-Linux/./lib/liblzma.so.5 (0x00007f8072570000) - libopus.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libopus.so.0 (0x00007f806eebd000) - libkrb5.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libkrb5.so.3 (0x00007f8065128000) - libuuid.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libuuid.so.1 (0x00007f80650e3000) - libgomp.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libgomp.so.1 (0x00007f8063b6a000) - libpulse.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libpulse.so.0 (0x00007f80765ab000) - libgcc_s.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libgcc_s.so.1 (0x00007f8072d61000) - libbz2.so.1.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libbz2.so.1.0 (0x00007f8072d4e000) - libexpat.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libexpat.so.1 (0x00007f8063ccd000) - libevdev.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libevdev.so.2 (0x00007f80654d3000) - libwacom.so.9 => /home/barts/snapshot-0.0.0-Linux/./lib/libwacom.so.9 (0x00007f80650ec000) - libXdmcp.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libXdmcp.so.6 (0x00007f8063bd1000) - libFLAC.so.12 => /home/barts/snapshot-0.0.0-Linux/./lib/libFLAC.so.12 (0x00007f8062b17000) - libXrandr.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libXrandr.so.2 (0x00007f80779b8000) - libresolv.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libresolv.so.2 (0x00007f80764bf000) - libOpenGL.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libOpenGL.so.0 (0x00007f8074b73000) - libpng16.so.16 => /home/barts/snapshot-0.0.0-Linux/./lib/libpng16.so.16 (0x00007f8074b39000) - libdbus-1.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libdbus-1.so.3 (0x00007f8073451000) - libinput.so.10 => /home/barts/snapshot-0.0.0-Linux/./lib/libinput.so.10 (0x00007f80733c6000) - libjasper.so.7 => /home/barts/snapshot-0.0.0-Linux/./lib/libjasper.so.7 (0x00007f8073274000) - libicuuc.so.74 => /home/barts/snapshot-0.0.0-Linux/./lib/libicuuc.so.74 (0x00007f8072600000) - libstdc++.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libstdc++.so.6 (0x00007f8070400000) - libvorbis.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libvorbis.so.0 (0x00007f806e19a000) - libjbig.so.2.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libjbig.so.2.1 (0x00007f80650d6000) - libgio-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgio-2.0.so.0 (0x00007f80736e4000) - libxcb-shm.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-shm.so.0 (0x00007f807333e000) - libxcb-xkb.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-xkb.so.1 (0x00007f80732f8000) - libX11-xcb.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libX11-xcb.so.1 (0x00007f80732ca000) - libwebpmux.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libwebpmux.so.3 (0x00007f8073126000) - libxcb-glx.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-glx.so.0 (0x00007f807307f000) - libXrender.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libXrender.so.1 (0x00007f806e5f3000) - libsystemd.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libsystemd.so.0 (0x00007f8063bd9000) - libpcre2-8.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libpcre2-8.so.0 (0x00007f8063acf000) - libsndfile.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libsndfile.so.1 (0x00007f8063a48000) - libasyncns.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libasyncns.so.0 (0x00007f8063a3e000) - libgcrypt.so.20 => /home/barts/snapshot-0.0.0-Linux/./lib/libgcrypt.so.20 (0x00007f8062b82000) - libfreetype.so.6 => /home/barts/snapshot-0.0.0-Linux/./lib/libfreetype.so.6 (0x00007f8073616000) - libharfbuzz.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libharfbuzz.so.0 (0x00007f8073508000) - libxcb-sync.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-sync.so.1 (0x00007f8073335000) - libsharpyuv.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libsharpyuv.so.0 (0x00007f80730ae000) - libicui18n.so.74 => /home/barts/snapshot-0.0.0-Linux/./lib/libicui18n.so.74 (0x00007f8072a00000) - libicudata.so.74 => /home/barts/snapshot-0.0.0-Linux/./lib/libicudata.so.74 (0x00007f8070800000) - libpcre2-16.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libpcre2-16.so.0 (0x00007f8072e7a000) - libglib-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libglib-2.0.so.0 (0x00007f80728b4000) - libk5crypto.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libk5crypto.so.3 (0x00007f80650fa000) - libkeyutils.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libkeyutils.so.1 (0x00007f806ee7f000) - libxcb-util.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-util.so.1 (0x00007f80654ca000) - libbrotlidec.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libbrotlidec.so.1 (0x00007f80764d0000) - libxkbcommon.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxkbcommon.so.0 (0x00007f807337d000) - libxcb-icccm.so.4 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-icccm.so.4 (0x00007f8073366000) - libxcb-image.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-image.so.0 (0x00007f8073360000) - libxcb-randr.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-randr.so.0 (0x00007f8073349000) - libxcb-shape.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-shape.so.0 (0x00007f8073317000) - libwebpdemux.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libwebpdemux.so.2 (0x00007f8073133000) - libvorbisenc.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libvorbisenc.so.2 (0x00007f806dd55000) - libgraphite2.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libgraphite2.so.3 (0x00007f806dc51000) - libgudev-1.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgudev-1.0.so.0 (0x00007f806333d000) - libgpg-error.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgpg-error.so.0 (0x00007f8062aaf000) - libfontconfig.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libfontconfig.so.1 (0x00007f80734a2000) - libxcb-cursor.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-cursor.so.0 (0x00007f807336d000) - libxcb-xfixes.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-xfixes.so.0 (0x00007f807332c000) - libxcb-render.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-render.so.0 (0x00007f807331d000) - libGLdispatch.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libGLdispatch.so.0 (0x00007f8063cf8000) - libgssapi_krb5.so.2 => /home/barts/snapshot-0.0.0-Linux/./lib/libgssapi_krb5.so.2 (0x00007f80761ac000) - libgobject-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgobject-2.0.so.0 (0x00007f8074b9e000) - libwayland-egl.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-egl.so.1 (0x00007f80761a7000) - libxcb-keysyms.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-keysyms.so.1 (0x00007f807335b000) - libgthread-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgthread-2.0.so.0 (0x00007f8072da2000) - libkrb5support.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libkrb5support.so.0 (0x00007f806e5e5000) - libgmodule-2.0.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libgmodule-2.0.so.0 (0x00007f806e133000) - libbrotlicommon.so.1 => /home/barts/snapshot-0.0.0-Linux/./lib/libbrotlicommon.so.1 (0x00007f806dc74000) - libxkbcommon-x11.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxkbcommon-x11.so.0 (0x00007f8073374000) - libwayland-cursor.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-cursor.so.0 (0x00007f807619d000) - libwayland-client.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-client.so.0 (0x00007f807618b000) - libpulsecommon-16.1.so => /home/barts/snapshot-0.0.0-Linux/./lib/libpulsecommon-16.1.so (0x00007f807282d000) - libwayland-server.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libwayland-server.so.0 (0x00007f8063bbb000) - libxcb-render-util.so.0 => /home/barts/snapshot-0.0.0-Linux/./lib/libxcb-render-util.so.0 (0x00007f8073343000) - libdouble-conversion.so.3 => /home/barts/snapshot-0.0.0-Linux/./lib/libdouble-conversion.so.3 (0x00007f8073015000) - - # FFmpeg libs are missing... - libavformat.so.60 => /usr/lib/libavformat.so.60 (0x00007f8076200000) - libavcodec.so.60 => /usr/lib/libavcodec.so.60 (0x00007f8227600000) - libswresample.so.4 => /usr/lib/libswresample.so.4 (0x00007f8228f10000) - libswscale.so.7 => /usr/lib/libswscale.so.7 (0x00007f8228b69000) - libavutil.so.58 => /usr/lib/libavutil.so.58 (0x00007f8226400000) - - # Other missing libs? - libva.so.2 => /usr/lib/libva.so.2 (0x00007f806e16a000) - libssh.so.4 => /usr/lib/libssh.so.4 (0x00007f806fac1000) - libvpx.so.8 => /usr/lib/libvpx.so.8 (0x00007f806f600000) - libaom.so.3 => /usr/lib/libaom.so.3 (0x00007f806e600000) - libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007f8070687000) - libvpl.so.2 => /usr/lib/libvpl.so.2 (0x00007f806dcfa000) - libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f806e127000) - libhwy.so.1 => /usr/lib/libhwy.so.1 (0x00007f806336b000) - libmd4c.so.0 => /usr/lib/libmd4c.so.0 (0x00007f80734f2000) - libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f8070696000) - libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007f806fe06000) - libsoxr.so.0 => /usr/lib/libsoxr.so.0 (0x00007f806dc97000) - libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f806376a000) - libmvec.so.1 => /usr/lib/libmvec.so.1 (0x00007f8062d07000) - libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f8062ad5000) - libmtdev.so.1 => /usr/lib/libmtdev.so.1 (0x00007f8076152000) - libsrt.so.1.5 => /usr/lib/libsrt.so.1.5 (0x00007f806fb2e000) - libdav1d.so.7 => /usr/lib/libdav1d.so.7 (0x00007f806f8e5000) - libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f806f4c7000) - libjxl.so.0.8 => /usr/lib/libjxl.so.0.8 (0x00007f806e200000) - libspeex.so.1 => /usr/lib/libspeex.so.1 (0x00007f806eea0000) - libvdpau.so.1 => /usr/lib/libvdpau.so.1 (0x00007f806f8e0000) - libmount.so.1 => /usr/lib/libmount.so.1 (0x00007f8063db0000) - libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007f8063599000) - libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007f8062ccb000) - libbluray.so.2 => /usr/lib/libbluray.so.2 (0x00007f80725a3000) - librsvg-2.so.2 => /usr/lib/librsvg-2.so.2 (0x00007f806f000000) - libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007f8072564000) - libx264.so.164 => /usr/lib/libx264.so.164 (0x00007f8065200000) - libx265.so.199 => /usr/lib/libx265.so.199 (0x00007f8063e00000) - libva-drm.so.2 => /usr/lib/libva-drm.so.2 (0x00007f8070682000) - libva-x11.so.2 => /usr/lib/libva-x11.so.2 (0x00007f807067b000) - libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007f806e13a000) - libmpg123.so.0 => /usr/lib/libmpg123.so.0 (0x00007f80639e1000) - libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007f8063541000) - libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f8062e00000) - libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f8063353000) - libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f8062aa6000) - libmodplug.so.1 => /usr/lib/libmodplug.so.1 (0x00007f8070090000) - libopenmpt.so.0 => /usr/lib/libopenmpt.so.0 (0x00007f806feac000) - libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007f806fc00000) - libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007f806ef88000) - libopenjp2.so.7 => /usr/lib/libopenjp2.so.7 (0x00007f806ef1b000) - librav1e.so.0.6 => /usr/lib/librav1e.so.0.6 (0x00007f806de00000) - libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f806f496000) - libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007f8063840000) - libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007f80634f8000) - libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f806335b000) - libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007f8062ae0000) - libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007f80654f1000) - libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f8063378000) - libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f806334a000) - libSvtAv1Enc.so.1 => /usr/lib/libSvtAv1Enc.so.1 (0x00007f8065600000) - libtheoraenc.so.1 => /usr/lib/libtheoraenc.so.1 (0x00007f806e1c8000) - libtheoradec.so.1 => /usr/lib/libtheoradec.so.1 (0x00007f806ee86000) - libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007f806378e000) - libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f80635b0000) - libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f806342b000) - libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007f80639d6000) - libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f8062b00000) - libjxl_threads.so.0.8 => /usr/lib/libjxl_threads.so.0.8 (0x00007f807280f000) - libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007f80634eb000) - libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007f8072817000) - libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007f806f49e000) - libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f80634a5000) - libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f8063495000) - /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8077a12000) - ``` - - Inspect later whether they are the same... + - Resolve conflicting dependency names for ffmpeg (issue on my laptop)? + - Add the custom build of ffmpeg libs to the search path of the install + function of cmake (issue on pipeline)? - Issues graphics: diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 65f1419..f984e33 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,26 +1,19 @@ add_executable(snapshot main.cpp ${CMAKE_SOURCE_DIR}/resources/resources.qrc) target_link_libraries(snapshot PRIVATE snapshotapp) +message(STATUS "Adding directory of FFmpeg libraries to the install search path: ${FFMPEG_LIBRARY_DIRS}") install( TARGETS snapshot RUNTIME_DEPENDENCIES + DIRECTORIES + ${FFMPEG_LIBRARY_DIRS} POST_EXCLUDE_REGEXES # Compatability with standard C libraries across linux distributions # is assumed. ".*libc\.so.*" ".*libm\.so.*" ".*libdbm\.so.*" - ".*libpthread\.so.*" - # The FFmpeg libraries are added explicitly below to avoid conflicts - # libs that are installed elsewhere on the system - ".*libswscale\.so.*" - ".*libavutil\.so.*" - ".*libavcodec\.so.*" - ".*libavformat\.so.*" - ".*libswresample\.so.*" - POST_INCLUDE_FILES - # FFmpeg libraries are added explicitly below to avoid conflicts - ${FFMPEG_LIBRARIES}) + ".*libpthread\.so.*") # Copy the entrypoint to the install directory. install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/snapshot DESTINATION .) diff --git a/scripts/configure b/scripts/configure index 7dee053..e4a96aa 100755 --- a/scripts/configure +++ b/scripts/configure @@ -18,9 +18,11 @@ Additionally, the following is supported by default: - 3rdparty/ffmpeg/include contains the headers Options: - --help Show this help message - --clean Remove the build folder before configuring - --no-patch Do not patch FindFFmpeg.cmake to fix a bug in Qt 6.6" + --help Show this help message + --clean Remove the build folder before configuring + --no-patch Do not patch FindFFmpeg.cmake to fix a bug in Qt 6.6 + --build-type Set the build type to Debug, Release, or + RelWithDebInfo (default: Release)" this_dir=$(dirname "$(realpath "${BASH_SOURCE:-$0}")") @@ -28,6 +30,7 @@ root="$this_dir/.." patch=true qt_dir="$root/3rdparty/Qt" ffmpeg_dir="$root/3rdparty/ffmpeg" +build_type="Release" clean() { echo "Remove old build folder" @@ -48,7 +51,7 @@ configure() { -S "$root" \ -B "$root/build" \ -DBUILD_TESTING=OFF \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE="$build_type" \ -DFFMPEG_DIR="$ffmpeg_dir" \ -DCMAKE_PREFIX_PATH="$qt_dir/lib/cmake" \ "$@" @@ -64,6 +67,10 @@ while [[ $# -gt 0 ]]; do clean shift ;; + --build-type) + build_type="$2" + shift 2 + ;; --no-patch) patch=false shift