librabbitmq
librabbitmq copied to clipboard
Failed to install librabbitmq on MacOS High Sierra
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
Same here.
use py-amqp instead
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
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
same deal here, building on OSX High Sierra 10.13.6
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.
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
git clone https://github.com/celery/librabbitmq.git cd librabbitmq python setup.py install
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).
use sudo pip install
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?
@bjackson That one did it for me. I installed the beta tools and the library built OK.
I have the same problem, so, how do you resolve it ? My environment is : python3.6.3 pip18.1 macOS 10.13.2
@bjackson How do you mean? You used de Command tools?
@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/
@bjackson Thank you, I have resolve the problem by your way~~
I switched to Redis in the end. :(
@bjackson Doesn't work for me...
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
You also need libtool to build under macOS:
brew install autoconf
brew install automake
brew install pkg-config
brew install libtool
pip install librabbitmq
brew install libtool
like @Kronuz said is what fixed it for me!
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
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.
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.".
please use py-amqp as this library is not recommended anymore. py-amqp also has some cython bindings
@auvipy Not recommended by who?
@auvipy Not recommended by who?
by @celery/core-developers
@auvipy Thanks a lot. Is this mentioned in celery docs, how can i get detailed info on this?
No it is not. But we don't maintain it ourselves. We only accept patches for it.
Same issue on Big Sur.
brew install autoconf automake pkg-config libtool
does not solve the problem.