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

librabbitmq fails to install #22

Open
23doors opened this issue Jan 30, 2013 · 18 comments
Open

librabbitmq fails to install #22

23doors opened this issue Jan 30, 2013 · 18 comments

Comments

@23doors
Copy link

23doors commented Jan 30, 2013

ubuntu 12.04.1

Same results with easy install and pip. From source also fails. No meaningful info anywhere.

E.g. with pip and easy install:

Searching for librabbitmq
Reading http://pypi.python.org/simple/librabbitmq/
Reading http://github.com/celery/librabbitmq
Best match: librabbitmq 1.0.1
Downloading http://pypi.python.org/packages/source/l/librabbitmq/librabbitmq-1.0.1.tar.gz#md5=7350f2018d789116e861a9e1a83e2e86
Processing librabbitmq-1.0.1.tar.gz
Running librabbitmq-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-L0TLf1/librabbitmq-1.0.1/egg-dist-tmp-HE8dxR
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.o'
no previously-included directories found matching '*.la'
no previously-included directories found matching '*.so'
no previously-included directories found matching '*.dylib'
warning: install_lib: 'build/lib.linux-x86_64-2.7' does not exist -- no Python modules to install

Adding librabbitmq 1.0.1 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/librabbitmq-1.0.1-py2.7.egg
Processing dependencies for librabbitmq
Finished processing dependencies for librabbitmq

Looks fine. Except there was no compilation done. Python: import librabbitmq:
ImportError: No module named librabbitmq

Could it have anything to do with me using rabbitmq 3.0.1 (latest stable)?

@SandyWalsh
Copy link

Seeing the same problem on 12.04 & python 2.7, but debian squeeze with python 2.6 seems fine. The _librabbitmq.so isn't getting installed nor the librabbitmq directory in dist-packages.

@swat30
Copy link

swat30 commented Feb 11, 2013

I got this working last week. Trying to remember exactly how I did it, but it involved compiling from source and then pip installing.

@ask
Copy link
Contributor

ask commented Feb 12, 2013

It's hard for me to debug this since I'm not able to reproduce :(

@SandyWalsh:

Are you able to install from source?

$ wget http://pypi.python.org/packages/source/l/librabbitmq/librabbitmq-1.0.1.tar.gz
$ tar xvfz librabbitmq-1.0.1.tar.gz
$ cd librabbitmq-1.0.1
$ python setup.py install

If not, could you add some debugging print statements to the setup.py file?
Especially when it runs configure, and when it adds stuff to compile.

Also, are you sure you have the build-essentials and python headers installed? (gcc, python-dev, etc)?

@23doors, The version of rabbitmq-server should not matter, the py-librabbitmq distrobution
ships with its own copy of the rabbitmq-c client, it automatically calls configure and compiles it for you
(that's what it should do, but you can imagine that this is prone to errors)

@23doors
Copy link
Author

23doors commented Feb 20, 2013

Silly me. make wasn't installed. Feel free to close, although it should output some errors, not just silently fail. I guess others had more or less same situation.

@xando
Copy link

xando commented Mar 7, 2013

This issue still exists for me. I have make installed.

pip install works fine, but everything else not (source and easy_install)

@tesh11
Copy link

tesh11 commented Mar 18, 2013

I had the same problem where make wasn't installed. It just succeeded silently without it and once I installed make it worked just fine.

@xando
Copy link

xando commented Mar 19, 2013

@tesh11 what you mean by make installed, what is your os? Also (i have make installed)

/tmp > make
make: *** No targets specified and no makefile found.  Stop.

I'm on ubuntu 12.10 64

@ask
Copy link
Contributor

ask commented Mar 19, 2013

I just modified it so that it raises an exception if make is not available

@23doors
Copy link
Author

23doors commented Mar 19, 2013

Thanks, that solves this for me. Seems though like @xando is having a different issue.

@xando
Copy link

xando commented Mar 19, 2013

I think ticket is generic enough, I've downloaded latest master, this what I've got

$ wget https://github.com/celery/librabbitmq/archive/master.zip
$ unzip master.zip
$ python setup.py install


running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing librabbitmq.egg-info/PKG-INFO
writing top-level names to librabbitmq.egg-info/top_level.txt
writing dependency_links to librabbitmq.egg-info/dependency_links.txt
reading manifest file 'librabbitmq.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'tests'
warning: no files found matching '*' under directory 'clib'
warning: no files found matching '*' under directory 'rabbitmq-codegen'
no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.o'
no previously-included directories found matching '*.la'
no previously-included directories found matching '*.so'
no previously-included directories found matching '*.dylib'
writing manifest file 'librabbitmq.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building '_librabbitmq' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Iclib/librabbitmq -Iclib -Iclib/librabbitmq/unix -I/usr/include/python2.7 -c Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-2.7/Modules/_librabbitmq/connection.o
In file included from /usr/include/python2.7/Python.h:8:0,
                 from Modules/_librabbitmq/connection.h:4,
                 from Modules/_librabbitmq/connection.c:13:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
In file included from /usr/include/stdlib.h:25:0,
                 from Modules/_librabbitmq/connection.c:1:
/usr/include/features.h:215:0: note: this is the location of the previous definition
Modules/_librabbitmq/connection.c:700:26: warning: ‘PyDict_ToAMQTable’ is static but used in inline function ‘PyDict_to_basic_properties’ which is not static [enabled by default]
Modules/_librabbitmq/connection.c:480:17: warning: ‘AMQTable_toPyDict’ is static but used in inline function ‘basic_properties_to_PyDict’ which is not static [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Iclib/librabbitmq -Iclib -Iclib/librabbitmq/unix -I/usr/include/python2.7 -c clib/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-2.7/clib/librabbitmq/amqp_api.o
gcc: error: clib/librabbitmq/amqp_api.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command 'gcc' failed with exit status 4

@ask
Copy link
Contributor

ask commented Mar 19, 2013

@xando If you're going to install from source you have to execute make build in the librabbitmq source directory first to initialize git submodules and such

@xando
Copy link

xando commented Mar 19, 2013

@ask thanks, works that way. but still having easy_install issue #21

I'm using pip, (every day usage), but the project that I'm working on right now is using buildout and from reason wont install in that way. Using pip recipe also fails for this package.

@rmihael
Copy link
Contributor

rmihael commented Mar 14, 2014

I'm also having buildout issue with librabbitmq-1.0.3. Package installs itself properly via pip, but fails to do so via buildout. Here's the messages I'm getting:

Getting distribution for 'librabbitmq==1.0.3'.
warning: no files found matching '*' under directory 'tests'
no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.o'
no previously-included directories found matching '*.la'
no previously-included directories found matching '*.so'
no previously-included directories found matching '*.dylib'
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:262:1: warning: unused function 'amqp_encode_8' [-Wunused-function]
DECLARE_CODEC_BASE_TYPE(8, (uint8_t), (uint8_t))
^
clib/librabbitmq/amqp_private.h:195:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_encode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:175:1: note: expanded from here
amqp_encode_8
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:262:1: warning: unused function 'amqp_decode_8' [-Wunused-function]
clib/librabbitmq/amqp_private.h:209:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_decode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:179:1: note: expanded from here
amqp_decode_8
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:263:1: warning: unused function 'amqp_encode_16' [-Wunused-function]
DECLARE_CODEC_BASE_TYPE(16, htons, ntohs)
^
clib/librabbitmq/amqp_private.h:195:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_encode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:193:1: note: expanded from here
amqp_encode_16
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:263:1: warning: unused function 'amqp_decode_16' [-Wunused-function]
clib/librabbitmq/amqp_private.h:209:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_decode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:197:1: note: expanded from here
amqp_decode_16
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:264:1: warning: unused function 'amqp_encode_32' [-Wunused-function]
DECLARE_CODEC_BASE_TYPE(32, htonl, ntohl)
^
clib/librabbitmq/amqp_private.h:195:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_encode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:211:1: note: expanded from here
amqp_encode_32
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:264:1: warning: unused function 'amqp_decode_32' [-Wunused-function]
clib/librabbitmq/amqp_private.h:209:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_decode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:215:1: note: expanded from here
amqp_decode_32
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:265:1: warning: unused function 'amqp_encode_64' [-Wunused-function]
DECLARE_CODEC_BASE_TYPE(64, htonll, ntohll)
^
clib/librabbitmq/amqp_private.h:195:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_encode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:229:1: note: expanded from here
amqp_encode_64
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:265:1: warning: unused function 'amqp_decode_64' [-Wunused-function]
clib/librabbitmq/amqp_private.h:209:18: note: expanded from macro 'DECLARE_CODEC_BASE_TYPE'
_AMQP_INLINE int amqp_decode_##bits(amqp_bytes_t encoded, size_t *offset,   \
                 ^
<scratch space>:233:1: note: expanded from here
amqp_decode_64
^
In file included from clib/librabbitmq/amqp_api.c:37:
clib/librabbitmq/amqp_private.h:267:18: warning: unused function 'amqp_encode_bytes' [-Wunused-function]
_AMQP_INLINE int amqp_encode_bytes(amqp_bytes_t encoded, size_t *offset,
                 ^
clib/librabbitmq/amqp_private.h:280:18: warning: unused function 'amqp_decode_bytes' [-Wunused-function]
_AMQP_INLINE int amqp_decode_bytes(amqp_bytes_t encoded, size_t *offset,
                 ^
10 warnings generated.
clib/librabbitmq/amqp_mem.c:46:10: error: use of undeclared identifier 'VERSION'
  return VERSION; /* defined in config.h */
         ^
1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1
An error occurred when trying to install librabbitmq 1.0.3. Look above this message for any errors that were output by easy_install.
While:
  Installing common-eggs.
  Getting distribution for 'librabbitmq==1.0.3'.
Error: Couldn't install: librabbitmq 1.0.3

@patroqueeet
Copy link

Same occurs for me when using buildout on Ubuntu 12.40

@ask
Copy link
Contributor

ask commented Apr 15, 2014

The output should also include the line:

- configure rabbitmq-c

Do you not see that there? Does buildout not call setup.py build ?

@agriffis
Copy link
Contributor

agriffis commented Jul 1, 2015

This appears to be the same as #61

@iAnanich
Copy link

iAnanich commented Jan 3, 2020

2020 already, still an open issue?
make is installed, but have gcc related error

@mrudang-vora
Copy link

mrudang-vora commented Apr 26, 2020

Hello All,
Was trying to install librabbitmq using following steps:

wget https://files.pythonhosted.org/packages/f4/4e/8f8bf33d44f3441d6f6c29b299cc847570b2c864bd8d2f9871aa6c03b73e/librabbitmq-2.0.0.tar.gz
tar xvfz librabbitmq-2.0.0.tar.gz
cd librabbitmq-2.0.0
python setup.py build

Had similar issue while building the setup.py file

python setup.py build running build running build_py running build_ext building '_librabbitmq' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DHAVE_CONFIG_H -fPIC -Irabbitmq-c/librabbitmq -Irabbitmq-c -I/usr/include/python2.7 -c Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-2.7/Modules/_librabbitmq/connection.o In file included from Modules/_librabbitmq/connection.c:11:0: Modules/_librabbitmq/connection.h:5:10: fatal error: Python.h: No such file or directory #include <Python.h> ^~~~~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1

Resolved the same by installing python-devel package.
yum install python27-devel

Reference link: https://stackoverflow.com/questions/15631135/python-h-missing-from-ubuntu-12-04

Hope, it would help someone.

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