* [Buildroot] [PATCH 1/1] package/libwebsockets: fix wolfssl build
@ 2023-12-26 22:19 Fabrice Fontaine
2024-01-05 13:03 ` Thomas Petazzoni via buildroot
2024-01-12 18:01 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2023-12-26 22:19 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Fix the following wolfssl build failure raised since commit
d6319d97a7864314088dcc6d1199f35029cfcecb:
-- Checking for one of the modules 'wolfssl'
CMake Error at lib/tls/CMakeLists.txt:79 (message):
You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when
LWS_WITH_WOLFSSL is turned on.
Fixes:
- http://autobuild.buildroot.org/results/fe062b9f0b330e71309334d7605d64ea73761b59
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...eLists.txt-fix-build-with-pkg-config.patch | 46 +++++++++++++++++++
package/libwebsockets/libwebsockets.mk | 2 +-
2 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch
diff --git a/package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch b/package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch
new file mode 100644
index 0000000000..06df61abf5
--- /dev/null
+++ b/package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch
@@ -0,0 +1,46 @@
+From 786ec9231e402cd4e7621483be6f1837de724e3c Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 26 Dec 2023 22:38:18 +0100
+Subject: [PATCH] lib/tls/CMakeLists.txt: fix build with pkg-config
+
+Fix the following wolfssl build failure raised since
+https://github.com/warmcat/libwebsockets/commit/079726c4b252e795b208209752077c1ae4504b5b:
+
+-- Checking for one of the modules 'wolfssl'
+CMake Error at lib/tls/CMakeLists.txt:79 (message):
+ You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when
+ LWS_WITH_WOLFSSL is turned on.
+
+Fixes:
+ - http://autobuild.buildroot.org/results/fe062b9f0b330e71309334d7605d64ea73761b59
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ lib/tls/CMakeLists.txt | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lib/tls/CMakeLists.txt b/lib/tls/CMakeLists.txt
+index 80b46203..230b0d29 100644
+--- a/lib/tls/CMakeLists.txt
++++ b/lib/tls/CMakeLists.txt
+@@ -72,12 +72,16 @@ if (LWS_WITH_SSL AND LWS_WITH_WOLFSSL)
+ include (FindPkgConfig)
+ PKG_SEARCH_MODULE(LWS_WOLFSSL wolfssl)
+
+- if (NOT WOLFSSL_FOUND)
++ if (NOT LWS_WOLFSSL_FOUND)
+ if (LWS_WITH_CYASSL)
+ message(FATAL_ERROR "You must set LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS when LWS_WITH_CYASSL is turned on.")
+ else()
+ message(FATAL_ERROR "You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when LWS_WITH_WOLFSSL is turned on.")
+ endif()
++ else()
++ set(WOLFSSL_LIBRARIES ${LWS_WOLFSSL_LIBRARIES})
++ set(WOLFSSL_INCLUDE_DIRS ${LWS_WOLFSSL_INCLUDE_DIRS})
++ set(WOLFSSL_FOUND 1)
+ endif()
+ else()
+ set(WOLFSSL_LIBRARIES ${LWS_WOLFSSL_LIBRARIES})
+--
+2.43.0
+
diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index 86756ca612..daf481b3bc 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -42,7 +42,7 @@ LIBWEBSOCKETS_CONF_OPTS += \
-DLWS_WITH_SSL=ON \
-DLWS_WITH_MBEDTLS=ON \
-DLWS_WITH_WOLFSSL=OFF
-else ifeq ($(BR2_PACKAGE_WOLFSSL),y)
+else ifeq ($(BR2_PACKAGE_WOLFSSL_ALL),y)
LIBWEBSOCKETS_DEPENDENCIES += host-pkgconf wolfssl
LIBWEBSOCKETS_CONF_OPTS += \
-DLWS_WITH_SSL=ON \
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH 1/1] package/libwebsockets: fix wolfssl build
2023-12-26 22:19 [Buildroot] [PATCH 1/1] package/libwebsockets: fix wolfssl build Fabrice Fontaine
@ 2024-01-05 13:03 ` Thomas Petazzoni via buildroot
2024-01-12 18:01 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-01-05 13:03 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
Hello Fabrice,
On Tue, 26 Dec 2023 23:19:52 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following wolfssl build failure raised since commit
> d6319d97a7864314088dcc6d1199f35029cfcecb:
>
> -- Checking for one of the modules 'wolfssl'
> CMake Error at lib/tls/CMakeLists.txt:79 (message):
> You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when
> LWS_WITH_WOLFSSL is turned on.
Ideally, in such cases, it would be nice to extend a little bit the
commit log to explain how the issue is resolved: "adding a patch that
does XYZ, and making the wolfssl dependency only trigger when
BR2_PACKAGE_WOLFSSL_ALL=y because ...".
> +Fixes:
> + - http://autobuild.buildroot.org/results/fe062b9f0b330e71309334d7605d64ea73761b59
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
The Upstream: tag was missing here. So I dug in the upstream repo, and
found that your fix had been merged, so I added a reference to it here.
Applied, thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/libwebsockets: fix wolfssl build
2023-12-26 22:19 [Buildroot] [PATCH 1/1] package/libwebsockets: fix wolfssl build Fabrice Fontaine
2024-01-05 13:03 ` Thomas Petazzoni via buildroot
@ 2024-01-12 18:01 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-01-12 18:01 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following wolfssl build failure raised since commit
> d6319d97a7864314088dcc6d1199f35029cfcecb:
> -- Checking for one of the modules 'wolfssl'
> CMake Error at lib/tls/CMakeLists.txt:79 (message):
> You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when
> LWS_WITH_WOLFSSL is turned on.
> Fixes:
> - http://autobuild.buildroot.org/results/fe062b9f0b330e71309334d7605d64ea73761b59
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2023.02.x and 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-12 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-26 22:19 [Buildroot] [PATCH 1/1] package/libwebsockets: fix wolfssl build Fabrice Fontaine
2024-01-05 13:03 ` Thomas Petazzoni via buildroot
2024-01-12 18:01 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox