From 708524838d4181bad3d0119118385458059f9d41 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Wed, 10 Jun 2026 16:28:59 +0200 Subject: [PATCH 1/6] Fix build flag name in docs --- docs/BuildPrerequisites.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/BuildPrerequisites.md b/docs/BuildPrerequisites.md index 7f95978..dcee52f 100644 --- a/docs/BuildPrerequisites.md +++ b/docs/BuildPrerequisites.md @@ -44,7 +44,7 @@ Note: in Arch, tests and copyright notices won't work, so they need to be disabl { "cmake.configureSettings": { "PIPEDAL_EXCLUDE_TESTS": "ON", - "DISABLE_COPYRIGHT_BUILD": "ON" + "PIPEDAL_DISABLE_COPYRIGHT_BUILD": "ON" }, ... } From b3223660773b63b0149fe4686b7c79639c522fc1 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Wed, 10 Jun 2026 16:29:18 +0200 Subject: [PATCH 2/6] Create netdev group in pipedalconfig --- src/ConfigMain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ConfigMain.cpp b/src/ConfigMain.cpp index 2b48792..8b704c7 100644 --- a/src/ConfigMain.cpp +++ b/src/ConfigMain.cpp @@ -1154,6 +1154,7 @@ void Install(const fs::path &programPrefix, const std::string endpointAddress) // Add to audio groups. sysExec(USERMOD_BIN " -a -G " AUDIO_SERVICE_GROUP_NAME " " SERVICE_ACCOUNT_NAME); // add to netdev group + sysExec(GROUPADD_BIN " -f " NETDEV_GROUP_NAME); sysExec(USERMOD_BIN " -a -G " NETDEV_GROUP_NAME " " SERVICE_ACCOUNT_NAME); try From e09ccc13f58f1f25c01d14c415ce6e35b97427dd Mon Sep 17 00:00:00 2001 From: FoolHen Date: Wed, 10 Jun 2026 16:30:15 +0200 Subject: [PATCH 3/6] Fix build issues with PIPEDAL_DISABLE_COPYRIGHT_BUILD - Wrap notices.txt install in if(NOT PIPEDAL_DISABLE_COPYRIGHT_BUILD) so the install doesn't fail when copyright generation is skipped. - Add explicit install rules for libSQLiteCpp.so.0, libsqlite3.so, and libzip.so.5. These are built from submodules but their own install targets are suppressed (SQLITECPP_INSTALL=OFF, LIBZIP_DO_INSTALL=OFF), so they were never copied to /usr/lib, causing 'cannot open shared object file' errors on distros without these as system packages (e.g. Arch vs Ubuntu). --- CMakeLists.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a79efa..882c204 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,8 +74,23 @@ install ( install ( DIRECTORY ${VITE_BUILD_DIRECTORY} DESTINATION /etc/pipedal/react ) -install (FILES ${PROJECT_SOURCE_DIR}/build/src/notices.txt - DESTINATION /etc/pipedal/react/var/) +if(NOT PIPEDAL_DISABLE_COPYRIGHT_BUILD) + install (FILES ${PROJECT_SOURCE_DIR}/build/src/notices.txt + DESTINATION /etc/pipedal/react/var/) +endif() + +# Install SQLiteCpp and libzip shared libraries (their own install targets are disabled) +install ( + FILES + ${PROJECT_BINARY_DIR}/modules/SQLiteCpp/libSQLiteCpp.so.0 + ${PROJECT_BINARY_DIR}/modules/SQLiteCpp/sqlite3/libsqlite3.so + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) +install ( + FILES + ${PROJECT_BINARY_DIR}/modules/libzip/lib/libzip.so.5 + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) install ( DIRECTORY ${PROJECT_SOURCE_DIR}/src/templates From df949ca20c71021be04f70728d786450e3bea764 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Wed, 10 Jun 2026 16:32:23 +0200 Subject: [PATCH 4/6] Also install ftxui shared libraries from FetchContent pipedal_kconfig links against libftxui-component.so, libftxui-dom.so, and libftxui-screen.so built via FetchContent. Without explicit install rules, these are missing after installation on distros that don't provide ftxui as a system package (e.g. Arch), causing 'cannot open shared object file' at runtime. Also update the comment to reflect all three dependency groups: SQLiteCpp, libzip, and ftxui. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 882c204..63fcd30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,8 @@ if(NOT PIPEDAL_DISABLE_COPYRIGHT_BUILD) DESTINATION /etc/pipedal/react/var/) endif() -# Install SQLiteCpp and libzip shared libraries (their own install targets are disabled) +# Install shared libraries from submodules and FetchContent dependencies +# whose own install targets are disabled (SQLITECPP_INSTALL=OFF, LIBZIP_DO_INSTALL=OFF) install ( FILES ${PROJECT_BINARY_DIR}/modules/SQLiteCpp/libSQLiteCpp.so.0 @@ -91,6 +92,13 @@ install ( ${PROJECT_BINARY_DIR}/modules/libzip/lib/libzip.so.5 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) +install ( + FILES + ${PROJECT_BINARY_DIR}/_deps/ftxui-build/libftxui-component.so.5.0.0 + ${PROJECT_BINARY_DIR}/_deps/ftxui-build/libftxui-dom.so.5.0.0 + ${PROJECT_BINARY_DIR}/_deps/ftxui-build/libftxui-screen.so.5.0.0 + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) install ( DIRECTORY ${PROJECT_SOURCE_DIR}/src/templates From 5eebe293261fa357fc09f2654e7f76b976f40945 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Wed, 10 Jun 2026 17:09:25 +0200 Subject: [PATCH 5/6] Fix test build failures on Arch with Catch2 v3 and GCC 16 - Add missing include in AlsaDriverTest.cpp for sleep(). - Link Catch2::Catch2WithMain alongside Catch2::Catch2 for pipedaltest and jsonTest test targets. Catch2 v3 requires this for CATCH_CONFIG_MAIN to provide the main() entry point. --- src/AlsaDriverTest.cpp | 1 + src/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/AlsaDriverTest.cpp b/src/AlsaDriverTest.cpp index 938ce44..ac3e78f 100644 --- a/src/AlsaDriverTest.cpp +++ b/src/AlsaDriverTest.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "AlsaDriver.hpp" #include "ChannelRouterSettings.hpp" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f8a8f36..968960e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,6 +22,32 @@ set(CXX_STANDARD 20) find_package(PkgConfig REQUIRED) +find_package(Catch2 QUIET) + +# Catch2 v3 (Arch, newer distros) uses multi-headers under . +# Catch2 v2 (Debian/Ubuntu) provides a single catch.hpp at system level. +# When Catch2 v3 is found via CMake, generate compatibility wrappers so +# old-style #include "catch.hpp" and #include still work. +if(Catch2_FOUND) + # Generate catch.hpp wrapper in the build directory. + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/catch.hpp" + "#pragma once\n" + "#include \n" + ) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/catch") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/catch/catch.hpp" + "#pragma once\n" + "#include \n" + ) + # Add the build directory to the global include paths so that + # both #include "catch.hpp" (quote) and #include (angle) + # can find the compatibility wrappers. + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + message(STATUS "Catch2 v3 found. Generated compatibility wrappers in ${CMAKE_CURRENT_BINARY_DIR}") +else() + message(STATUS "Catch2 CMake package not found. Expecting system catch.hpp (Catch2 v2 style).") +endif() + pkg_check_modules(PipeWire REQUIRED libpipewire-0.3) include(FetchContent) @@ -472,6 +498,10 @@ add_executable(pipedaltest target_link_libraries(pipedaltest PRIVATE ${PIPEDAL_LIBS} ${ICU_LIBRARIES}) target_include_directories(pipedaltest PRIVATE ${PIPEDAL_INCLUDES}) +if(Catch2_FOUND) + target_link_libraries(pipedaltest PRIVATE Catch2::Catch2 Catch2::Catch2WithMain) +endif() + set_target_properties(pipedaltest PROPERTIES EXCLUDE_FROM_ALL ${PIPEDAL_EXCLUDE_TESTS}) if (NOT GITHUB_ACTIONS) # Google perftools are not available on Github action servers. @@ -502,6 +532,10 @@ add_executable(jsonTest target_link_libraries(jsonTest PRIVATE PiPedalCommon) target_include_directories(jsonTest PRIVATE ${PIPEDAL_INCLUDES}) +if(Catch2_FOUND) + target_link_libraries(jsonTest PRIVATE Catch2::Catch2 Catch2::Catch2WithMain) +endif() + set_target_properties(jsonTest PROPERTIES EXCLUDE_FROM_ALL ${PIPEDAL_EXCLUDE_TESTS}) From 97234a352c388e6ea045af38023274a77dda22d1 Mon Sep 17 00:00:00 2001 From: FoolHen Date: Wed, 10 Jun 2026 17:12:51 +0200 Subject: [PATCH 6/6] Remove disable tests flag from Arch instructions in docs --- docs/BuildPrerequisites.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/BuildPrerequisites.md b/docs/BuildPrerequisites.md index dcee52f..3c13848 100644 --- a/docs/BuildPrerequisites.md +++ b/docs/BuildPrerequisites.md @@ -38,12 +38,11 @@ Arch: 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: +Note: in Arch, copyright notices generation won't work, so it needs to be disabled with a cmake argument. Add this to your .vscode/settings.json file: ```json { - "cmake.configureSettings": { - "PIPEDAL_EXCLUDE_TESTS": "ON", + "cmake.configureSettings": { "PIPEDAL_DISABLE_COPYRIGHT_BUILD": "ON" }, ...