* [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency
@ 2019-02-18 11:44 Fabrice Fontaine
2019-02-18 11:44 ` [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library Fabrice Fontaine
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2019-02-18 11:44 UTC (permalink / raw)
To: buildroot
rabbitmq-c is not an embedded submodule since version 3.16.1 and
https://github.com/balabit/syslog-ng/commit/c0559593c377f04662368dbecf282d2670aad12f
So enable/disable amqp depending on rabbitmq-c availability and remove
uneeded -lrt from LIBS
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/syslog-ng/syslog-ng.mk | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk
index 0c92b091b4..4ac25a675b 100644
--- a/package/syslog-ng/syslog-ng.mk
+++ b/package/syslog-ng/syslog-ng.mk
@@ -14,8 +14,6 @@ SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
eventlog libglib2 openssl pcre
# We're patching configure.ac
SYSLOG_NG_AUTORECONF = YES
-# rabbit-mq needs -lrt
-SYSLOG_NG_CONF_ENV = LIBS=-lrt
SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
--disable-java --disable-java-modules --disable-mongodb
@@ -83,6 +81,13 @@ else
SYSLOG_NG_CONF_OPTS += --disable-http
endif
+ifeq ($(BR2_PACKAGE_RABBITMQ_C),y)
+SYSLOG_NG_DEPENDENCIES += rabbitmq-c
+SYSLOG_NG_CONF_OPTS += --enable-amqp
+else
+SYSLOG_NG_CONF_OPTS += --disable-amqp
+endif
+
ifeq ($(BR2_INIT_SYSTEMD),y)
SYSLOG_NG_DEPENDENCIES += systemd
SYSLOG_NG_CONF_OPTS += \
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library
2019-02-18 11:44 [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Fabrice Fontaine
@ 2019-02-18 11:44 ` Fabrice Fontaine
2019-02-20 22:39 ` Arnout Vandecappelle
2019-02-18 18:05 ` [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Chris Packham
2019-02-20 22:27 ` Arnout Vandecappelle
2 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2019-02-18 11:44 UTC (permalink / raw)
To: buildroot
syslog-ng expects that rabbitmq-c is built with openssl support however
currently we're disabling openssl on rabbitmq-c in static build.
To fix this issue, add a dependency on dynamic library on rabbitmq-c and
its reverse dependencies (only BR2_PACKAGE_JANUS_GATEWAY_RABBITMQ as
php-amqp already depends on dynamic library)
Fixes:
- http://autobuild.buildroot.org/results/fce91b98fb199a26ad5f5f726c9bdec4f9d64486
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/janus-gateway/Config.in | 5 +++--
package/rabbitmq-c/Config.in | 5 +++--
package/rabbitmq-c/rabbitmq-c.mk | 14 +++-----------
3 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/package/janus-gateway/Config.in b/package/janus-gateway/Config.in
index dc8fad067e..8688984aa4 100644
--- a/package/janus-gateway/Config.in
+++ b/package/janus-gateway/Config.in
@@ -67,11 +67,12 @@ comment "MQTT transport needs a toolchain w/ threads and dynamic library support
config BR2_PACKAGE_JANUS_GATEWAY_RABBITMQ
bool "RabbitMQ"
+ depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_RABBITMQ_C
-comment "RabbitMQ transport needs a toolchain w/ threads"
- depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "RabbitMQ transport needs a toolchain w/ dynamic library, threads"
+ depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
config BR2_PACKAGE_JANUS_GATEWAY_REST
bool "REST (HTTP/HTTPS)"
diff --git a/package/rabbitmq-c/Config.in b/package/rabbitmq-c/Config.in
index b330c90474..6dbd1467cb 100644
--- a/package/rabbitmq-c/Config.in
+++ b/package/rabbitmq-c/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_RABBITMQ_C
bool "rabbitmq-c"
+ depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
help
This is a C-language AMQP client library for use with v2.0+
@@ -7,5 +8,5 @@ config BR2_PACKAGE_RABBITMQ_C
https://github.com/alanxz/rabbitmq-c
-comment "rabbitmq-c needs a toolchain w/ threads"
- depends on !BR2_TOOLCHAIN_HAS_THREADS
+comment "rabbitmq-c needs a toolchain w/ dynamic library, threads"
+ depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/rabbitmq-c/rabbitmq-c.mk b/package/rabbitmq-c/rabbitmq-c.mk
index a3c4f8219f..6385ccb6b6 100644
--- a/package/rabbitmq-c/rabbitmq-c.mk
+++ b/package/rabbitmq-c/rabbitmq-c.mk
@@ -19,28 +19,20 @@ RABBITMQ_C_CONF_OPTS = \
RABBITMQ_C_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable
-ifeq ($(BR2_STATIC_LIBS),y)
-RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
-else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+ifeq ($(BR2_SHARED_STATIC_LIBS),y)
RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
else ifeq ($(BR2_SHARED_LIBS),y)
RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
endif
-# CMake OpenSSL detection is buggy, and doesn't properly use
-# pkg-config, so it fails when statically linking. See
-# https://gitlab.kitware.com/cmake/cmake/issues/16885.
-ifeq ($(BR2_PACKAGE_OPENSSL):$(BR2_STATIC_LIBS),y:)
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
RABBITMQ_C_CONF_OPTS += -DENABLE_SSL_SUPPORT=ON
RABBITMQ_C_DEPENDENCIES += openssl
else
RABBITMQ_C_CONF_OPTS += -DENABLE_SSL_SUPPORT=OFF
endif
-# Popt is sometimes linked against libintl, but CMake doesn't know
-# about that, and there's no way to tell manually CMake to link
-# against an additional library.
-ifeq ($(BR2_PACKAGE_POPT):$(BR2_STATIC_LIBS),y:)
+ifeq ($(BR2_PACKAGE_POPT),y)
RABBITMQ_C_CONF_OPTS += -DBUILD_TOOLS=ON
RABBITMQ_C_DEPENDENCIES += popt
else
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency
2019-02-18 11:44 [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Fabrice Fontaine
2019-02-18 11:44 ` [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library Fabrice Fontaine
@ 2019-02-18 18:05 ` Chris Packham
2019-02-20 22:27 ` Arnout Vandecappelle
2 siblings, 0 replies; 6+ messages in thread
From: Chris Packham @ 2019-02-18 18:05 UTC (permalink / raw)
To: buildroot
On Tue, 19 Feb 2019 00:45 Fabrice Fontaine <fontaine.fabrice@gmail.com
wrote:
> rabbitmq-c is not an embedded submodule since version 3.16.1 and
>
> https://github.com/balabit/syslog-ng/commit/c0559593c377f04662368dbecf282d2670aad12f
>
> So enable/disable amqp depending on rabbitmq-c availability and remove
> uneeded -lrt from LIBS
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
Looks good to me
Reviewed-by: Chris Packham <judge.packham@gmail.com>
---
> package/syslog-ng/syslog-ng.mk | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/
> syslog-ng.mk
> index 0c92b091b4..4ac25a675b 100644
> --- a/package/syslog-ng/syslog-ng.mk
> +++ b/package/syslog-ng/syslog-ng.mk
> @@ -14,8 +14,6 @@ SYSLOG_NG_DEPENDENCIES = host-bison host-flex
> host-pkgconf \
> eventlog libglib2 openssl pcre
> # We're patching configure.ac
> SYSLOG_NG_AUTORECONF = YES
> -# rabbit-mq needs -lrt
> -SYSLOG_NG_CONF_ENV = LIBS=-lrt
> SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
> --disable-java --disable-java-modules --disable-mongodb
>
> @@ -83,6 +81,13 @@ else
> SYSLOG_NG_CONF_OPTS += --disable-http
> endif
>
> +ifeq ($(BR2_PACKAGE_RABBITMQ_C),y)
> +SYSLOG_NG_DEPENDENCIES += rabbitmq-c
> +SYSLOG_NG_CONF_OPTS += --enable-amqp
> +else
> +SYSLOG_NG_CONF_OPTS += --disable-amqp
> +endif
> +
> ifeq ($(BR2_INIT_SYSTEMD),y)
> SYSLOG_NG_DEPENDENCIES += systemd
> SYSLOG_NG_CONF_OPTS += \
> --
> 2.14.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190219/f05d83aa/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency
2019-02-18 11:44 [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Fabrice Fontaine
2019-02-18 11:44 ` [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library Fabrice Fontaine
2019-02-18 18:05 ` [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Chris Packham
@ 2019-02-20 22:27 ` Arnout Vandecappelle
2 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-02-20 22:27 UTC (permalink / raw)
To: buildroot
On 18/02/2019 12:44, Fabrice Fontaine wrote:
> rabbitmq-c is not an embedded submodule since version 3.16.1 and
> https://github.com/balabit/syslog-ng/commit/c0559593c377f04662368dbecf282d2670aad12f
>
> So enable/disable amqp depending on rabbitmq-c availability and remove
> uneeded -lrt from LIBS
Applied to master, thanks.
Indeed, since the recent bump to 3.19.1, we "randomly" build with/without amqp
depending on whether rabbitmq-c was built before or not.
Regards,
Arnout
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/syslog-ng/syslog-ng.mk | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk
> index 0c92b091b4..4ac25a675b 100644
> --- a/package/syslog-ng/syslog-ng.mk
> +++ b/package/syslog-ng/syslog-ng.mk
> @@ -14,8 +14,6 @@ SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
> eventlog libglib2 openssl pcre
> # We're patching configure.ac
> SYSLOG_NG_AUTORECONF = YES
> -# rabbit-mq needs -lrt
> -SYSLOG_NG_CONF_ENV = LIBS=-lrt
> SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
> --disable-java --disable-java-modules --disable-mongodb
>
> @@ -83,6 +81,13 @@ else
> SYSLOG_NG_CONF_OPTS += --disable-http
> endif
>
> +ifeq ($(BR2_PACKAGE_RABBITMQ_C),y)
> +SYSLOG_NG_DEPENDENCIES += rabbitmq-c
> +SYSLOG_NG_CONF_OPTS += --enable-amqp
> +else
> +SYSLOG_NG_CONF_OPTS += --disable-amqp
> +endif
> +
> ifeq ($(BR2_INIT_SYSTEMD),y)
> SYSLOG_NG_DEPENDENCIES += systemd
> SYSLOG_NG_CONF_OPTS += \
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library
2019-02-18 11:44 ` [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library Fabrice Fontaine
@ 2019-02-20 22:39 ` Arnout Vandecappelle
2019-02-21 7:57 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-02-20 22:39 UTC (permalink / raw)
To: buildroot
On 18/02/2019 12:44, Fabrice Fontaine wrote:
> syslog-ng expects that rabbitmq-c is built with openssl support however
> currently we're disabling openssl on rabbitmq-c in static build.
>
> To fix this issue, add a dependency on dynamic library on rabbitmq-c and
> its reverse dependencies (only BR2_PACKAGE_JANUS_GATEWAY_RABBITMQ as
> php-amqp already depends on dynamic library)
Actually, janus-gateway also depends on !STATIC already. But the other
transports have the !STATIC dependeny explicitly again, so it makes sense to add
it for rabbitmq too.
Note that this patch essentially reverts Thomas' attempt to fix static build in
beb6524225f, almost two years ago. I expect Thomas was just fixing autobuild
results and doesn't actually need a statically linked rabbitmq.
Note also that the CMake bug report [1] has seen no progress since then.
Therefore, applied to master, thanks.
Regards,
Arnout
[1] https://gitlab.kitware.com/cmake/cmake/issues/16885.
>
> Fixes:
> - http://autobuild.buildroot.org/results/fce91b98fb199a26ad5f5f726c9bdec4f9d64486
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library
2019-02-20 22:39 ` Arnout Vandecappelle
@ 2019-02-21 7:57 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2019-02-21 7:57 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 20 Feb 2019 23:39:59 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:
> Note that this patch essentially reverts Thomas' attempt to fix static build in
> beb6524225f, almost two years ago. I expect Thomas was just fixing autobuild
> results and doesn't actually need a statically linked rabbitmq.
I can confirm that I don't care about rabbitmq static linking support.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-21 7:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 11:44 [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Fabrice Fontaine
2019-02-18 11:44 ` [Buildroot] [PATCH 2/2] package/rabbitmq-c: needs dynamic library Fabrice Fontaine
2019-02-20 22:39 ` Arnout Vandecappelle
2019-02-21 7:57 ` Thomas Petazzoni
2019-02-18 18:05 ` [Buildroot] [PATCH 1/2] package/syslog-ng: add optional rabbitmq-c dependency Chris Packham
2019-02-20 22:27 ` Arnout Vandecappelle
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.