Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
55 stars 47 forks source link

Fail to build and use on FreeBSD #87

Open fblr opened 4 years ago

fblr commented 4 years ago

It is not possible to build and install uamqp on FreeBSD because of 3 different build errors in the bundled azure-uamqp-c.

Workaround: export CFLAGS="-DUSE_OPENSSL -D__APPLE__ -DTCP_KEEPINTVL=512 -DTCP_KEEPALIVE=0x0008" && pip install uamqp

Build errors:

1008covingtonlane commented 3 years ago

Has anyone had success installing UAMQP on BSD11? I tried the workaround above but keep getting compile errors.

/tmp/pip-install-jhr0vii1/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/platform_linux.c:39:12: error: implicit declaration of function 'tlsio_openssl_get_interface_description' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return tlsio_openssl_get_interface_description(); ^ /tmp/pip-install-jhr0vii1/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/platform_linux.c:39:12: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const IO_INTERFACE_DESCRIPTION ' (aka 'const struct IO_INTERFACE_DESCRIPTION_TAG ') [-Werror,-Wint-conversion] return tlsio_openssl_get_interface_description(); ^~~~~~~~~ 2 errors generated.

When I then add the above-suggested CFLAGS I get this failure:

/tmp/pip-install-roah6_9q/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/tlsio_openssl.c:872:24: error: assigning to 'BIO_METHOD *' (aka 'struct bio_method_st *') from 'const BIO_METHOD *' (aka 'const struct bio_method_st *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
            bio_method = BIO_s_mem();
                       ^ ~~~~~~~~~~~
/tmp/pip-install-roah6_9q/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/tlsio_openssl.c:943:18: error: 'TLSv1_2_method' is deprecated [-Werror,-Wdeprecated-declarations]
        method = TLSv1_2_method();
                 ^
/usr/local/include/openssl/ssl.h:1927:1: note: 'TLSv1_2_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* TLSv1.2 */
^
/usr/local/include/openssl/macros.h:161:38: note: expanded from macro 'DEPRECATEDIN_1_1_0'
#   define DEPRECATEDIN_1_1_0(f)     DECLARE_DEPRECATED(f)
                                     ^
/usr/local/include/openssl/macros.h:38:57: note: expanded from macro 'DECLARE_DEPRECATED'
#     define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                                        ^
/tmp/pip-install-roah6_9q/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/tlsio_openssl.c:947:18: error: 'TLSv1_1_method' is deprecated [-Werror,-Wdeprecated-declarations]
        method = TLSv1_1_method();
                 ^
/usr/local/include/openssl/ssl.h:1921:1: note: 'TLSv1_1_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* TLSv1.1 */
^
/usr/local/include/openssl/macros.h:161:38: note: expanded from macro 'DEPRECATEDIN_1_1_0'
#   define DEPRECATEDIN_1_1_0(f)     DECLARE_DEPRECATED(f)
                                     ^
/usr/local/include/openssl/macros.h:38:57: note: expanded from macro 'DECLARE_DEPRECATED'
#     define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                                        ^
/tmp/pip-install-roah6_9q/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/tlsio_openssl.c:951:18: error: 'TLSv1_method' is deprecated [-Werror,-Wdeprecated-declarations]
        method = TLSv1_method();
                 ^
/usr/local/include/openssl/ssl.h:1915:1: note: 'TLSv1_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TLSv1.0 */
^
/usr/local/include/openssl/macros.h:161:38: note: expanded from macro 'DEPRECATEDIN_1_1_0'
#   define DEPRECATEDIN_1_1_0(f)     DECLARE_DEPRECATED(f)
                                     ^
/usr/local/include/openssl/macros.h:38:57: note: expanded from macro 'DECLARE_DEPRECATED'
#     define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                                        ^
/tmp/pip-install-roah6_9q/uamqp/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/tlsio_openssl.c:1094:5: error: 'ERR_remove_thread_state' is deprecated [-Werror,-Wdeprecated-declarations]
    ERR_remove_thread_state(NULL);
    ^
/usr/local/include/openssl/err.h:350:1: note: 'ERR_remove_thread_state' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))
^
/usr/local/include/openssl/macros.h:161:38: note: expanded from macro 'DEPRECATEDIN_1_1_0'
#   define DEPRECATEDIN_1_1_0(f)     DECLARE_DEPRECATED(f)
                                     ^
/usr/local/include/openssl/macros.h:38:57: note: expanded from macro 'DECLARE_DEPRECATED'
#     define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                                        ^
5 errors generated.