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

Failed to install librabbitmq on MacOS High Sierra #123

Open
shanling2004 opened this issue Jul 13, 2018 · 37 comments
Open

Failed to install librabbitmq on MacOS High Sierra #123

shanling2004 opened this issue Jul 13, 2018 · 37 comments

Comments

@shanling2004
Copy link

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

@gruszczy
Copy link

Same here.

@auvipy
Copy link
Member

auvipy commented Aug 13, 2018

use py-amqp instead

@ivermac
Copy link

ivermac commented Aug 14, 2018

Getting the same problem when trying to install librabbitmq version 2.0.0. Any help would highly be appreciated.

Env:

MacOS High Sierra 10.13.6
Python 3.6.4

@creslinux
Copy link

I've hit a brick wall here too:

I'm running into this, spent the morning trying various means to install librabbitmq to no luck

Is there an how-to install on OSX?
Im on python 3.6, virtual-env

I've installed:

brew install autoconf
brew install automake
brew install pkg-config
Ive tried:

git clone https://github.com/celery/librabbitmq.git
cd librabbitmq
git submodule init
git submodule update

pip, pip3, easy_install.. same deal every time
error: command 'clang' failed with exit status 1

@sgargan
Copy link

sgargan commented Oct 26, 2018

same deal here, building on OSX High Sierra 10.13.6

@dougbyrne
Copy link

Hi, seeing the same. Also on 10.13.6.

It seems to be a problem in the rabbitmq-c configure, or in the case of #121 autoconf isn't available at all. In either case, HAVE_HTONLL doesn't get defined, and that messes stuff up.

I'm going to open a issue on the rabbitmq-c side.

@huanghe314
Copy link

I've hit a brick wall here too:

I'm running into this, spent the morning trying various means to install librabbitmq to no luck

Is there an how-to install on OSX?
Im on python 3.6, virtual-env

I've installed:

brew install autoconf
brew install automake
brew install pkg-config
Ive tried:

git clone https://github.com/celery/librabbitmq.git
cd librabbitmq
git submodule init
git submodule update

pip, pip3, easy_install.. same deal every time
error: command 'clang' failed with exit status 1

I tried your solution and after brew install automake, librabbitmq is installed successfully, same python version and librabbitmq version as yours, but my Mac version is 10.14

@guofeng1997
Copy link

git clone https://github.com/celery/librabbitmq.git
cd librabbitmq
python setup.py install

@quantoid
Copy link

quantoid commented Jan 15, 2019

Getting the same failure with:

  • python 3.7.2
  • MacOS 10.14.2 (Mojave)

Installing autoconf and automake made no difference.

Installing by cloning the git repo as described in the previous comment gives the same error (not surprisingly).

@ConnorBarnhill
Copy link

use sudo pip install

@bjackson
Copy link

I was able to get it to build by using Xcode Command Line Tools 10.2. Can anyone else confirm that it works for them?

@dougbyrne
Copy link

@bjackson That one did it for me. I installed the beta tools and the library built OK.

@wjzhao
Copy link

wjzhao commented Feb 20, 2019

I have the same problem, so, how do you resolve it ?
My environment is :
python3.6.3
pip18.1
macOS 10.13.2

@StijnCazou
Copy link

@bjackson How do you mean? You used de Command tools?

@bjackson
Copy link

@StijnCazou and @wjzhao, you will need to upgrade your Xcode Command Line Tools to 10.2. The upgraded command line tools might include a fix that allows librabbitmq-c to build.

You can download Xcode Command Line Tools 10.2 here: https://developer.apple.com/download/more/

@wjzhao
Copy link

wjzhao commented Mar 8, 2019

@bjackson Thank you, I have resolve the problem by your way~~

@quantoid
Copy link

quantoid commented Mar 8, 2019

I switched to Redis in the end. :(

@StijnLemon
Copy link

@bjackson Doesn't work for me...

@lmcl90
Copy link

lmcl90 commented Apr 1, 2019

My env is:

macOS Mojave 10.14.3
python 3.7.0

I solved this problem by:

brew install autoconf
brew install automake
brew install pkg-config

@creslinux @huanghe314

@Kronuz
Copy link

Kronuz commented Jul 11, 2019

You also need libtool to build under macOS:

brew install autoconf
brew install automake
brew install pkg-config
brew install libtool

pip install librabbitmq

@bedrockjohan
Copy link

brew install libtool like @Kronuz said is what fixed it for me!

@sebastienvercammen
Copy link

It's 2020, and I had a similar issue as described above. Only the full commands that @Kronuz shared fixed it.

brew install autoconf automake pkg-config libtool
pip install librabbitmq

@huntzhan
Copy link

huntzhan commented Aug 31, 2020

It's 2020/08/31, and for some unknown reason Apple pushed the #Xcode12 Beta 5 (build 12A8189h, requires macOS 10.15.4+) to my MacBook and afterward Clang 12.0.0 (1200.0.31.1) was installed then causing compiling error in pip install librabbitmq.

Need to rollback to Command Line Tools for Xcode 11.5 (download here) to resolve this issue.

@ulgens
Copy link

ulgens commented Dec 20, 2020

2020/12/20

Under Big Sur, recommended brew packages doesn't solve the issue and Mac OS doesn't allow to downgrade xcode version by saying "Your Mac OS version is too new for this version.".

@auvipy
Copy link
Member

auvipy commented Dec 21, 2020

please use py-amqp as this library is not recommended anymore. py-amqp also has some cython bindings

@ulgens
Copy link

ulgens commented Dec 22, 2020

@auvipy Not recommended by who?

@auvipy
Copy link
Member

auvipy commented Dec 22, 2020

@auvipy Not recommended by who?

by @celery/core-developers

@ulgens
Copy link

ulgens commented Dec 22, 2020

@auvipy Thanks a lot. Is this mentioned in celery docs, how can i get detailed info on this?

@thedrow
Copy link
Member

thedrow commented Dec 24, 2020

No it is not. But we don't maintain it ourselves.
We only accept patches for it.

@sigaev-pro
Copy link

Same issue on Big Sur.

brew install autoconf automake pkg-config libtool

does not solve the problem.

@jspaans91
Copy link

Same here on Big Sur

@tombroi
Copy link

tombroi commented Apr 21, 2021

Any help on this issue? brew install autoconf automake pkg-config libtool these installations dont work.

@tombroi
Copy link

tombroi commented Apr 21, 2021

2020/12/20

Under Big Sur, recommended brew packages doesn't solve the issue and Mac OS doesn't allow to downgrade xcode version by saying "Your Mac OS version is too new for this version.".

could you solve this issue @ulgens

@vschoener
Copy link

Any help on this issue? brew install autoconf automake pkg-config libtool these installations dont work.

This does not work for me :(

@hvarday-cisco
Copy link

hvarday-cisco commented Jul 14, 2021

Hi Folks!

I am facing the same issue. My GCC version is -

hvarday$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I have verified and the "--with-gxx-include-dir" path does not exist
Any help would be appreciated at this point

@NixBiks
Copy link

NixBiks commented Jan 24, 2022

was this never resolved?

@rhoitjadhav
Copy link

My issue was resolved by this

Python: 3.10
Macos: 13.4
librabbitmq: 2.0.0

It's 2020, and I had a similar issue as described above. Only the full commands that @Kronuz shared fixed it.

brew install autoconf automake pkg-config libtool
pip install librabbitmq

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