From 9c1e6939b43e6f182ecb49df83ecd2612c1f5c3e Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Sun, 11 Jun 2023 14:27:14 -0400 Subject: [PATCH 1/4] qt: Fix qt6 warning --- src/qt/qt_mediahistorymanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/qt_mediahistorymanager.cpp b/src/qt/qt_mediahistorymanager.cpp index f71f74fbe..9d003f464 100644 --- a/src/qt/qt_mediahistorymanager.cpp +++ b/src/qt/qt_mediahistorymanager.cpp @@ -66,8 +66,8 @@ MediaHistoryManager::getHistoryListForDeviceIndex(int index, ui::MediaType type) if ((index >= 0) && (index < master_list[type].size())) { return master_list[type][index]; } else { - qWarning("Media device index %i for device type %s was requested but index %i is out of range (valid range: >= 0 && < %i)", - index, mediaTypeToString(type).toUtf8().constData(), index, master_list[type].size()); + qWarning("Media device index %i for device type %s was requested but index %i is out of range (valid range: >= 0 && < %lli)", + index, mediaTypeToString(type).toUtf8().constData(), index, static_cast(master_list[type].size())); } } // Failure gets an empty list @@ -88,8 +88,8 @@ MediaHistoryManager::getImageForSlot(int index, int slot, ui::MediaType type) if ((slot >= 0) && (slot < device_history.size())) { image_name = device_history[slot]; } else { - qWarning("Media history slot %i, index %i for device type %s was requested but slot %i is out of range (valid range: >= 0 && < %i, device_history.size() is %i)", - slot, index, mediaTypeToString(type).toUtf8().constData(), slot, maxDevicesSupported(type), device_history.size()); + qWarning("Media history slot %i, index %i for device type %s was requested but slot %i is out of range (valid range: >= 0 && < %i, device_history.size() is %lli)", + slot, index, mediaTypeToString(type).toUtf8().constData(), slot, maxDevicesSupported(type), static_cast(device_history.size())); } return image_name; } From 85938f4c9a13fcc6ea67b1759cb3ab3742c7e610 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 16 Jun 2023 23:28:03 -0300 Subject: [PATCH 2/4] Jenkins: Fix openal-soft AppImage build --- .ci/build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index 432599bd7..a816cd743 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -874,6 +874,11 @@ else cwd_root="$(pwd)" check_buildtag "libs.$arch_deb" + cp cmake/flags-gcc.cmake cmake/flags-gcc.cmake.old + sed -i -e 's/ -Werror=.*\([" ]\)/\1/g' cmake/flags-gcc.cmake # temporary hack for -Werror=old-style-definition non-compliance on FluidSynth and SDL2 + sed -i -e 's/ C;CXX/ IGNORED/' cmake/flags-gcc.cmake # workaround for dynamic c(xx)flags system overwriting library flags and breaking (at least) openal-soft + sed -i -e 's/_INIT / /g' cmake/flags-gcc.cmake # still append our own flags + if grep -q "OPENAL:BOOL=ON" build/CMakeCache.txt then # Build openal-soft 1.23.1 manually to fix audio issues. This is a temporary @@ -890,7 +895,7 @@ else sed -i -e 's/PW_KEY_CONFIG_NAME/"config.name"/g' "$prefix/alc/backends/pipewire.cpp" prefix_build="$prefix/build-$arch_deb" - cmake -G Ninja -D ALSOFT_UTILS=OFF -D ALSOFT_EXAMPLES=OFF -D "CMAKE_TOOLCHAIN_FILE=$toolchain_file" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix_build" || exit 99 + cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$toolchain_file" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S "$prefix" -B "$prefix_build" || exit 99 cmake --build "$prefix_build" -j$(nproc) || exit 99 cmake --install "$prefix_build" || exit 99 @@ -939,8 +944,6 @@ else rm -rf "$cache_dir/fluidsynth-"* # remove old versions wget -qO - https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.0.tar.gz | tar zxf - -C "$cache_dir" || rm -rf "$prefix" fi - cp cmake/flags-gcc.cmake cmake/flags-gcc.cmake.old - sed -i -e 's/ -Werror=.*\([" ]\)/\1/g' cmake/flags-gcc.cmake # temporary hack for -Werror=old-style-definition non-compliance on FluidSynth and SDL2 prefix_build="$prefix/build-$arch_deb" cmake -G Ninja -D enable-dbus=OFF -D enable-jack=OFF -D enable-oss=OFF -D enable-sdl2=OFF -D enable-pulseaudio=OFF -D enable-pipewire=OFF -D enable-alsa=OFF \ -D "CMAKE_TOOLCHAIN_FILE=$toolchain_file" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" \ @@ -978,6 +981,7 @@ else -S "$prefix" -B "$prefix_build" || exit 99 cmake --build "$prefix_build" -j$(nproc) || exit 99 cmake --install "$prefix_build" || exit 99 + mv cmake/flags-gcc.cmake.old cmake/flags-gcc.cmake # Archive Discord Game SDK library. From c3717566c7dd53a8ca6547df436465c9cbbfc98e Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 16 Jun 2023 23:36:50 -0300 Subject: [PATCH 3/4] Jenkins: Overhaul the build script's dependency report system to be independent --- .ci/build.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.ci/build.sh b/.ci/build.sh index a816cd743..ab7498368 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -156,7 +156,18 @@ do -p) shift - dep_report=1 + + # Check for lddtree and install it if required. + which lddtree > /dev/null || DEBIAN_FRONTEND=noninteractive sudo apt-get -y install pax-utils + + # Default to main binary. + binary="$1" + [ -z "$binary" ] && binary="archive_tmp/usr/local/bin/$project" + + # Run lddtree with AppImage lib directories included in the search path. + LD_LIBRARY_PATH=$(find "$(pwd)/archive_tmp" -type d -name lib -o -name lib64 | while read dir; do find "$dir" -type d; done | tr '\n' ':') \ + lddtree "$binary" + exit $? ;; -s) @@ -198,6 +209,7 @@ if [ -z "$package_name" -a -z "$tarball_name" ] || [ -n "$package_name" -a -z "$ then echo '[!] Usage: build.sh -b {package_name} {architecture} [-t] [cmake_flags...]' echo ' build.sh -s {source_tarball_name}' + echo 'Dep. tree: build.sh -p [archive_tmp/path/to/binary]' exit 100 fi @@ -316,7 +328,7 @@ then pacman -S --needed --noconfirm "$pkg" done fi - + # Clean pacman cache when running under Jenkins to save disk space. [ "$CI" = "true" ] && rm -rf /var/cache/pacman/pkg @@ -560,7 +572,6 @@ else # Establish general dependencies. pkgs="cmake ninja-build pkg-config git wget p7zip-full extra-cmake-modules wayland-protocols tar gzip file appstream" - [ $dep_report -ne 0 ] && pkgs="$pkgs pax-utils" if [ "$(dpkg --print-architecture)" = "$arch_deb" ] then pkgs="$pkgs build-essential" @@ -569,7 +580,7 @@ else if ! dpkg --print-foreign-architectures | grep -qE '^'"$arch_deb"'$' then sudo dpkg --add-architecture "$arch_deb" - + # Force an apt-get update. save_buildtag aptupdate "arch_$arch_deb" fi @@ -1146,16 +1157,6 @@ EOF # Remove appimage-builder binary on failure, just in case it's corrupted. [ $status -ne 0 ] && rm -f "$appimage_builder_binary" - - # Generate library dependency report if requested. - if [ $dep_report -ne 0 ] - then - echo '[-] Library dependency report:' - - # Run lddtree with AppImage lib directories included in the search path. - LD_LIBRARY_PATH=$(find "$(pwd)/archive_tmp" -type d -name lib -o -name lib64 | while read dir; do find "$dir" -type d; done | tr '\n' ':') \ - lddtree "archive_tmp/usr/local/bin/$project" 2>&1 | tee depreport.txt - fi fi # Check if the archival succeeded. From c8f57660a575f021a18891cf2732b8a5f7ee2c62 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 18 Jun 2023 15:31:04 -0300 Subject: [PATCH 4/4] Jenkins: Trigger openal-soft rebuild --- .ci/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/build.sh b/.ci/build.sh index ab7498368..e425cc65a 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -577,7 +577,7 @@ else pkgs="$pkgs build-essential" else # Add foreign architecture if required. - if ! dpkg --print-foreign-architectures | grep -qE '^'"$arch_deb"'$' + if ! dpkg --print-foreign-architectures | grep -Fx "$arch_deb" then sudo dpkg --add-architecture "$arch_deb"