From fb6986c16de3c383838af336a20aab8fa4a17cd4 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Mon, 8 Jun 2026 12:28:07 +0200 Subject: [PATCH 1/7] =?UTF-8?q?Update=20websocketpp=20submodule=20for=20Bo?= =?UTF-8?q?ost=20=E2=89=A5=201.87=20compatibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/websocketpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/websocketpp b/modules/websocketpp index 508c9b5..e6df114 160000 --- a/modules/websocketpp +++ b/modules/websocketpp @@ -1 +1 @@ -Subproject commit 508c9b5e404df2249e6f0590bc12bd9912889ba4 +Subproject commit e6df114a1a1ba83038a0c5a71985c0e294190fb2 From 03b8f52fa98a7e39b6f565d5495d8512280fa282 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Mon, 8 Jun 2026 12:28:10 +0200 Subject: [PATCH 2/7] Fix architecture detection for non-Debian distros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace dpkg --print-architecture (Debian-specific) with a portable cmake-based approach using CMAKE_SYSTEM_PROCESSOR mapped to Debian architecture names (x86_64→amd64, aarch64→arm64, armv7l→armhf, i686→i386). --- CMakeLists.txt | 18 +++++++++++++++--- src/CMakeLists.txt | 32 ++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c64939..198ed02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,20 @@ project(pipedal HOMEPAGE_URL "https://rerdavies.github.io/pipedal" ) -execute_process( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE DEBIAN_ARCHITECTURE ) +# Determine Debian-compatible architecture name (portable across distros) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + set(DEBIAN_ARCHITECTURE "amd64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + set(DEBIAN_ARCHITECTURE "arm64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l") + set(DEBIAN_ARCHITECTURE "armhf") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686") + set(DEBIAN_ARCHITECTURE "i386") +else() + execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE UNAME_M) + message(FATAL_ERROR "Cannot determine Debian architecture from CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR} (uname -m: ${UNAME_M})") +endif() +message(STATUS "DEBIAN_ARCHITECTURE=${DEBIAN_ARCHITECTURE}") set (DISPLAY_VERSION "PiPedal v2.0.105-Release") set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE}) @@ -24,8 +37,7 @@ set(CPACK_SOURCE_IGNORE_FILES "*.a;sqlite3.h;$(CPACK_SOURCE_IGNORE_FILES)" ) - -set (PIPEDAL_EXCLUDE_TESTS false) +option(PIPEDAL_EXCLUDE_TESTS "Exclude test targets from default build" OFF) include(CTest) enable_testing() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f9f02d6..254bb0c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,8 +155,20 @@ else() set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar -Wno-psabi") endif() -execute_process( COMMAND dpkg --print-architecture COMMAND tr -d '\n' OUTPUT_VARIABLE DEBIAN_ARCHITECTURE ) -message(STATUS DEBIAN_ARCHITECTURE="${DEBIAN_ARCHITECTURE}") +# Determine Debian-compatible architecture name (portable across distros) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + set(DEBIAN_ARCHITECTURE "amd64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + set(DEBIAN_ARCHITECTURE "arm64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l") + set(DEBIAN_ARCHITECTURE "armhf") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686") + set(DEBIAN_ARCHITECTURE "i386") +else() + execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE UNAME_M) + message(FATAL_ERROR "Cannot determine Debian architecture from CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR} (uname -m: ${UNAME_M})") +endif() +message(STATUS "DEBIAN_ARCHITECTURE=${DEBIAN_ARCHITECTURE}") add_compile_definitions(DEBIAN_ARCHITECTURE="${DEBIAN_ARCHITECTURE}") @@ -856,8 +868,8 @@ elseif(EXISTS "/usr/share/doc/libboost1.71-dev") set (BOOST_COPYRIGHT_DIR "libboost1.71-dev") elseif(EXISTS "/usr/share/doc/libboost1.67-dev") set (BOOST_COPYRIGHT_DIR "libboost1.67-dev") -else() - message(FATAL_ERROR "Boost libary version has changed. Please update me.") +# else() +# message(FATAL_ERROR "Boost libary version has changed. Please update me.") endif() @@ -871,10 +883,14 @@ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Updating copyright notices." ) -add_custom_target ( - CopyrightBuild ALL - DEPENDS ${REACT_NOTICES_FILE} -) +option(DISABLE_COPYRIGHT_BUILD "Skip generation of copyright notices (use on non-Debian distros)" OFF) + +if(NOT DISABLE_COPYRIGHT_BUILD) + add_custom_target ( + CopyrightBuild ALL + DEPENDS ${REACT_NOTICES_FILE} + ) +endif() if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.31) cmake_policy(SET CMP0177 NEW) From 1e41850becc28d69dce1975f5978fcd0eb96c87f Mon Sep 17 00:00:00 2001 From: FoolHen Date: Mon, 8 Jun 2026 12:28:14 +0200 Subject: [PATCH 3/7] Fix libzip build failure due to BUILD_SHARED_LIBS collision SQLiteCpp's option(BUILD_SHARED_LIBS OFF) sets the variable in cache, which then leaks into libzip's build. libzip defaults to ON but sees the cached OFF value, causing it to attempt linking against zstd::libzstd_static which doesn't exist when only the shared library is installed (e.g., on Arch Linux). Fix by explicitly setting BUILD_SHARED_LIBS=ON before add_subdirectory(libzip). --- modules/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 69fcf98..bf4c571 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -25,5 +25,7 @@ option(BUILD_REGRESS "Build regression tests" OFF) option(BUILD_OSSFUZZ "Build fuzzers for ossfuzz" OFF) option(BUILD_EXAMPLES "Build examples" OFF) option(BUILD_DOC "Build documentation" OFF) +# Ensure BUILD_SHARED_LIBS is ON for libzip (SQLiteCpp may have set it OFF) +set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries (.so) instead of static ones (.a)" FORCE) add_subdirectory("libzip") From 9f20457f21a256cd78a5dbbc5615ae26d2106543 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Mon, 8 Jun 2026 12:28:17 +0200 Subject: [PATCH 4/7] Add missing includes and link dependencies for GCC 16 GCC 16 on Arch Linux no longer implicitly includes certain standard headers. This causes 'not declared' errors for POSIX functions. - PiPedalCommon/src/CMakeLists.txt: Link asound library for ALSA sequencer - DBusDispatcher.cpp: Add for read()/write()/close() - AuxInTest.cpp: Add for sleep() - kconfigMain.cpp: Add for getuid() - ModFileTypes.cpp: Add for std::mutex/std::lock_guard --- PiPedalCommon/src/CMakeLists.txt | 2 +- PiPedalCommon/src/DBusDispatcher.cpp | 1 + src/AuxInTest.cpp | 1 + src/ModFileTypes.cpp | 1 + src/kconfigMain.cpp | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PiPedalCommon/src/CMakeLists.txt b/PiPedalCommon/src/CMakeLists.txt index 6829869..40a58c8 100644 --- a/PiPedalCommon/src/CMakeLists.txt +++ b/PiPedalCommon/src/CMakeLists.txt @@ -97,7 +97,7 @@ add_library(PiPedalCommon STATIC ss.hpp ) target_include_directories(PiPedalCommon PUBLIC "include" ${LIBNL3_INCLUDE_DIRS}) -target_link_libraries(PiPedalCommon PUBLIC ${LIBNL3_LIBRARIES} sdbus-c++-objlib +target_link_libraries(PiPedalCommon PUBLIC ${LIBNL3_LIBRARIES} sdbus-c++-objlib asound ) diff --git a/PiPedalCommon/src/DBusDispatcher.cpp b/PiPedalCommon/src/DBusDispatcher.cpp index e440552..d80dfec 100644 --- a/PiPedalCommon/src/DBusDispatcher.cpp +++ b/PiPedalCommon/src/DBusDispatcher.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "ss.hpp" #include #include diff --git a/src/AuxInTest.cpp b/src/AuxInTest.cpp index 3fbfd76..a729ac8 100644 --- a/src/AuxInTest.cpp +++ b/src/AuxInTest.cpp @@ -19,6 +19,7 @@ #include "AuxIn.hpp" +#include using namespace pipedal; int main(int argc, char**argv) { diff --git a/src/ModFileTypes.cpp b/src/ModFileTypes.cpp index 500a9e9..6c48823 100644 --- a/src/ModFileTypes.cpp +++ b/src/ModFileTypes.cpp @@ -21,6 +21,7 @@ #include "util.hpp" #include #include +#include #include "ss.hpp" #include "MimeTypes.hpp" diff --git a/src/kconfigMain.cpp b/src/kconfigMain.cpp index f8d1b5a..1365a9e 100644 --- a/src/kconfigMain.cpp +++ b/src/kconfigMain.cpp @@ -55,6 +55,7 @@ #include #include "BootConfig.hpp" #include +#include #include "CommandLineParser.hpp" #include "PrettyPrinter.hpp" #include "SysExec.hpp" From c9d5f3f9b0944a1ee6b617c4a3e53482df2cbffa Mon Sep 17 00:00:00 2001 From: FoolHen Date: Mon, 8 Jun 2026 12:28:20 +0200 Subject: [PATCH 5/7] Fix .deb extraction for systems without dpkg-deb Replace dpkg-deb -x (Debian-specific) with ar + tar for portable .deb extraction. The script now handles .deb archives using standard tools available on all Linux distributions. --- lv2/x86_64/unpackArtifact.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lv2/x86_64/unpackArtifact.sh b/lv2/x86_64/unpackArtifact.sh index a01412f..68f101d 100755 --- a/lv2/x86_64/unpackArtifact.sh +++ b/lv2/x86_64/unpackArtifact.sh @@ -1,7 +1,20 @@ #!/usr/bin/bash rm -rf build/lv2_x64 -mkdir build/lv2_x64 +mkdir -p build/lv2_x64/pkg -mkdir build/lv2_x64/pkg -dpkg-deb -x lv2/x86_64/toobamp_*_amd64.deb build/lv2_x64/pkg \ No newline at end of file +# Extract .deb using ar + tar (portable, no dpkg-deb needed) +cd build/lv2_x64 +ar x ../../lv2/x86_64/toobamp_*_amd64.deb +if [ -f data.tar.zst ]; then + tar --zstd -xf data.tar.zst -C pkg +elif [ -f data.tar.xz ]; then + tar -xJf data.tar.xz -C pkg +elif [ -f data.tar.gz ]; then + tar -xzf data.tar.gz -C pkg +else + echo "Error: cannot find data.tar.* in the .deb package" + exit 1 +fi +rm -f control.tar.* data.tar.* debian-binary +cd "$OLDPWD" \ No newline at end of file From 4bb2f917e6419c575cd316b35490219b32c2b139 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Mon, 8 Jun 2026 12:28:35 +0200 Subject: [PATCH 6/7] Add Arch Linux build prerequisites to documentation --- docs/BuildPrerequisites.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/BuildPrerequisites.md b/docs/BuildPrerequisites.md index 1b6257f..7f95978 100644 --- a/docs/BuildPrerequisites.md +++ b/docs/BuildPrerequisites.md @@ -17,7 +17,8 @@ If your distribution doesn't provide a suitable version of nodejs, please refer to the `node.js` website for instructions on [how to install the latest version of `node.js`](https://nodejs.org/en/download) directly. Run the following commands to install dependent libraries required by the PiPedal build. - + +Ubuntu: sudo apt update sudo apt upgrade @@ -27,6 +28,27 @@ Run the following commands to install dependent libraries required by the PiPeda libsdbus-c++-dev libzip-dev google-perftools \ libgoogle-perftools-dev \ libpipewire-0.3-dev libbz2-dev libssl-dev librsvg2-dev + +Arch: + + sudo pacman -S --needed lilv boost systemd catch2 alsa-lib \ + util-linux avahi networkmanager icu libzip gperftools \ + pipewire bzip2 openssl librsvg sdbus-cpp + + There is one AUR package: + sudo paru -S authbind + +Note: in Arch, tests and copyright notices won't work, so they need to be disabled with cmake arguments. Add this to your .vscode/settings.json file: + +```json +{ + "cmake.configureSettings": { + "PIPEDAL_EXCLUDE_TESTS": "ON", + "DISABLE_COPYRIGHT_BUILD": "ON" + }, + ... +} +``` ### Installing Sources From 89f2c2798eb7c9b499cf60ab72c3c0493f7e3d23 Mon Sep 17 00:00:00 2001 From: "Robin E.R. Davies" Date: Mon, 8 Jun 2026 18:42:23 -0400 Subject: [PATCH 7/7] Move options to start of CMakeFile. Rename to PIPEDAL_DISABLE_COPYRIGHT_BUILD to minimize potential package comflicts. --- CMakeLists.txt | 12 ++++++++---- src/CMakeLists.txt | 4 +--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 198ed02..9a79efa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,14 @@ project(pipedal HOMEPAGE_URL "https://rerdavies.github.io/pipedal" ) +set (DISPLAY_VERSION "PiPedal v2.0.105-Release") + +option(PIPEDAL_DISABLE_COPYRIGHT_BUILD "Skip generation of copyright notices (use on non-Debian distros)" OFF) +option(PIPEDAL_EXCLUDE_TESTS "Exclude test targets from default build" OFF) + +set(PIPEDAL_T3K_PUBLISHABLE_KEY "t3k_pub_bHrH8btdwXXTtxz5ryEU8sNLF-2TGRT9") + + # Determine Debian-compatible architecture name (portable across distros) if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") set(DEBIAN_ARCHITECTURE "amd64") @@ -20,12 +28,9 @@ else() endif() message(STATUS "DEBIAN_ARCHITECTURE=${DEBIAN_ARCHITECTURE}") -set (DISPLAY_VERSION "PiPedal v2.0.105-Release") set (PACKAGE_ARCHITECTURE ${DEBIAN_ARCHITECTURE}) set (CMAKE_INSTALL_PREFIX "/usr/") -set(PIPEDAL_T3K_PUBLISHABLE_KEY "t3k_pub_bHrH8btdwXXTtxz5ryEU8sNLF-2TGRT9") - set (LIBZIP_DO_INSTALL OFF CACHE BOOL "Disable libzip install" FORCE) set (SQLITECPP_INSTALL OFF CACHE BOOL "Disable SQLiteCpp install" FORCE) @@ -37,7 +42,6 @@ set(CPACK_SOURCE_IGNORE_FILES "*.a;sqlite3.h;$(CPACK_SOURCE_IGNORE_FILES)" ) -option(PIPEDAL_EXCLUDE_TESTS "Exclude test targets from default build" OFF) include(CTest) enable_testing() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 254bb0c..f8a8f36 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -883,9 +883,7 @@ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Updating copyright notices." ) -option(DISABLE_COPYRIGHT_BUILD "Skip generation of copyright notices (use on non-Debian distros)" OFF) - -if(NOT DISABLE_COPYRIGHT_BUILD) +if(NOT PIPEDAL_DISABLE_COPYRIGHT_BUILD) add_custom_target ( CopyrightBuild ALL DEPENDS ${REACT_NOTICES_FILE}