franzos / gstreamer-qt-docker

Docker images with Qt, GStreamer, NDK specifically to build projects on CI
MIT License
3 stars 2 forks source link

[Planning] 5.15.8-lts-lgpl-gst-1.23.1-android-latest #1

Open franzos opened 1 year ago

franzos commented 1 year ago

Preliminary image:

FROM carlonluca/qt-dev:5.15.8-lts-lgpl

WORKDIR /usr/src

RUN apt update && \
    apt install -y \
    python3-dev python3-distro python3-setuptools python3-pip \
    autotools-dev automake autoconf autopoint \
    libtool \
    g++ \
    make cmake pkg-config \
    bison \
    flex \
    nasm \
    libxv-dev \
    libx11-dev \
    libx11-xcb-dev \
    libpulse-dev \
    gettext \
    libxext-dev \
    libxi-dev \
    x11proto-record-dev \
    libxrender-dev \
    libgl1-mesa-dev \
    libxfixes-dev \
    libxdamage-dev \
    libxcomposite-dev \
    libasound2-dev \
    build-essential \
    gperf \
    wget \
    libxtst-dev \
    libxrandr-dev \
    libglu1-mesa-dev \
    libegl1-mesa-dev \
    git \
    xutils-dev \
    intltool \
    ccache \
    libssl-dev \
    libjson-glib-1.0-0 \
    libjson-glib-dev \
    ninja-build

RUN pip3 install meson==0.62.2 hotdoc==0.13.7 ninja tomli

ENV QT_ANDROID_ROOT=/opt/Qt-android-5.15.8-lts-lgpl
ENV QT_ANDROID_ROOT_DIR=/opt/Qt-android-5.15.8-lts-lgpl
ENV QMAKE=/opt/Qt-android-5.15.8-lts-lgpl/bin/qmake
ENV OPENSSL_ROOT_DIR=/opt/android_openssl/ssl_1.1

# GStreamer 1.23.1 has not been released yet, so we use the tip of he main branch
# git checkout 1.23.1 ommitted
RUN git clone https://gitlab.freedesktop.org/gstreamer/cerbero.git /vendor/cerbero && \
    cd /vendor/cerbero && \
    ./cerbero-uninstalled -c config/cross-android-universal.cbc fetch-bootstrap && \
    ./cerbero-uninstalled -c config/cross-android-universal.cbc fetch-package gstreamer-1.0
RUN cd /vendor/cerbero && ./cerbero-uninstalled -c config/cross-android-universal.cbc bootstrap --offline && \
    QMAKE=/opt/Qt-android-5.15.8-lts-lgpl/bin/qmake ./cerbero-uninstalled -c config/cross-android-universal.cbc -v qt5 package gstreamer-1.0 --offline

ENTRYPOINT [ "" ]

Errors

289.5 ***** Error running 'package' command:
289.5 Recipe 'libvpx' failed at the build step 'configure'
289.5 Command Error: Running ['/vendor/cerbero/build/build-tools/bin/meson', 'setup', '--prefix=/vendor/cerbero/build/dist/android_universal/arm64', '--libdir=lib', '-Ddebug=true', '--default-library=static', '-Doptimization=s', '--backend=ninja', '--wrap-mode=nodownload', '-Dpkgconfig.relocatable=true', '--cross-file', '/vendor/cerbero/build/sources/android_universal/arm64/libvpx-v1.13.0/_builddir/meson-cross-file.txt', '--native-file', '/vendor/cerbero/build/sources/android_universal/arm64/libvpx-v1.13.0/_builddir/meson-native-file.txt', '-Dsize_limit=16384x16384', '-Dunit_tests=disabled', '-Dpostproc=enabled', '-Dmulti_res_encoding=enabled', '-Dtemporal_denoising=enabled', '-Dvp9_temporal_denoising=enabled', '-Dvp9_postproc=enabled', '-Dvp9_highbitdepth=enabled', '-Dtools=disabled', '-Dexamples=disabled', '-Ddocs=disabled', '-Dcpu_features_path=/vendor/cerbero/build/android-ndk-25/sources/android/cpufeatures'] returned 1
289.5 Output in logfile /vendor/cerbero/build/logs/android_arm64/libvpx-configure.log

Related: ERROR: Dependency 'libva-x11' is required but not found in after merge 4781

franzos commented 1 year ago

Adding the related dependencies, resolved the issue:

    ...
    libva-dev \
    libva2 \
    libva-x11-2

but now there's a new build error

557.9 Running command ['git', 'am', '--ignore-whitespace', '/vendor/cerbero/recipes/wavpack/0001-cmake-Don-t-name-MSVC-DLL-wavpackdll.dll.patch'] in /vendor/cerbero/build/sources/android_universal/armv7/wavpack-5.4.0
557.9 Applying: cmake: Don't name MSVC DLL 'wavpackdll.dll'
557.9 Running command ['git', 'am', '--ignore-whitespace', '/vendor/cerbero/recipes/wavpack/0001-cmake-Set-SOVERSION-to-match-Autotools.patch'] in /vendor/cerbero/build/sources/android_universal/armv7/wavpack-5.4.0
557.9 Applying: cmake: Set SOVERSION to match Autotools
557.9 
557.9 -----> Contents of /vendor/cerbero/build/logs/android_armv7/wavpack-configure.log:
558.0 ***** Error running 'package' command:
558.0 Recipe 'wavpack' failed at the build step 'configure'
558.0 Command Error: Running ['cmake', '-DCMAKE_INSTALL_PREFIX=/vendor/cerbero/build/dist/android_universal/armv7', '-H/vendor/cerbero/build/sources/android_universal/armv7/wavpack-5.4.0', '-B/vendor/cerbero/build/sources/android_universal/armv7/wavpack-5.4.0/_builddir', '-DCMAKE_LIBRARY_OUTPUT_PATH=/vendor/cerbero/build/dist/android_universal/armv7/lib', '-DCMAKE_INSTALL_LIBDIR=/vendor/cerbero/build/dist/android_universal/armv7/lib', '-DCMAKE_INSTALL_BINDIR=bin', '-DCMAKE_INSTALL_INCLUDEDIR=include', '-DWAVPACK_INSTALL_CMAKE_MODULE=OFF', '-DWAVPACK_ENABLE_LIBCRYPTO=OFF', '-DWAVPACK_INSTALL_DOCS=OFF', '-DWAVPACK_BUILD_DOCS=OFF', '-DWAVPACK_BUILD_PROGRAMS=OFF', '-DWAVPACK_BUILD_COOLEDIT_PLUGIN=OFF', '-DWAVPACK_BUILD_WINAMP_PLUGIN=OFF', '-DCOMPILER_SUPPORTS_SYMBOL_MAPS_EXITCODE=0', '-G', 'Ninja', '-DCMAKE_SYSTEM_NAME=Linux', '-DCMAKE_C_COMPILER=/vendor/cerbero/build/android-ndk-25/toolchains/llvm/prebuilt/linux-x86_64/bin/clang', '-DCMAKE_CXX_COMPILER=/vendor/cerbero/build/android-ndk-25/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++', '-DCMAKE_C_FLAGS=-target armv7a-linux-androideabi21 --sysroot /vendor/cerbero/build/android-ndk-25/toolchains/llvm/prebuilt/linux-x86_64/sysroot -isysroot /vendor/cerbero/build/android-ndk-25/toolchains/llvm/prebuilt/linux-x86_64/sysroot -isystem /vendor/cerbero/build/dist/android_universal/armv7/include -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC  -D__ARM_ARCH_7A__  -Wa,--noexecstack -Wall -g -Os ', '-DCMAKE_CXX_FLAGS=-target armv7a-linux-androideabi21 --sysroot /vendor/cerbero/build/android-ndk-25/toolchains/llvm/prebuilt/linux-x86_64/sysroot -isysroot /vendor/cerbero/build/android-ndk-25/toolchains/llvm/prebuilt/linux-x86_64/sysroot -isystem /vendor/cerbero/build/dist/android_universal/armv7/include -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument  -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -DPIC  -D__ARM_ARCH_7A__  -Wa,--noexecstack -fno-rtti -fno-exceptions  -Wall -g -Os ', '-DLIB_SUFFIX=', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_FIND_ROOT_PATH=$CERBERO_PREFIX', '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true'] returned 1

Sounds like that's related to wavpack.recipe with version 5.4.3 for android arm is broken

ramajd commented 1 year ago

Sounds like that's related to wavpack.recipe with version 5.4.3 for android arm is broken

following patch resolves the above issue, but the libvpx error mentioned earlier, still persists after installation of mentioned dependencies.

0001-fix-wavpack-build-issue.tar.gz