Skip to content

Failed to install librabbitmq on MacOS High Sierra #123

@shanling2004

Description

@shanling2004

Env:

  • MacOS High Sierra 10.13.3
  • Python 3.6.5
    I encounter the below issue, any idea?

$ pip install librabbitmq==2.0.0

    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'int' [-Wsign-compare]
                if (clong_value == -1)
                    ~~~~~~~~~~~ ^  ~~
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:365:17: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        while (item = PyIter_Next(iterator)) {
               ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:365:17: note: place parentheses around the assignment to silence this warning
        while (item = PyIter_Next(iterator)) {
                    ^
               (                           )
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:365:17: note: use '==' to turn this assignment into an equality comparison
        while (item = PyIter_Next(iterator)) {
                    ^
                    ==
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: unused label 'error' [-Wunused-label]
    error:
    ^~~~~~
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: incompatible pointer to integer conversion returning 'PyObject *' (aka 'struct _object *') from a function with result type 'int' [-Wint-conversion]
            return PyErr_NoMemory();
                   ^~~~~~~~~~~~~~~~
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function 'amqp_simple_wait_frame_on_channel' is invalid in C99 [-Wimplicit-function-declaration]
                amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
                ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: this function declaration is not a prototype [-Wstrict-prototypes]
    6 warnings generated.
    clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq -I/private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.macosx-10.13-x86_64-3.6/private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
    In file included from /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c:48:
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:332:1: error: expected ')'
    DECLARE_XTOXLL(hton)
    ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:298:26: note: expanded from macro 'DECLARE_XTOXLL'
      static inline uint64_t func##ll(uint64_t val)     \
                             ^
    <scratch space>:425:1: note: expanded from here
    htonll
    ^
    /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
    #define htonll(x)       __DARWIN_OSSwapInt64(x)
                            ^
    /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro '__DARWIN_OSSwapInt64'
        (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
                                 ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:332:1: note: to match this '('
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:298:26: note: expanded from macro 'DECLARE_XTOXLL'
      static inline uint64_t func##ll(uint64_t val)     \
                             ^
    <scratch space>:425:1: note: expanded from here
    htonll
    ^
    /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
    #define htonll(x)       __DARWIN_OSSwapInt64(x)
                            ^
    /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro '__DARWIN_OSSwapInt64'
        (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
        ^
    In file included from /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c:48:
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:332:1: error: definition of builtin function '__builtin_constant_p'
    DECLARE_XTOXLL(hton)
    ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:298:26: note: expanded from macro 'DECLARE_XTOXLL'
      static inline uint64_t func##ll(uint64_t val)     \
                             ^
    <scratch space>:425:1: note: expanded from here
    htonll
    ^
    /usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
    #define htonll(x)       __DARWIN_OSSwapInt64(x)
                            ^
    /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro '__DARWIN_OSSwapInt64'
        (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
         ^
    In file included from /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c:48:
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:333:1: error: expected ')'
    DECLARE_XTOXLL(ntoh)
    ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:298:26: note: expanded from macro 'DECLARE_XTOXLL'
      static inline uint64_t func##ll(uint64_t val)     \
                             ^
    <scratch space>:428:1: note: expanded from here
    ntohll
    ^
    /usr/include/sys/_endian.h:140:25: note: expanded from macro 'ntohll'
    #define ntohll(x)       __DARWIN_OSSwapInt64(x)
                            ^
    /usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro '__DARWIN_OSSwapInt64'
        (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
                                 ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:333:1: note: to match this '('
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:298:26: note: expanded from macro 'DECLARE_XTOXLL'
      static inline uint64_t func##ll(uint64_t val)     \
                             ^
    <scratch space>:428:1: note: expanded from here
    ntohll
    ^
    /usr/include/sys/_endian.h:140:25: note: expanded from macro 'ntohll'
    #define ntohll(x)       __DARWIN_OSSwapInt64(x)
                            ^
    /usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro '__DARWIN_OSSwapInt64'
        (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
        ^
    In file included from /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c:48:
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:333:1: error: definition of builtin function '__builtin_constant_p'
    DECLARE_XTOXLL(ntoh)
    ^
    /private/var/folders/y9/z4pjlg2d3xj7z7q53fthpwsr0000gn/T/pip-install-uot9ru9d/librabbitmq/rabbitmq-c/librabbitmq/amqp_private.h:298:26: note: expanded from macro 'DECLARE_XTOXLL'
      static inline uint64_t func##ll(uint64_t val)     \
                             ^
    <scratch space>:428:1: note: expanded from here
    ntohll
    ^
    /usr/include/sys/_endian.h:140:25: note: expanded from macro 'ntohll'
    #define ntohll(x)       __DARWIN_OSSwapInt64(x)
                            ^
    /usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro '__DARWIN_OSSwapInt64'
        (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
         ^
    4 errors generated.
    error: command 'clang' failed with exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions