Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build and use on FreeBSD #87

Open
fblr opened this issue Aug 12, 2019 · 1 comment
Open

Fail to build and use on FreeBSD #87

fblr opened this issue Aug 12, 2019 · 1 comment

Comments

@fblr
Copy link

fblr commented Aug 12, 2019

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:

  • USE_OPENSSL is undefined, so "azure_c_shared_utility/tlsio_openssl.h" is not included and build failed on deps/azure-c-shared-utility/adapters/platform_linux.c
  • Functions destroy_network_interface_descriptions, create_network_interface_description, set_target_network_interface etc from deps/azure-c-shared-utility/adapters/socketio_berkeley.c are linux specific and cannot be built on FreeBSD. But it looks like they, at first, are not required for uamqp, then, same issue exists for macOS, so all these functions are inside #ifndef APPLE #endif. So it is enough to declare APPLE to fix this error. It seems another bsd specific ifndef should be added.
  • And the last error came from undefined TCP_KEEPINTVL & TCP_KEEPALIVE. TCP_KEEPINTVL is defined in netinet/tcp.h, while TCP_KEEPALIVE does not exist, there is SO_KEEPALIVE
@1008covingtonlane
Copy link

1008covingtonlane commented Aug 24, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants