From c25b30fdcc921863b28d6c26bb782881c93fbf02 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:00:09 +0200 Subject: [PATCH 01/27] Trying to build two new extensions in the Linux Actions --- .github/workflows/Linux build template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index d492db1df..6c80dc556 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -117,6 +117,8 @@ jobs: -DPROXYSTUB_PATH="${PWD}/${{matrix.build_type}}/install/usr/lib/wpeframework/proxystubs" \ -DSYSTEM_PATH="${PWD}/${{matrix.build_type}}/install/usr/lib/wpeframework/plugins" \ -DVOLATILE_PATH="tmp" \ + -DBLUETOOTH=ON \ + -DBROADCAST=ON \ -DLOCALTRACER=ON \ -DWARNING_REPORTING=ON \ -DPROCESSCONTAINERS=ON \ From 336a86b043d674e2b8cce308cff0ddbcbdb9fd0f Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:00:34 +0200 Subject: [PATCH 02/27] Make sure to use the template from development to build --- .github/workflows/Build Thunder on Linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build Thunder on Linux.yml b/.github/workflows/Build Thunder on Linux.yml index 1cbe4b686..5979307c3 100644 --- a/.github/workflows/Build Thunder on Linux.yml +++ b/.github/workflows/Build Thunder on Linux.yml @@ -17,7 +17,7 @@ on: jobs: Thunder: - uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@master + uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@development/actions-extensions ThunderInterfaces: needs: Thunder From 6e752f7b648950e3c02f6b4e5eb347bad03b2ffb Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:15:18 +0200 Subject: [PATCH 03/27] Installing BlueZ, updating the multilib and 32-bit libraries to be only include for 32-bit builds --- .github/workflows/Linux build template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 6c80dc556..c6efd6415 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -26,9 +26,9 @@ jobs: sudo apt-spy2 fix --commit --launchpad --country=US echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list - sudo dpkg --add-architecture i386 + ${{matrix.architecture == '32' && 'sudo dpkg --add-architecture i386' || ':'}} sudo apt-get update - sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev zlib1g-dev:i386 libssl-dev gcc-11-multilib g++-11-multilib + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev bluez libbluetooth-dev {{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} sudo pip install jsonref # ----- Checkout & DependsOn regex ----- From 2fb6dd81507421784b0940e38ab18e948a61f965 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:32:46 +0200 Subject: [PATCH 04/27] Adding a missing workflow variable operator --- .github/workflows/Linux build template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index c6efd6415..4782f82c2 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -28,7 +28,7 @@ jobs: echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list ${{matrix.architecture == '32' && 'sudo dpkg --add-architecture i386' || ':'}} sudo apt-get update - sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev bluez libbluetooth-dev {{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev bluez libbluetooth-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} sudo pip install jsonref # ----- Checkout & DependsOn regex ----- From a3c8c5522216c43ccd950a5a72c18201e41ba662 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:45:48 +0200 Subject: [PATCH 05/27] Trying to fix the bluetooth extenstion include paths --- Source/extensions/bluetooth/Module.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/extensions/bluetooth/Module.h b/Source/extensions/bluetooth/Module.h index 499c7391b..dd340fb8a 100644 --- a/Source/extensions/bluetooth/Module.h +++ b/Source/extensions/bluetooth/Module.h @@ -26,10 +26,10 @@ #include #include -#include <../include/bluetooth/bluetooth.h> -#include <../include/bluetooth/hci.h> -#include <../include/bluetooth/mgmt.h> -#include <../include/bluetooth/l2cap.h> +#include +#include +#include +#include #include "Debug.h" From b1ea1522b5c4b0620b46552a37c41584540a5aa6 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:50:49 +0200 Subject: [PATCH 06/27] Bringing back the old include paths as it does not solve the issue --- Source/extensions/bluetooth/Module.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/extensions/bluetooth/Module.h b/Source/extensions/bluetooth/Module.h index dd340fb8a..499c7391b 100644 --- a/Source/extensions/bluetooth/Module.h +++ b/Source/extensions/bluetooth/Module.h @@ -26,10 +26,10 @@ #include #include -#include -#include -#include -#include +#include <../include/bluetooth/bluetooth.h> +#include <../include/bluetooth/hci.h> +#include <../include/bluetooth/mgmt.h> +#include <../include/bluetooth/l2cap.h> #include "Debug.h" From ee4ca31dbc545047ad87f4849cedac63d538fcb3 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:51:24 +0200 Subject: [PATCH 07/27] Looks like building the bluetooth extension seems causes some issues, let's keep it off for now --- .github/workflows/Linux build template.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 4782f82c2..6a5373ce1 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -117,7 +117,6 @@ jobs: -DPROXYSTUB_PATH="${PWD}/${{matrix.build_type}}/install/usr/lib/wpeframework/proxystubs" \ -DSYSTEM_PATH="${PWD}/${{matrix.build_type}}/install/usr/lib/wpeframework/plugins" \ -DVOLATILE_PATH="tmp" \ - -DBLUETOOTH=ON \ -DBROADCAST=ON \ -DLOCALTRACER=ON \ -DWARNING_REPORTING=ON \ From 46ad71073aba127f8ebce61180c6f520c988cb5a Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:31:27 +0200 Subject: [PATCH 08/27] Trying to build bluetooth again with the mgmt header --- .github/workflows/Linux build template.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 6a5373ce1..5b2714a46 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -29,6 +29,7 @@ jobs: ${{matrix.architecture == '32' && 'sudo dpkg --add-architecture i386' || ':'}} sudo apt-get update sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev bluez libbluetooth-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} + sudo wget https://raw.githubusercontent.com/bluez/bluez/master/lib/mgmt.h -P /usr/include/bluetooth/ sudo pip install jsonref # ----- Checkout & DependsOn regex ----- @@ -117,7 +118,8 @@ jobs: -DPROXYSTUB_PATH="${PWD}/${{matrix.build_type}}/install/usr/lib/wpeframework/proxystubs" \ -DSYSTEM_PATH="${PWD}/${{matrix.build_type}}/install/usr/lib/wpeframework/plugins" \ -DVOLATILE_PATH="tmp" \ - -DBROADCAST=ON \ + -DBLUETOOTH_SUPPORT=ON \ + -DBLUETOOTH=ON \ -DLOCALTRACER=ON \ -DWARNING_REPORTING=ON \ -DPROCESSCONTAINERS=ON \ From 4b1e6782775c27eb889f6ea6e9dd1ac89a37fc3a Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:45:52 +0200 Subject: [PATCH 09/27] Try building without downloading the BlueZ packages first --- .github/workflows/Linux build template.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 5b2714a46..69d3f6e53 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -28,8 +28,7 @@ jobs: echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list ${{matrix.architecture == '32' && 'sudo dpkg --add-architecture i386' || ':'}} sudo apt-get update - sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev bluez libbluetooth-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} - sudo wget https://raw.githubusercontent.com/bluez/bluez/master/lib/mgmt.h -P /usr/include/bluetooth/ + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} sudo pip install jsonref # ----- Checkout & DependsOn regex ----- From d35ba4afe275cb744777902cb516f6c5ee684a94 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:45:11 +0200 Subject: [PATCH 10/27] Adding the DOWNLOAD_BLUEZ_UTIL_HEADERS flag and setting it up --- .github/workflows/Linux build template.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 69d3f6e53..70da8493f 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -119,6 +119,7 @@ jobs: -DVOLATILE_PATH="tmp" \ -DBLUETOOTH_SUPPORT=ON \ -DBLUETOOTH=ON \ + -DDOWNLOAD_BLUEZ_UTIL_HEADERS=ON \ -DLOCALTRACER=ON \ -DWARNING_REPORTING=ON \ -DPROCESSCONTAINERS=ON \ From 7b036898b810f59c3ae562557096d58f08b885da Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:26:33 +0200 Subject: [PATCH 11/27] Adding a SYSTEM keyword to supress warnings from BlueZ headers --- cmake/modules/FindBluez5UtilHeaders.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/FindBluez5UtilHeaders.cmake b/cmake/modules/FindBluez5UtilHeaders.cmake index 00cd3bbb3..beb8c53d1 100644 --- a/cmake/modules/FindBluez5UtilHeaders.cmake +++ b/cmake/modules/FindBluez5UtilHeaders.cmake @@ -98,7 +98,7 @@ if(NOT TARGET Bluez5UtilHeaders) if(DOWNLOAD_BLUEZ_UTIL_HEADERS) target_include_directories(Bluez5UtilHeaders - INTERFACE + SYSTEM INTERFACE $ $ ) @@ -114,7 +114,7 @@ if(NOT TARGET Bluez5UtilHeaders) HeaderOnlyInstallCMakeConfig(TARGET Bluez5UtilHeaders TREAT_AS_NORMAL) else() target_include_directories(Bluez5UtilHeaders - INTERFACE + SYSTEM INTERFACE ${BLUEZ_INCLUDE_DIRS}) endif() @@ -123,4 +123,4 @@ if(NOT TARGET Bluez5UtilHeaders) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Bluez5UtilHeaders DEFAULT_MSG BLUEZ_INCLUDE_DIRS) mark_as_advanced(BLUEZ_INCLUDE_DIRS) -endif() \ No newline at end of file +endif() From 440abe0008d6c0e3d30ffabcb6ed4be3b6ff6ead Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:49:15 +0200 Subject: [PATCH 12/27] Trying to set the NO_INCLUSIVE_LANGUAGE flag to PUBLIC to see if that fixes the issue --- cmake/modules/FindBluez5UtilHeaders.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/FindBluez5UtilHeaders.cmake b/cmake/modules/FindBluez5UtilHeaders.cmake index beb8c53d1..2711b58d2 100644 --- a/cmake/modules/FindBluez5UtilHeaders.cmake +++ b/cmake/modules/FindBluez5UtilHeaders.cmake @@ -93,7 +93,7 @@ if(NOT TARGET Bluez5UtilHeaders) if(${NO_INCLUSIVE_LANGUAGE}) message(VERBOSE "Your bluez version does not use inclusive language anymore") - target_compile_definitions(Bluez5UtilHeaders INTERFACE NO_INCLUSIVE_LANGUAGE) + target_compile_definitions(Bluez5UtilHeaders PUBLIC NO_INCLUSIVE_LANGUAGE) endif() if(DOWNLOAD_BLUEZ_UTIL_HEADERS) From c3a9d26698a42b76748c98fbe6c75448dcc24532 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:54:16 +0200 Subject: [PATCH 13/27] Removing SYSTEM keyword for now to test if that causes problem with flags propagation --- cmake/modules/FindBluez5UtilHeaders.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindBluez5UtilHeaders.cmake b/cmake/modules/FindBluez5UtilHeaders.cmake index 2711b58d2..52a83cd74 100644 --- a/cmake/modules/FindBluez5UtilHeaders.cmake +++ b/cmake/modules/FindBluez5UtilHeaders.cmake @@ -98,7 +98,7 @@ if(NOT TARGET Bluez5UtilHeaders) if(DOWNLOAD_BLUEZ_UTIL_HEADERS) target_include_directories(Bluez5UtilHeaders - SYSTEM INTERFACE + INTERFACE $ $ ) @@ -114,7 +114,7 @@ if(NOT TARGET Bluez5UtilHeaders) HeaderOnlyInstallCMakeConfig(TARGET Bluez5UtilHeaders TREAT_AS_NORMAL) else() target_include_directories(Bluez5UtilHeaders - SYSTEM INTERFACE + INTERFACE ${BLUEZ_INCLUDE_DIRS}) endif() From f2eead4022851056d7707eb19013c820e4e27c5e Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:55:00 +0200 Subject: [PATCH 14/27] For now removing treatment of warnings as error to test the changes --- .github/workflows/Linux build template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 70da8493f..08fa93338 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -104,8 +104,8 @@ jobs: - name: Build Thunder run: | cmake -G Ninja -S Thunder -B ${{matrix.build_type}}/build/Thunder \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ - -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ + -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -m${{matrix.architecture}}" \ + -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -m${{matrix.architecture}}" \ -DBUILD_SHARED_LIBS=${{matrix.shared_libs}} \ -DBINDING="127.0.0.1" \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ From fcd592c80a403ca8d3ffbcd0432a42d1df5add8d Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:01:20 +0200 Subject: [PATCH 15/27] Changing BlueZ to interface in target compile definitions --- cmake/modules/FindBluez5UtilHeaders.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/FindBluez5UtilHeaders.cmake b/cmake/modules/FindBluez5UtilHeaders.cmake index 52a83cd74..d3f777094 100644 --- a/cmake/modules/FindBluez5UtilHeaders.cmake +++ b/cmake/modules/FindBluez5UtilHeaders.cmake @@ -93,7 +93,7 @@ if(NOT TARGET Bluez5UtilHeaders) if(${NO_INCLUSIVE_LANGUAGE}) message(VERBOSE "Your bluez version does not use inclusive language anymore") - target_compile_definitions(Bluez5UtilHeaders PUBLIC NO_INCLUSIVE_LANGUAGE) + target_compile_definitions(Bluez5UtilHeaders INTERFACE NO_INCLUSIVE_LANGUAGE) endif() if(DOWNLOAD_BLUEZ_UTIL_HEADERS) From 9f50e8ddc4422ce7d23c4da67f2a669d90688772 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:47:23 +0200 Subject: [PATCH 16/27] Disabling pedanitc warnings in the included BlueZ headers --- Source/extensions/bluetooth/Module.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/extensions/bluetooth/Module.h b/Source/extensions/bluetooth/Module.h index 499c7391b..a4fe78da7 100644 --- a/Source/extensions/bluetooth/Module.h +++ b/Source/extensions/bluetooth/Module.h @@ -26,11 +26,15 @@ #include #include +PUSH_WARNING(DISABLE_WARNING_PEDANTIC) + #include <../include/bluetooth/bluetooth.h> #include <../include/bluetooth/hci.h> #include <../include/bluetooth/mgmt.h> #include <../include/bluetooth/l2cap.h> +POP_WARNING() + #include "Debug.h" #if defined(__WINDOWS__) && defined(BLUETOOTH_EXPORTS) From 09c5d05a53194f6fd1fa7ccf8342425a985dfc11 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:50:47 +0200 Subject: [PATCH 17/27] Add the -Werror cmake flags back --- .github/workflows/Linux build template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 08fa93338..70da8493f 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -104,8 +104,8 @@ jobs: - name: Build Thunder run: | cmake -G Ninja -S Thunder -B ${{matrix.build_type}}/build/Thunder \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -m${{matrix.architecture}}" \ - -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -m${{matrix.architecture}}" \ + -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ + -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ -DBUILD_SHARED_LIBS=${{matrix.shared_libs}} \ -DBINDING="127.0.0.1" \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ From 3f62cfaf5bb10150b44c0cb3037d9d049a4c295f Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:53:04 +0200 Subject: [PATCH 18/27] Disabling pedantic warning in BlueZ headers includes in NodeId --- Source/core/NodeId.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/core/NodeId.h b/Source/core/NodeId.h index 4acfec44d..f5f2ae9a0 100644 --- a/Source/core/NodeId.h +++ b/Source/core/NodeId.h @@ -46,9 +46,11 @@ #endif #ifdef __CORE_BLUETOOTH_SUPPORT__ +PUSH_WARNING(DISABLE_WARNING_PEDANTIC) #include <../include/bluetooth/bluetooth.h> #include <../include/bluetooth/hci.h> #include <../include/bluetooth/l2cap.h> +POP_WARNING() #else #ifndef AF_BLUETOOTH #define AF_BLUETOOTH 60000 From 7ffe272e37e4da2683ef16a5107443f63bd10141 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:09:19 +0200 Subject: [PATCH 19/27] Changing the FindBluez5UtilHeaders cmake to suppress warnings treated as errors --- cmake/modules/FindBluez5UtilHeaders.cmake | 31 +++++++++++++++-------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/cmake/modules/FindBluez5UtilHeaders.cmake b/cmake/modules/FindBluez5UtilHeaders.cmake index d3f777094..7564f1b4c 100644 --- a/cmake/modules/FindBluez5UtilHeaders.cmake +++ b/cmake/modules/FindBluez5UtilHeaders.cmake @@ -42,6 +42,19 @@ set(NEEDED_BLUEZ_HEADERS l2cap.h ) +function(CheckNoInclusiveLanguage) + include(CheckStructHasMember) + + set(CMAKE_REQUIRED_FLAGS "-Wno-error") + + check_struct_has_member("struct mgmt_ltk_info" central + "${BLUEZ_INCLUDE_DIRS}/bluetooth/bluetooth.h;${BLUEZ_INCLUDE_DIRS}/bluetooth/mgmt.h" + _NO_INCLUSIVE_LANGUAGE + LANGUAGE C) + + set(NO_INCLUSIVE_LANGUAGE ${_NO_INCLUSIVE_LANGUAGE} PARENT_SCOPE) +endfunction() + if(NOT TARGET Bluez5UtilHeaders) set(BLUEZ_INCLUDE_DIRS) @@ -86,11 +99,9 @@ if(NOT TARGET Bluez5UtilHeaders) # https://github.com/bluez/bluez/commit/b7d6a7d25628e9b521a29a5c133fcadcedeb2102 # include(CheckStructHasMember) - check_struct_has_member("struct mgmt_ltk_info" central - "${BLUEZ_INCLUDE_DIRS}/bluetooth/bluetooth.h;${BLUEZ_INCLUDE_DIRS}/bluetooth/mgmt.h" - NO_INCLUSIVE_LANGUAGE - LANGUAGE C) - + + CheckNoInclusiveLanguage() + if(${NO_INCLUSIVE_LANGUAGE}) message(VERBOSE "Your bluez version does not use inclusive language anymore") target_compile_definitions(Bluez5UtilHeaders INTERFACE NO_INCLUSIVE_LANGUAGE) @@ -103,21 +114,21 @@ if(NOT TARGET Bluez5UtilHeaders) $ ) - install(TARGETS Bluez5UtilHeaders EXPORT Bluez5UtilHeadersTargets) - file(GLOB Bluez5UtilHeadersFiles "${CMAKE_BINARY_DIR}/bluez-${DOWNLOAD_BLUEZ_UTIL_HEADERS_VERSION}/lib/*.h") install(FILES ${Bluez5UtilHeadersFiles} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/Bluez5UtilHeaders/include/bluetooth COMPONENT ${NAMESPACE}_Development) - - include(HeaderOnlyInstall) - HeaderOnlyInstallCMakeConfig(TARGET Bluez5UtilHeaders TREAT_AS_NORMAL) else() target_include_directories(Bluez5UtilHeaders INTERFACE ${BLUEZ_INCLUDE_DIRS}) endif() + install(TARGETS Bluez5UtilHeaders EXPORT Bluez5UtilHeadersTargets) + + include(HeaderOnlyInstall) + HeaderOnlyInstallCMakeConfig(TARGET Bluez5UtilHeaders TREAT_AS_NORMAL) + message(TRACE "BLUEZ_INCLUDE_DIRS ${BLUEZ_INCLUDE_DIRS}") include(FindPackageHandleStandardArgs) From 14fe22facf036772750632f94c721f96c5e80aad Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:10:26 +0200 Subject: [PATCH 20/27] Removing PUSH_WARNING macro use in NodeId as it is no longer needed --- Source/core/NodeId.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/core/NodeId.h b/Source/core/NodeId.h index f5f2ae9a0..4acfec44d 100644 --- a/Source/core/NodeId.h +++ b/Source/core/NodeId.h @@ -46,11 +46,9 @@ #endif #ifdef __CORE_BLUETOOTH_SUPPORT__ -PUSH_WARNING(DISABLE_WARNING_PEDANTIC) #include <../include/bluetooth/bluetooth.h> #include <../include/bluetooth/hci.h> #include <../include/bluetooth/l2cap.h> -POP_WARNING() #else #ifndef AF_BLUETOOTH #define AF_BLUETOOTH 60000 From f4c80417eb013468988294191aa9b4931e400bd8 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:10:57 +0200 Subject: [PATCH 21/27] Removing PUSH_WARNING macro use in the bluetooth extension --- Source/extensions/bluetooth/Module.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/extensions/bluetooth/Module.h b/Source/extensions/bluetooth/Module.h index a4fe78da7..499c7391b 100644 --- a/Source/extensions/bluetooth/Module.h +++ b/Source/extensions/bluetooth/Module.h @@ -26,15 +26,11 @@ #include #include -PUSH_WARNING(DISABLE_WARNING_PEDANTIC) - #include <../include/bluetooth/bluetooth.h> #include <../include/bluetooth/hci.h> #include <../include/bluetooth/mgmt.h> #include <../include/bluetooth/l2cap.h> -POP_WARNING() - #include "Debug.h" #if defined(__WINDOWS__) && defined(BLUETOOTH_EXPORTS) From ccc66ebca1546096143fbc480a762bc45fa31bfd Mon Sep 17 00:00:00 2001 From: VeithMetro Date: Mon, 23 Sep 2024 09:48:53 +0200 Subject: [PATCH 22/27] Removing FindBluez5UtilHeaders from cmake/modules to merge master changes --- cmake/modules/FindBluez5UtilHeaders.cmake | 137 ---------------------- 1 file changed, 137 deletions(-) delete mode 100644 cmake/modules/FindBluez5UtilHeaders.cmake diff --git a/cmake/modules/FindBluez5UtilHeaders.cmake b/cmake/modules/FindBluez5UtilHeaders.cmake deleted file mode 100644 index 7564f1b4c..000000000 --- a/cmake/modules/FindBluez5UtilHeaders.cmake +++ /dev/null @@ -1,137 +0,0 @@ -# - Try to find Bluez Utils Headers -# Once done this will define -# Bluez5UtilHeaders::Bluez5UtilHeaders - The bluez include directories -# -# Copyright (C) 2022 Metrological. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS -# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE - -option(DOWNLOAD_BLUEZ_UTIL_HEADERS "Download bluez5 headers, only for testing or development..." OFF) -set(DOWNLOAD_BLUEZ_UTIL_HEADERS_VERSION "5.78" CACHE STRING "version of the bluez5 headers to download...") -set(DOWNLOAD_BLUEZ_UTIL_HEADERS_REPO "https://github.com/bluez/bluez.git" CACHE STRING "Repo where to get the bluez5 headers...") - -if(Bluez5UtilHeaders_FIND_QUIETLY) - set(_FIND_MODE QUIET) -elseif(Bluez5UtilHeaders_FIND_REQUIRED) - set(_FIND_MODE REQUIRED) -endif() - -set(NEEDED_BLUEZ_HEADERS - bluetooth.h - hci.h - mgmt.h - l2cap.h -) - -function(CheckNoInclusiveLanguage) - include(CheckStructHasMember) - - set(CMAKE_REQUIRED_FLAGS "-Wno-error") - - check_struct_has_member("struct mgmt_ltk_info" central - "${BLUEZ_INCLUDE_DIRS}/bluetooth/bluetooth.h;${BLUEZ_INCLUDE_DIRS}/bluetooth/mgmt.h" - _NO_INCLUSIVE_LANGUAGE - LANGUAGE C) - - set(NO_INCLUSIVE_LANGUAGE ${_NO_INCLUSIVE_LANGUAGE} PARENT_SCOPE) -endfunction() - -if(NOT TARGET Bluez5UtilHeaders) - set(BLUEZ_INCLUDE_DIRS) - - if(DOWNLOAD_BLUEZ_UTIL_HEADERS AND NOT TARGET DownloadedBluez5Headers) - message(STATUS "Downloaded bluez5 headers are used, assuming your \"the expert\"!") - - include(GetExternalCode) - include(CreateLink) - - GetExternalCode( - GIT_REPOSITORY "${DOWNLOAD_BLUEZ_UTIL_HEADERS_REPO}" - GIT_VERSION "${DOWNLOAD_BLUEZ_UTIL_HEADERS_VERSION}" - SOURCE_DIR "${CMAKE_BINARY_DIR}/bluez-${DOWNLOAD_BLUEZ_UTIL_HEADERS_VERSION}" - ) - - add_library(DownloadedBluez5Headers INTERFACE) - - #FIX ME: Hack for weird include paths in the source... - CreateLink( - LINK "${CMAKE_BINARY_DIR}/bluez/include/bluetooth" - TARGET "${CMAKE_BINARY_DIR}/bluez-${DOWNLOAD_BLUEZ_UTIL_HEADERS_VERSION}/lib" - ) - - set(BLUEZ_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/bluez/include") - else() - foreach(_header ${NEEDED_BLUEZ_HEADERS}) - find_path(_header_path bluetooth/${_header}) - if(_header_path) - message(VERBOSE "Found ${_header} in ${_header_path}") - list(APPEND BLUEZ_INCLUDE_DIRS ${_header_path}) - endif() - endforeach() - - list(REMOVE_DUPLICATES BLUEZ_INCLUDE_DIRS) - endif() - - add_library(Bluez5UtilHeaders INTERFACE) - add_library(Bluez5UtilHeaders::Bluez5UtilHeaders ALIAS Bluez5UtilHeaders) - - # - # From Bluez >= v5.64 the mgmt_ltk_info struct is changed due to inclusive language changes. - # https://github.com/bluez/bluez/commit/b7d6a7d25628e9b521a29a5c133fcadcedeb2102 - # - include(CheckStructHasMember) - - CheckNoInclusiveLanguage() - - if(${NO_INCLUSIVE_LANGUAGE}) - message(VERBOSE "Your bluez version does not use inclusive language anymore") - target_compile_definitions(Bluez5UtilHeaders INTERFACE NO_INCLUSIVE_LANGUAGE) - endif() - - if(DOWNLOAD_BLUEZ_UTIL_HEADERS) - target_include_directories(Bluez5UtilHeaders - INTERFACE - $ - $ - ) - - file(GLOB Bluez5UtilHeadersFiles "${CMAKE_BINARY_DIR}/bluez-${DOWNLOAD_BLUEZ_UTIL_HEADERS_VERSION}/lib/*.h") - - install(FILES ${Bluez5UtilHeadersFiles} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/Bluez5UtilHeaders/include/bluetooth COMPONENT ${NAMESPACE}_Development) - else() - target_include_directories(Bluez5UtilHeaders - INTERFACE - ${BLUEZ_INCLUDE_DIRS}) - endif() - - install(TARGETS Bluez5UtilHeaders EXPORT Bluez5UtilHeadersTargets) - - include(HeaderOnlyInstall) - HeaderOnlyInstallCMakeConfig(TARGET Bluez5UtilHeaders TREAT_AS_NORMAL) - - message(TRACE "BLUEZ_INCLUDE_DIRS ${BLUEZ_INCLUDE_DIRS}") - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Bluez5UtilHeaders DEFAULT_MSG BLUEZ_INCLUDE_DIRS) - mark_as_advanced(BLUEZ_INCLUDE_DIRS) -endif() From 4c89c1d6e3a7caa24995f6c566a2dd25813cf3c8 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 23 Sep 2024 09:59:11 +0200 Subject: [PATCH 23/27] Adding Bluetooth audio and gatt build options --- .github/workflows/Linux build template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 70da8493f..d22f7a0dd 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -120,6 +120,8 @@ jobs: -DBLUETOOTH_SUPPORT=ON \ -DBLUETOOTH=ON \ -DDOWNLOAD_BLUEZ_UTIL_HEADERS=ON \ + -DBLUETOOTH_AUDIO_SUPPORT=ON \ + -DBLUETOOTH_GATT_SUPPORT=ON \ -DLOCALTRACER=ON \ -DWARNING_REPORTING=ON \ -DPROCESSCONTAINERS=ON \ From f3b40ad17b5250a8f3162dabb6ecc0e850518bb1 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:29:16 +0200 Subject: [PATCH 24/27] Installing the libsbc-dev --- .github/workflows/Linux build template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index d22f7a0dd..f0dbb174a 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -28,7 +28,7 @@ jobs: echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list ${{matrix.architecture == '32' && 'sudo dpkg --add-architecture i386' || ':'}} sudo apt-get update - sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev libsbc-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} sudo pip install jsonref # ----- Checkout & DependsOn regex ----- From 16f609f8680e7f65646d5fc284192a932d7afeb0 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:09:13 +0200 Subject: [PATCH 25/27] Make sure to install a 32-bit version if necessary --- .github/workflows/Linux build template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index f0dbb174a..5afef2fbe 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -28,7 +28,7 @@ jobs: echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list ${{matrix.architecture == '32' && 'sudo dpkg --add-architecture i386' || ':'}} sudo apt-get update - sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev libsbc-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev'}} + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev ${{matrix.architecture == '32' && 'zlib1g-dev:i386 libssl-dev:i386 libsbc-dev:i386 gcc-11-multilib g++-11-multilib' || 'zlib1g-dev libssl-dev libsbc-dev'}} sudo pip install jsonref # ----- Checkout & DependsOn regex ----- From ed380878018673d63f3052e241b422ea5df60073 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:30:19 +0200 Subject: [PATCH 26/27] Make sure the PKG paths are correct for each build type --- .github/workflows/Linux build template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 5afef2fbe..81f52d83d 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -85,6 +85,7 @@ jobs: # ----- Installing generators & Options regex ----- - name: Install generators run: | + ${{matrix.architecture == '32' && 'export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH' || 'PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH'}} cmake -G Ninja -S ThunderTools -B ${{matrix.build_type}}/build/ThunderTools \ -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ @@ -103,6 +104,7 @@ jobs: # ----- Building & uploading artifacts ----- - name: Build Thunder run: | + ${{matrix.architecture == '32' && 'export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH' || 'PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH'}} cmake -G Ninja -S Thunder -B ${{matrix.build_type}}/build/Thunder \ -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ From 3ae6190c43c33742964b2787fca2d362e01ac1aa Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:09:11 +0200 Subject: [PATCH 27/27] Make sure to use master template before merging --- .github/workflows/Build Thunder on Linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build Thunder on Linux.yml b/.github/workflows/Build Thunder on Linux.yml index 5979307c3..1cbe4b686 100644 --- a/.github/workflows/Build Thunder on Linux.yml +++ b/.github/workflows/Build Thunder on Linux.yml @@ -17,7 +17,7 @@ on: jobs: Thunder: - uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@development/actions-extensions + uses: rdkcentral/Thunder/.github/workflows/Linux build template.yml@master ThunderInterfaces: needs: Thunder