All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent
@ 2019-10-06 12:53 Fabrice Fontaine
  2019-10-06 12:53 ` [Buildroot] [PATCH 2/2] package/libwebsockets: fix build with libev Fabrice Fontaine
  2019-10-07 20:47 ` [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2019-10-06 12:53 UTC (permalink / raw)
  To: buildroot

libev and libevent can't be enabled at the same time since version 3.0.0
and
https://github.com/warmcat/libwebsockets/commit/ff2f5f601d5965f5860bc989d05b61246f172095

So prefer libev over libevent to have the same default behavior than
upstream LWS_WITH_DISTRO_RECOMMENDED target

Fixes:
 - http://autobuild.buildroot.org/results/ee5ef79a39570bcf5c605b1a4b6b48523605d647

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libwebsockets/libwebsockets.mk | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index 0b488d1f05..7a065dfb22 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -30,16 +30,18 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBEV),y)
 LIBWEBSOCKETS_DEPENDENCIES += libev
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=ON
-else
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+LIBWEBSOCKETS_CONF_OPTS += \
+	-DLWS_WITH_LIBEV=ON \
+	-DLWS_WITH_LIBEVENT=OFF
+else ifeq ($(BR2_PACKAGE_LIBEVENT),y)
 LIBWEBSOCKETS_DEPENDENCIES += libevent
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEVENT=ON
+LIBWEBSOCKETS_CONF_OPTS += \
+	-DLWS_WITH_LIBEV=OFF \
+	-DLWS_WITH_LIBEVENT=ON
 else
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEVENT=OFF
+LIBWEBSOCKETS_CONF_OPTS += \
+	-DLWS_WITH_LIBEV=OFF \
+	-DLWS_WITH_LIBEVENT=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_LIBUV),y)
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] package/libwebsockets: fix build with libev
  2019-10-06 12:53 [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent Fabrice Fontaine
@ 2019-10-06 12:53 ` Fabrice Fontaine
  2019-10-07 20:48   ` Thomas Petazzoni
  2019-10-07 20:47 ` [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2019-10-06 12:53 UTC (permalink / raw)
  To: buildroot

Fixes:
 - http://autobuild.buildroot.org/results/b5a2188dce90f3ca9bf0cc7a043c1a946b8e288f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ix-build-with-libev-and-without-test.patch | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch

diff --git a/package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch b/package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch
new file mode 100644
index 0000000000..ff85571fc9
--- /dev/null
+++ b/package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch
@@ -0,0 +1,52 @@
+From 72c761789550703f004962ae164c415928e5e35c Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 6 Oct 2019 14:45:15 +0200
+Subject: [PATCH] CMakeLists.txt: fix build with libev and without testapps
+
+Move libev workaround outside the
+if ((LWS_ROLE_H1 OR LWS_ROLE_H2) AND NOT LWS_WITHOUT_TESTAPPS) block
+otherwise build fails on:
+
+/home/naourr/work/instance-1/output-1/build/libwebsockets-3.2.0/lib/event-libs/libev/libev.c: In function 'lws_ev_hrtimer_cb':
+/home/naourr/work/instance-1/output-1/build/libwebsockets-3.2.0/lib/event-libs/libev/libev.c:34:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
+   ev_timer_set(&pt->ev.hrtimer, ((float)us) / 1000000.0, 0);
+   ^~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/b5a2188dce90f3ca9bf0cc7a043c1a946b8e288f
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/warmcat/libwebsockets/pull/1707]
+---
+ CMakeLists.txt | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6c26feb2..a10178c2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1435,6 +1435,8 @@ endif()
+ if (LWS_WITH_LIBEV AND LWS_WITH_NETWORK)
+ 	list(APPEND SOURCES
+ 		lib/event-libs/libev/libev.c)
++	# libev generates a big mess of warnings with gcc, maintainer claims gcc to blame
++	set_source_files_properties( lib/event-libs/libev/libev.c PROPERTIES COMPILE_FLAGS "-Wno-error" )
+ endif()
+ 
+ if (LWS_WITH_LEJP)
+@@ -2195,12 +2197,6 @@ if ((LWS_ROLE_H1 OR LWS_ROLE_H2) AND NOT LWS_WITHOUT_TESTAPPS)
+ 		endif()
+ 	endif()
+ 
+-	if (LWS_WITH_LIBEV)
+-		# libev generates a big mess of warnings with gcc, maintainer claims gcc to blame
+-		set_source_files_properties( lib/event-libs/libev/libev.c PROPERTIES COMPILE_FLAGS "-Wno-error" )
+-	endif()
+-
+-
+ 	if (NOT LWS_WITHOUT_SERVER)
+ 		#
+ 		# test-server
+-- 
+2.23.0
+
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent
  2019-10-06 12:53 [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent Fabrice Fontaine
  2019-10-06 12:53 ` [Buildroot] [PATCH 2/2] package/libwebsockets: fix build with libev Fabrice Fontaine
@ 2019-10-07 20:47 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-10-07 20:47 UTC (permalink / raw)
  To: buildroot

On Sun,  6 Oct 2019 14:53:38 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> libev and libevent can't be enabled at the same time since version 3.0.0
> and
> https://github.com/warmcat/libwebsockets/commit/ff2f5f601d5965f5860bc989d05b61246f172095
> 
> So prefer libev over libevent to have the same default behavior than
> upstream LWS_WITH_DISTRO_RECOMMENDED target
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/ee5ef79a39570bcf5c605b1a4b6b48523605d647
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/libwebsockets/libwebsockets.mk | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] package/libwebsockets: fix build with libev
  2019-10-06 12:53 ` [Buildroot] [PATCH 2/2] package/libwebsockets: fix build with libev Fabrice Fontaine
@ 2019-10-07 20:48   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-10-07 20:48 UTC (permalink / raw)
  To: buildroot

On Sun,  6 Oct 2019 14:53:39 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fixes:
>  - http://autobuild.buildroot.org/results/b5a2188dce90f3ca9bf0cc7a043c1a946b8e288f
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...ix-build-with-libev-and-without-test.patch | 52 +++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch
> 
> diff --git a/package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch b/package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch
> new file mode 100644
> index 0000000000..ff85571fc9
> --- /dev/null
> +++ b/package/libwebsockets/0001-CMakeLists.txt-fix-build-with-libev-and-without-test.patch
> @@ -0,0 +1,52 @@
> +From 72c761789550703f004962ae164c415928e5e35c Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sun, 6 Oct 2019 14:45:15 +0200
> +Subject: [PATCH] CMakeLists.txt: fix build with libev and without testapps
> +
> +Move libev workaround outside the
> +if ((LWS_ROLE_H1 OR LWS_ROLE_H2) AND NOT LWS_WITHOUT_TESTAPPS) block
> +otherwise build fails on:
> +
> +/home/naourr/work/instance-1/output-1/build/libwebsockets-3.2.0/lib/event-libs/libev/libev.c: In function 'lws_ev_hrtimer_cb':
> +/home/naourr/work/instance-1/output-1/build/libwebsockets-3.2.0/lib/event-libs/libev/libev.c:34:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
> +   ev_timer_set(&pt->ev.hrtimer, ((float)us) / 1000000.0, 0);
> +   ^~~~~~~~~~~~
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/b5a2188dce90f3ca9bf0cc7a043c1a946b8e288f
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/warmcat/libwebsockets/pull/1707]

I changed that to the actual commit that was merged, since it has been
merged now. Applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-07 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-06 12:53 [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent Fabrice Fontaine
2019-10-06 12:53 ` [Buildroot] [PATCH 2/2] package/libwebsockets: fix build with libev Fabrice Fontaine
2019-10-07 20:48   ` Thomas Petazzoni
2019-10-07 20:47 ` [Buildroot] [PATCH 1/2] package/libwebsockets: fix build with libev and libevent Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.