package/rabbitmq-c: needs dynamic library
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 18 Feb 2019 11:44:34 +0000 (12:44 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Wed, 20 Feb 2019 22:27:57 +0000 (23:27 +0100)
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>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/janus-gateway/Config.in
package/rabbitmq-c/Config.in
package/rabbitmq-c/rabbitmq-c.mk

index 94c00cd34acc04a8f67dc824b11f83d480274ffe..6eac763f7249ed77c9daff8edec113395e8943a3 100644 (file)
@@ -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)"
index b330c904744fb653d33d7a20f251dc7520a98261..6dbd1467cb44489461aa92456fdb7178a47d4971 100644 (file)
@@ -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
index a3c4f8219fb29837650f9b5f6e196ddba525c8b4..6385ccb6b6e9ffb811e65af38918be99a17ceac9 100644 (file)
@@ -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