Error poll or select is needed to compile rabbitmq c

Hi. I'm getting this errors when I try to install librabbitmq on alpine linux #error "poll() or select() is needed to compile rabbitmq-c" error: 'AMQ_PLATFORM' undeclared (fir...

Hi.

I’m getting this errors when I try to install librabbitmq on alpine linux

#error "poll() or select() is needed to compile rabbitmq-c"
error: 'AMQ_PLATFORM' undeclared (first use in this function)

/app # apk add rabbitmq-c rabbitmq-c-dev
/app # pip install librabbitmq

Collecting librabbitmq
  Using cached https://files.pythonhosted.org/packages/f4/4e/8f8bf33d44f3441d6f6c29b299cc847570b2c864bd8d2f9871aa6c03b73e/librabbitmq-2.0.0.tar.gz
Requirement already satisfied: amqp>=1.4.6 in /usr/local/lib/python3.6/site-packages (from librabbitmq) (2.3.2)
Requirement already satisfied: six>=1.0.0 in /usr/local/lib/python3.6/site-packages (from librabbitmq) (1.12.0)
Requirement already satisfied: vine>=1.1.3 in /usr/local/lib/python3.6/site-packages (from amqp>=1.4.6->librabbitmq) (1.2.0)
Building wheels for collected packages: librabbitmq
  Running setup.py bdist_wheel for librabbitmq ... error
  Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0m1mvong/librabbitmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-4joizbus --pyth
on-tag cp36:
  running build
  - pull submodule rabbitmq-c...
  Cloning into 'rabbitmq-c'...
  Note: checking out 'caad0ef1533783729c7644a226c989c79b4c497b'.

  You are in 'detached HEAD' state. You can look around, make experimental
  changes and commit them, and you can discard any commits you make in this
  state without impacting any branches by performing another checkout.

  If you want to create a new branch to retain commits you create, you may
  do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b <new-branch-name>

  - autoreconf
  sh: autoreconf: not found
  - configure rabbitmq-c...
  /bin/sh: can't open 'configure': No such file or directory
  running bdist_wheel
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/funtests
  copying funtests/config.py -> build/lib.linux-x86_64-3.6/funtests
  copying funtests/disabled_basic_get_leak.py -> build/lib.linux-x86_64-3.6/funtests
  copying funtests/__init__.py -> build/lib.linux-x86_64-3.6/funtests
  copying funtests/setup.py -> build/lib.linux-x86_64-3.6/funtests
  creating build/lib.linux-x86_64-3.6/librabbitmq
  copying librabbitmq/__init__.py -> build/lib.linux-x86_64-3.6/librabbitmq
  creating build/lib.linux-x86_64-3.6/funtests/tests
  copying funtests/tests/test_channel_errors.py -> build/lib.linux-x86_64-3.6/funtests/tests
  copying funtests/tests/__init__.py -> build/lib.linux-x86_64-3.6/funtests/tests
  warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  building '_librabbitmq' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/tmp
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/Modules
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.o
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyDict_ToAMQTable':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
               if (clong_value == -1)
                               ^~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyIter_ToAMQArray':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:365:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
       while (item = PyIter_Next(iterator)) {
       ^~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: label 'error' defined but not used [-Wunused-label]
   error:
   ^~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_ConnectionType_init':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: return makes integer from pointer without a cast [-Wint-conversion]
           return PyErr_NoMemory();
                  ^~~~~~~~~~~~~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_close':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1117:22: warning: variable 'reply' set but not used [-Wunused-but-set-variable]
       amqp_rpc_reply_t reply;
                        ^~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_recv':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function 'amqp_simple_wait_frame_on_channel' [-Wimplicit-function-declaration]
               amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_cancel':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1949:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
       amqp_basic_cancel_ok_t *ok;
                               ^~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_flow':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:2074:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
       amqp_channel_flow_ok_t *ok;
                               ^~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_recover':
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:2107:30: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
       amqp_basic_recover_ok_t *ok;
                                ^~
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: At top level:
  /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:526:17: warning: 'AMQTable_toPyDict' is static but used in inline function 'basic_properties_to_PyDict' which is not static
           value = AMQTable_toPyDict(&(props->headers));
                   ^~~~~~~~~~~~~~~~~
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_consumer.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_framing.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_hostcheck.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_mem.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbitm
q/rabbitmq-c/librabbitmq/amqp_socket.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.o
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:355:3: error: #error "poll() or select() is needed to compile rabbitmq-c"
   # error "poll() or select() is needed to compile rabbitmq-c"
     ^~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_login_inner':
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: error: 'AMQ_PLATFORM' undeclared (first use in this function)
           amqp_table_construct_utf8_entry("platform", AMQ_PLATFORM);
                                                       ^~~~~~~~~~~~
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: note: each undeclared identifier is reported only once for each function it appears in
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
  /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for librabbitmq
  Running setup.py clean for librabbitmq
Failed to build librabbitmq
Installing collected packages: librabbitmq
  Running setup.py install for librabbitmq ... error
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0m1mvong/librabbitmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lmsof8k2/i
nstall-record.txt --single-version-externally-managed --compile:
    running build
    - autoreconf
    sh: autoreconf: not found
    - configure rabbitmq-c...
    /bin/sh: can't open 'configure': No such file or directory
    running install
    running install_lib
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/funtests
    copying funtests/config.py -> build/lib.linux-x86_64-3.6/funtests
    copying funtests/disabled_basic_get_leak.py -> build/lib.linux-x86_64-3.6/funtests
    copying funtests/__init__.py -> build/lib.linux-x86_64-3.6/funtests
    copying funtests/setup.py -> build/lib.linux-x86_64-3.6/funtests
    creating build/lib.linux-x86_64-3.6/librabbitmq
    copying librabbitmq/__init__.py -> build/lib.linux-x86_64-3.6/librabbitmq
    creating build/lib.linux-x86_64-3.6/funtests/tests
    copying funtests/tests/test_channel_errors.py -> build/lib.linux-x86_64-3.6/funtests/tests
    copying funtests/tests/__init__.py -> build/lib.linux-x86_64-3.6/funtests/tests
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building '_librabbitmq' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/tmp
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/Modules
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.o
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyDict_ToAMQTable':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (clong_value == -1)
                                 ^~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyIter_ToAMQArray':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:365:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
         while (item = PyIter_Next(iterator)) {
         ^~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: label 'error' defined but not used [-Wunused-label]
     error:
     ^~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_ConnectionType_init':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: return makes integer from pointer without a cast [-Wint-conversion]
             return PyErr_NoMemory();
                    ^~~~~~~~~~~~~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_close':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1117:22: warning: variable 'reply' set but not used [-Wunused-but-set-variable]
         amqp_rpc_reply_t reply;
                          ^~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_recv':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function 'amqp_simple_wait_frame_on_channel' [-Wimplicit-function-declaration]
                 amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_cancel':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:1949:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
         amqp_basic_cancel_ok_t *ok;
                                 ^~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_flow':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:2074:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
         amqp_channel_flow_ok_t *ok;
                                 ^~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_recover':
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:2107:30: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
         amqp_basic_recover_ok_t *ok;
                                  ^~
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c: At top level:
    /tmp/pip-install-0m1mvong/librabbitmq/Modules/_librabbitmq/connection.c:526:17: warning: 'AMQTable_toPyDict' is static but used in inline function 'basic_properties_to_PyDict' which is not static
             value = AMQTable_toPyDict(&(props->headers));
                     ^~~~~~~~~~~~~~~~~
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_consumer.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_framing.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_hostcheck.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_mem.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-0m1mvong/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_socket.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.o
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:355:3: error: #error "poll() or select() is needed to compile rabbitmq-c"
     # error "poll() or select() is needed to compile rabbitmq-c"
       ^~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_login_inner':
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: error: 'AMQ_PLATFORM' undeclared (first use in this function)
             amqp_table_construct_utf8_entry("platform", AMQ_PLATFORM);
                                                         ^~~~~~~~~~~~
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: note: each undeclared identifier is reported only once for each function it appears in
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
    /tmp/pip-install-0m1mvong/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0m1mvong/librabbitmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lmsof8k2/install-record.txt --sing
le-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-0m1mvong/librabbitmq/
You are using pip version 18.1, however version 19.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
/app # python -m pip install pip
Requirement already satisfied: pip in /usr/local/lib/python3.6/site-packages (18.1)
You are using pip version 18.1, however version 19.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
/app # python -m pip install pip -U
Collecting pip
  Using cached https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-19.0.1
/app # pip install librabbitmq
Collecting librabbitmq
  Using cached https://files.pythonhosted.org/packages/f4/4e/8f8bf33d44f3441d6f6c29b299cc847570b2c864bd8d2f9871aa6c03b73e/librabbitmq-2.0.0.tar.gz
Requirement already satisfied: amqp>=1.4.6 in /usr/local/lib/python3.6/site-packages (from librabbitmq) (2.3.2)
Requirement already satisfied: six>=1.0.0 in /usr/local/lib/python3.6/site-packages (from librabbitmq) (1.12.0)
Requirement already satisfied: vine>=1.1.3 in /usr/local/lib/python3.6/site-packages (from amqp>=1.4.6->librabbitmq) (1.2.0)
Building wheels for collected packages: librabbitmq
  Building wheel for librabbitmq (setup.py) ... error
  Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8adeg4d4/librabbitmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-4nxckg6h --pyth
on-tag cp36:
  running build
  - pull submodule rabbitmq-c...
  Cloning into 'rabbitmq-c'...
  Note: checking out 'caad0ef1533783729c7644a226c989c79b4c497b'.

  You are in 'detached HEAD' state. You can look around, make experimental
  changes and commit them, and you can discard any commits you make in this
  state without impacting any branches by performing another checkout.

  If you want to create a new branch to retain commits you create, you may
  do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b <new-branch-name>

  - autoreconf
  sh: autoreconf: not found
  - configure rabbitmq-c...
  /bin/sh: can't open 'configure': No such file or directory
  running bdist_wheel
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/funtests
  copying funtests/config.py -> build/lib.linux-x86_64-3.6/funtests
  copying funtests/disabled_basic_get_leak.py -> build/lib.linux-x86_64-3.6/funtests
  copying funtests/__init__.py -> build/lib.linux-x86_64-3.6/funtests
  copying funtests/setup.py -> build/lib.linux-x86_64-3.6/funtests
  creating build/lib.linux-x86_64-3.6/librabbitmq
  copying librabbitmq/__init__.py -> build/lib.linux-x86_64-3.6/librabbitmq
  creating build/lib.linux-x86_64-3.6/funtests/tests
  copying funtests/tests/test_channel_errors.py -> build/lib.linux-x86_64-3.6/funtests/tests
  copying funtests/tests/__init__.py -> build/lib.linux-x86_64-3.6/funtests/tests
  warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  building '_librabbitmq' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/tmp
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/Modules
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c
  creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.o
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyDict_ToAMQTable':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
               if (clong_value == -1)
                               ^~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyIter_ToAMQArray':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:365:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
       while (item = PyIter_Next(iterator)) {
       ^~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: label 'error' defined but not used [-Wunused-label]
   error:
   ^~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_ConnectionType_init':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: return makes integer from pointer without a cast [-Wint-conversion]
           return PyErr_NoMemory();
                  ^~~~~~~~~~~~~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_close':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1117:22: warning: variable 'reply' set but not used [-Wunused-but-set-variable]
       amqp_rpc_reply_t reply;
                        ^~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_recv':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function 'amqp_simple_wait_frame_on_channel' [-Wimplicit-function-declaration]
               amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_cancel':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1949:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
       amqp_basic_cancel_ok_t *ok;
                               ^~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_flow':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:2074:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
       amqp_channel_flow_ok_t *ok;
                               ^~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_recover':
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:2107:30: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
       amqp_basic_recover_ok_t *ok;
                                ^~
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: At top level:
  /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:526:17: warning: 'AMQTable_toPyDict' is static but used in inline function 'basic_properties_to_PyDict' which is not static
           value = AMQTable_toPyDict(&(props->headers));
                   ^~~~~~~~~~~~~~~~~
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_consumer.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_framing.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_hostcheck.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_mem.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.o
  gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbitm
q/rabbitmq-c/librabbitmq/amqp_socket.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.o
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:355:3: error: #error "poll() or select() is needed to compile rabbitmq-c"
   # error "poll() or select() is needed to compile rabbitmq-c"
     ^~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_login_inner':
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: error: 'AMQ_PLATFORM' undeclared (first use in this function)
           amqp_table_construct_utf8_entry("platform", AMQ_PLATFORM);
                                                       ^~~~~~~~~~~~
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: note: each undeclared identifier is reported only once for each function it appears in
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
  /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for librabbitmq
  Running setup.py clean for librabbitmq
Failed to build librabbitmq
Installing collected packages: librabbitmq
  Running setup.py install for librabbitmq ... error
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8adeg4d4/librabbitmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-22jnult7/i
nstall-record.txt --single-version-externally-managed --compile:
    running build
    - autoreconf
    sh: autoreconf: not found
    - configure rabbitmq-c...
    /bin/sh: can't open 'configure': No such file or directory
    running install
    running install_lib
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/funtests
    copying funtests/config.py -> build/lib.linux-x86_64-3.6/funtests
    copying funtests/disabled_basic_get_leak.py -> build/lib.linux-x86_64-3.6/funtests
    copying funtests/__init__.py -> build/lib.linux-x86_64-3.6/funtests
    copying funtests/setup.py -> build/lib.linux-x86_64-3.6/funtests
    creating build/lib.linux-x86_64-3.6/librabbitmq
    copying librabbitmq/__init__.py -> build/lib.linux-x86_64-3.6/librabbitmq
    creating build/lib.linux-x86_64-3.6/funtests/tests
    copying funtests/tests/test_channel_errors.py -> build/lib.linux-x86_64-3.6/funtests/tests
    copying funtests/tests/__init__.py -> build/lib.linux-x86_64-3.6/funtests/tests
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building '_librabbitmq' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/tmp
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/Modules
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c
    creating build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.o
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyDict_ToAMQTable':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (clong_value == -1)
                                 ^~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyIter_ToAMQArray':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:365:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
         while (item = PyIter_Next(iterator)) {
         ^~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: label 'error' defined but not used [-Wunused-label]
     error:
     ^~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_ConnectionType_init':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: return makes integer from pointer without a cast [-Wint-conversion]
             return PyErr_NoMemory();
                    ^~~~~~~~~~~~~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_close':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1117:22: warning: variable 'reply' set but not used [-Wunused-but-set-variable]
         amqp_rpc_reply_t reply;
                          ^~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_recv':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function 'amqp_simple_wait_frame_on_channel' [-Wimplicit-function-declaration]
                 amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_cancel':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:1949:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
         amqp_basic_cancel_ok_t *ok;
                                 ^~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_flow':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:2074:29: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
         amqp_channel_flow_ok_t *ok;
                                 ^~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: In function 'PyRabbitMQ_Connection_basic_recover':
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:2107:30: warning: variable 'ok' set but not used [-Wunused-but-set-variable]
         amqp_basic_recover_ok_t *ok;
                                  ^~
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c: At top level:
    /tmp/pip-install-8adeg4d4/librabbitmq/Modules/_librabbitmq/connection.c:526:17: warning: 'AMQTable_toPyDict' is static but used in inline function 'basic_properties_to_PyDict' which is not static
             value = AMQTable_toPyDict(&(props->headers));
                     ^~~~~~~~~~~~~~~~~
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_connection.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_consumer.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_framing.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_hostcheck.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_mem.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.o
    gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c -I/usr/local/include/python3.6m -c /tmp/pip-install-8adeg4d4/librabbi
tmq/rabbitmq-c/librabbitmq/amqp_socket.c -o build/temp.linux-x86_64-3.6/tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.o
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:355:3: error: #error "poll() or select() is needed to compile rabbitmq-c"
     # error "poll() or select() is needed to compile rabbitmq-c"
       ^~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_login_inner':
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: error: 'AMQ_PLATFORM' undeclared (first use in this function)
             amqp_table_construct_utf8_entry("platform", AMQ_PLATFORM);
                                                         ^~~~~~~~~~~~
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: note: each undeclared identifier is reported only once for each function it appears in
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function 'amqp_poll':
    /tmp/pip-install-8adeg4d4/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8adeg4d4/librabbitmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-22jnult7/install-record.txt --sing
le-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-8adeg4d4/librabbitmq/

When make can be found in the path, librabbitmq fails to install in python3.7 variant on debian buster. It tries to recompile librabbitmq-c and fails. When make is not found in path, it installs correctly from wheels.

Environment:

Docker image python:3.7-slim-buster

This works fine:

3z [jarek:~] [airflow-3.6] 127 % docker run --entrypoint bash -it python:3.7-slim-buster
root@42dab7abf345:/# pip install librabbitmq
Collecting librabbitmq
  Downloading librabbitmq-2.0.0.tar.gz (42 kB)
     |████████████████████████████████| 42 kB 667 kB/s 
Collecting amqp>=1.4.6
  Downloading amqp-2.5.2-py2.py3-none-any.whl (49 kB)
     |████████████████████████████████| 49 kB 4.0 MB/s 
Collecting six>=1.0.0
  Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting vine<5.0.0a1,>=1.1.3
  Downloading vine-1.3.0-py2.py3-none-any.whl (14 kB)
Building wheels for collected packages: librabbitmq
  Building wheel for librabbitmq (setup.py) ... done
  Created wheel for librabbitmq: filename=librabbitmq-2.0.0-py3-none-any.whl size=18193 sha256=3aec6d28544fc550402562f48a4beb1905354754f16883c33ff60fdd515319a9
  Stored in directory: /root/.cache/pip/wheels/da/77/bf/93ad3b74b6801c51fcd184fe6b330e842b7c73810140463c04
Successfully built librabbitmq
Installing collected packages: vine, amqp, six, librabbitmq
Successfully installed amqp-2.5.2 librabbitmq-2.0.0 six-1.14.0 vine-1.3.0
root@42dab7abf345:/# 

This doesn’t:

3z [jarek:~] [airflow-3.6] 48s 1 % docker run --entrypoint bash -it python:3.7-slim-buster
root@a8edcaf9a7eb:/# apt update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]                               
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]                      
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [197 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7905 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Fetched 8345 kB in 2s (4329 kB/s)                        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@a8edcaf9a7eb:/# apt install build-essential git

..... lots of output .....


root@a8edcaf9a7eb:/# pip install librabbitmq
Collecting librabbitmq
  Downloading librabbitmq-2.0.0.tar.gz (42 kB)
     |████████████████████████████████| 42 kB 768 kB/s 
Collecting amqp>=1.4.6
  Downloading amqp-2.5.2-py2.py3-none-any.whl (49 kB)
     |████████████████████████████████| 49 kB 3.6 MB/s 
Collecting six>=1.0.0
  Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting vine<5.0.0a1,>=1.1.3
  Downloading vine-1.3.0-py2.py3-none-any.whl (14 kB)
Building wheels for collected packages: librabbitmq
  Building wheel for librabbitmq (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-511qt4su/librabbitmq/setup.py'"'"'; __file__='"'"'/tmp/pip-install-511qt4su/librabbitmq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-utcex30b
       cwd: /tmp/pip-install-511qt4su/librabbitmq/
  Complete output (109 lines):
  /tmp/pip-install-511qt4su/librabbitmq/setup.py:167: DeprecationWarning: 'U' mode is deprecated
    long_description = open(os.path.join(BASE_PATH, 'README.rst'), 'U').read()
  running build
  - pull submodule rabbitmq-c...
  Cloning into 'rabbitmq-c'...
  Note: checking out 'caad0ef1533783729c7644a226c989c79b4c497b'.
  
  You are in 'detached HEAD' state. You can look around, make experimental
  changes and commit them, and you can discard any commits you make in this
  state without impacting any branches by performing another checkout.
  
  If you want to create a new branch to retain commits you create, you may
  do so (now or later) by using -b with the checkout command again. Example:
  
    git checkout -b <new-branch-name>
  
  - autoreconf
  sh: 1: autoreconf: not found
  - configure rabbitmq-c...
  /bin/sh: 0: Can't open configure
  running bdist_wheel
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/librabbitmq
  copying librabbitmq/__init__.py -> build/lib.linux-x86_64-3.7/librabbitmq
  creating build/lib.linux-x86_64-3.7/funtests
  copying funtests/disabled_basic_get_leak.py -> build/lib.linux-x86_64-3.7/funtests
  copying funtests/__init__.py -> build/lib.linux-x86_64-3.7/funtests
  copying funtests/config.py -> build/lib.linux-x86_64-3.7/funtests
  copying funtests/setup.py -> build/lib.linux-x86_64-3.7/funtests
  creating build/lib.linux-x86_64-3.7/funtests/tests
  copying funtests/tests/test_channel_errors.py -> build/lib.linux-x86_64-3.7/funtests/tests
  copying funtests/tests/__init__.py -> build/lib.linux-x86_64-3.7/funtests/tests
  running build_ext
  building '_librabbitmq' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/tmp
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/Modules
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.o
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyDict_ToAMQTable’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison of integer expressions of different signedness: ‘uint64_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
               if (clong_value == -1)
                               ^~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyIter_ToAMQArray’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:365:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
       while (item = PyIter_Next(iterator)) {
              ^~~~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: label ‘error’ defined but not used [-Wunused-label]
   error:
   ^~~~~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_ConnectionType_init’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: returning ‘PyObject *’ {aka ‘struct _object *’} from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]
           return PyErr_NoMemory();
                  ^~~~~~~~~~~~~~~~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_close’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1117:22: warning: variable ‘reply’ set but not used [-Wunused-but-set-variable]
       amqp_rpc_reply_t reply;
                        ^~~~~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_recv’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function ‘amqp_simple_wait_frame_on_channel’; did you mean ‘amqp_simple_wait_frame_noblock’? [-Wimplicit-function-declaration]
               amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               amqp_simple_wait_frame_noblock
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_basic_cancel’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1949:29: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
       amqp_basic_cancel_ok_t *ok;
                               ^~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_flow’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:2074:29: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
       amqp_channel_flow_ok_t *ok;
                               ^~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_basic_recover’:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:2107:30: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
       amqp_basic_recover_ok_t *ok;
                                ^~
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: At top level:
  /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:526:17: warning: ‘AMQTable_toPyDict’ is static but used in inline function ‘basic_properties_to_PyDict’ which is not static
           value = AMQTable_toPyDict(&(props->headers));
                   ^~~~~~~~~~~~~~~~~
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.o
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.o
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function ‘amqp_poll’:
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:355:3: error: #error "poll() or select() is needed to compile rabbitmq-c"
   # error "poll() or select() is needed to compile rabbitmq-c"
     ^~~~~
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function ‘amqp_login_inner’:
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: error: ‘AMQ_PLATFORM’ undeclared (first use in this function)
           amqp_table_construct_utf8_entry("platform", AMQ_PLATFORM);
                                                       ^~~~~~~~~~~~
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: note: each undeclared identifier is reported only once for each function it appears in
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function ‘amqp_poll’:
  /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for librabbitmq
  Running setup.py clean for librabbitmq
Failed to build librabbitmq
Installing collected packages: vine, amqp, six, librabbitmq
    Running setup.py install for librabbitmq ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-511qt4su/librabbitmq/setup.py'"'"'; __file__='"'"'/tmp/pip-install-511qt4su/librabbitmq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lsqagyp_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/librabbitmq
         cwd: /tmp/pip-install-511qt4su/librabbitmq/
    Complete output (94 lines):
    /tmp/pip-install-511qt4su/librabbitmq/setup.py:167: DeprecationWarning: 'U' mode is deprecated
      long_description = open(os.path.join(BASE_PATH, 'README.rst'), 'U').read()
    running build
    - autoreconf
    sh: 1: autoreconf: not found
    - configure rabbitmq-c...
    /bin/sh: 0: Can't open configure
    running install
    running install_lib
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/librabbitmq
    copying librabbitmq/__init__.py -> build/lib.linux-x86_64-3.7/librabbitmq
    creating build/lib.linux-x86_64-3.7/funtests
    copying funtests/disabled_basic_get_leak.py -> build/lib.linux-x86_64-3.7/funtests
    copying funtests/__init__.py -> build/lib.linux-x86_64-3.7/funtests
    copying funtests/config.py -> build/lib.linux-x86_64-3.7/funtests
    copying funtests/setup.py -> build/lib.linux-x86_64-3.7/funtests
    creating build/lib.linux-x86_64-3.7/funtests/tests
    copying funtests/tests/test_channel_errors.py -> build/lib.linux-x86_64-3.7/funtests/tests
    copying funtests/tests/__init__.py -> build/lib.linux-x86_64-3.7/funtests/tests
    running build_ext
    building '_librabbitmq' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/tmp
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/Modules
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.o
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyDict_ToAMQTable’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:299:29: warning: comparison of integer expressions of different signedness: ‘uint64_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
                 if (clong_value == -1)
                                 ^~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyIter_ToAMQArray’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:365:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
         while (item = PyIter_Next(iterator)) {
                ^~~~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:410:1: warning: label ‘error’ defined but not used [-Wunused-label]
     error:
     ^~~~~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_ConnectionType_init’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1003:16: warning: returning ‘PyObject *’ {aka ‘struct _object *’} from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]
             return PyErr_NoMemory();
                    ^~~~~~~~~~~~~~~~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_close’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1117:22: warning: variable ‘reply’ set but not used [-Wunused-but-set-variable]
         amqp_rpc_reply_t reply;
                          ^~~~~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_recv’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1359:13: warning: implicit declaration of function ‘amqp_simple_wait_frame_on_channel’; did you mean ‘amqp_simple_wait_frame_noblock’? [-Wimplicit-function-declaration]
                 amqp_simple_wait_frame_on_channel(conn, cur_channel, &frame);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 amqp_simple_wait_frame_noblock
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_basic_cancel’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:1949:29: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
         amqp_basic_cancel_ok_t *ok;
                                 ^~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_flow’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:2074:29: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
         amqp_channel_flow_ok_t *ok;
                                 ^~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: In function ‘PyRabbitMQ_Connection_basic_recover’:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:2107:30: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]
         amqp_basic_recover_ok_t *ok;
                                  ^~
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c: At top level:
    /tmp/pip-install-511qt4su/librabbitmq/Modules/_librabbitmq/connection.c:526:17: warning: ‘AMQTable_toPyDict’ is static but used in inline function ‘basic_properties_to_PyDict’ which is not static
             value = AMQTable_toPyDict(&(props->headers));
                     ^~~~~~~~~~~~~~~~~
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_api.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_connection.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_consumer.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_framing.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_hostcheck.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_mem.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq -I/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c -I/usr/local/include/python3.7m -c /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c -o build/temp.linux-x86_64-3.7/tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.o
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function ‘amqp_poll’:
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:355:3: error: #error "poll() or select() is needed to compile rabbitmq-c"
     # error "poll() or select() is needed to compile rabbitmq-c"
       ^~~~~
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function ‘amqp_login_inner’:
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: error: ‘AMQ_PLATFORM’ undeclared (first use in this function)
             amqp_table_construct_utf8_entry("platform", AMQ_PLATFORM);
                                                         ^~~~~~~~~~~~
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:1334:53: note: each undeclared identifier is reported only once for each function it appears in
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c: In function ‘amqp_poll’:
    /tmp/pip-install-511qt4su/librabbitmq/rabbitmq-c/librabbitmq/amqp_socket.c:357:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-511qt4su/librabbitmq/setup.py'"'"'; __file__='"'"'/tmp/pip-install-511qt4su/librabbitmq/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lsqagyp_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/librabbitmq Check the logs for full command output.
root@a8edcaf9a7eb:/# 

I found that I can still correctly install librabbitmq by renaming /usr/bin/make temporarily

Note that in python:3.6-slim-buster image the same sequence of commands leads to successfully installing librabbitmq from wheels without recompiling it.

root@488db7602d26:/# pip install librabbitmq
Collecting librabbitmq
  Downloading librabbitmq-2.0.0-cp36-cp36m-manylinux1_x86_64.whl (218 kB)
     |████████████████████████████████| 218 kB 1.2 MB/s 
Collecting six>=1.0.0
  Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting amqp>=1.4.6
  Downloading amqp-2.5.2-py2.py3-none-any.whl (49 kB)
     |████████████████████████████████| 49 kB 6.6 MB/s 
Collecting vine<5.0.0a1,>=1.1.3
  Downloading vine-1.3.0-py2.py3-none-any.whl (14 kB)
Installing collected packages: six, vine, amqp, librabbitmq
Successfully installed amqp-2.5.2 librabbitmq-2.0.0 six-1.14.0 vine-1.3.0
root@488db7602d26:/# 

I presume the problem is that there are no pre-compiled py37 and above wheels for librabbitmq and then it tries to compile it on its own.

Устанавливаю из пакета с сайта Кролика (так же пробовал устанавливать через репозиторий):

root@wine:/var/www# dpkg -i rabbitmq-server_3.6.12-1_all.deb
(Чтение базы данных … на данный момент установлено 63899 файлов и каталогов.)
Подготовка к распаковке rabbitmq-server_3.6.12-1_all.deb …
Распаковывается rabbitmq-server (3.6.12-1) на замену (3.6.12-1) …
Настраивается пакет rabbitmq-server (3.6.12-1) …
Job for rabbitmq-server.service failed. See ‘systemctl status rabbitmq-server.service’ and ‘journalctl -xn’ for details.
invoke-rc.d: initscript rabbitmq-server, action «start» failed.
dpkg: ошибка при обработке пакета rabbitmq-server (—install):
подпроцесс установлен сценарий post-installation возвратил код ошибки 1
Обрабатываются триггеры для man-db (2.7.0.2-5) …
Обрабатываются триггеры для systemd (215-17+deb8u7) …
При обработке следующих пакетов произошли ошибки:
rabbitmq-server

Пробую самостоятельно запустить, результат тот же.
root@wine:/var/www# service rabbitmq-server start
Job for rabbitmq-server.service failed. See ‘systemctl status rabbitmq-server.service’ and ‘journalctl -xn’ for details.

Выполняю рекомендуемую команду
root@wine:/var/www# systemctl status rabbitmq-server.service
● rabbitmq-server.service — RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled)
Active: failed (Result: exit-code) since Пн 2017-10-16 18:11:56 MSK; 4s ago
Process: 20386 ExecStop=/bin/sh -c while ps -p $MAINPID >/dev/null 2>&1; do sleep 1; done (code=exited, status=0/SUCCESS)
Process: 20272 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
Process: 20171 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 20171 (code=exited, status=1/FAILURE)

окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: ===========
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: attempted to contact: [rabbit@wine]
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: rabbit@wine:
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: * unable to connect to epmd (port 4369) on wine: address (cannot connect to host/port)
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: current node details:
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: — node name: ‘rabbitmq-cli-18@wine’
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: — home dir: /var/lib/rabbitmq
окт 16 18:11:56 wine.storemaker.ru rabbitmqctl[20272]: — cookie hash: ZlPlWL9gVfkCatgjem2lPQ==
окт 16 18:11:56 wine.storemaker.ru systemd[1]: Failed to start RabbitMQ broker.
окт 16 18:11:56 wine.storemaker.ru systemd[1]: Unit rabbitmq-server.service entered failed state.

netstat -npl:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 998/exim4
tcp 0 0 0.0.0.0:58721 0.0.0.0:* LISTEN 385/rpc.statd
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 421/memcached
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 370/rpcbind
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 18977/epmd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 422/sshd
tcp6 0 0 ::1:25 :::* LISTEN 998/exim4
tcp6 0 0 :::41498 :::* LISTEN 385/rpc.statd
tcp6 0 0 :::443 :::* LISTEN 582/apache2
tcp6 0 0 :::3306 :::* LISTEN 555/mysqld
tcp6 0 0 :::111 :::* LISTEN 370/rpcbind
tcp6 0 0 :::80 :::* LISTEN 582/apache2
tcp6 0 0 :::21 :::* LISTEN 689/proftpd: (accep
tcp6 0 0 :::22 :::* LISTEN 422/sshd
udp 0 0 0.0.0.0:39614 0.0.0.0:* 385/rpc.statd
udp 0 0 0.0.0.0:966 0.0.0.0:* 370/rpcbind
udp 0 0 127.0.0.1:11211 0.0.0.0:* 421/memcached
udp 0 0 127.0.0.1:985 0.0.0.0:* 385/rpc.statd
udp 0 0 0.0.0.0:111 0.0.0.0:* 370/rpcbind
udp 0 0 185.58.207.217:123 0.0.0.0:* 505/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 505/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 505/ntpd
udp6 0 0 :::35558 :::* 385/rpc.statd
udp6 0 0 :::966 :::* 370/rpcbind
udp6 0 0 :::111 :::* 370/rpcbind
udp6 0 0 fe80::5054:ff:fefc::123 :::* 505/ntpd
udp6 0 0 ::1:123 :::* 505/ntpd
udp6 0 0 :::123 :::* 505/ntpd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] SEQPACKET LISTENING 8267 1/systemd /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 8270 1/systemd /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 43930 16924/systemd /run/user/0/systemd/private
unix 2 [ ACC ] STREAM LISTENING 11164 555/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 10681 1/systemd /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 10684 1/systemd /run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 29373 1/systemd /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 9170 370/rpcbind /run/rpcbind.sock

Epmd запущен на нужном порту, пробовал так же задавать другой порт. Запускал и как сервис и как deamon — результат одинаковый.

В /var/log/syslog есть такая запись
Oct 16 17:10:20 wine systemd[1]: Failed to start RabbitMQ broker.
Oct 16 17:10:20 wine systemd[1]: Unit rabbitmq-server.service entered failed state.
Oct 16 17:13:53 wine systemd[1]: Cannot add dependency job for unit epmd@0.0.0.0.socket, ignoring: Unit epmd@0.0.0.0.socket failed to load: No such file or directory.
Oct 16 17:13:54 wine rabbitmq-server[3918]: ERROR: epmd error for host wine: address (cannot connect to host/port)
Oct 16 17:13:54 wine systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
Oct 16 17:13:55 wine rabbitmqctl[4016]: Stopping and halting node rabbit@wine
Oct 16 17:13:55 wine rabbitmqctl[4016]: Error: unable to connect to node rabbit@wine: nodedown
Oct 16 17:13:55 wine rabbitmqctl[4016]: DIAGNOSTICS
Oct 16 17:13:55 wine rabbitmqctl[4016]: ===========
Oct 16 17:13:55 wine rabbitmqctl[4016]: attempted to contact: [rabbit@wine]
Oct 16 17:13:55 wine rabbitmqctl[4016]: rabbit@wine:
Oct 16 17:13:55 wine rabbitmqctl[4016]: * unable to connect to epmd (port 4369) on wine: address (cannot connect to host/port)
Oct 16 17:13:55 wine rabbitmqctl[4016]: current node details:
Oct 16 17:13:55 wine rabbitmqctl[4016]: — node name: ‘rabbitmq-cli-29@wine’
Oct 16 17:13:55 wine rabbitmqctl[4016]: — home dir: /var/lib/rabbitmq
Oct 16 17:13:55 wine rabbitmqctl[4016]: — cookie hash: ZlPlWL9gVfkCatgjem2lPQ==
Интересует так же выделенная строчка, может в этом проблема? но куда он обращается, какой файл или папке не видит? какие права должны быть и что за файл?

Overview

This guide covers RabbitMQ .NET/C# client and its public API.
It assumes that the most recent major version of the client is used
and the reader is familiar with the basics.

Key sections of the guide are:

  • Dependencies
  • Important interfaces and classes in the public API
  • Connecting to RabbitMQ
  • Connection and Channel Lifespan
  • Client-provided connection name
  • Using Exchanges and Queues
  • Publishing Messages
  • Consuming Using a Subscription and Consumer Memory Safety
  • Async Consumer Implementations
  • Concurrency Considerations and Safety
  • Automatic Recovery From Network Failures

An API reference is available separately.

.NET Version Requirements

6.x release series of this library require .NET 4.6.1+ or a .NET Standard 2.0+ implementation.
For 5.x releases, the requirements are .NET 4.5.1+ or a .NET Standard 1.5+ implementation.

License

The library is open source, developed on GitHub, and is double-licensed under the

  • Apache Public License 2.0
  • Mozilla Public License 2.0

This means that the user can consider the library to be licensed under any of the licenses from the list above.
For example, the user may choose the Apache Public License 2.0 and include this client into
a commercial product.

Dependencies

The client has a couple of dependencies:

  • System.Memory 4.5.x
  • System.Threading.Channels 4.7.x

Applications that use different versions of the same dependencies
should use assembly version redirection,
automatic or
explicit.

Major namespaces, interfaces and classes

The client API is closely modelled on the AMQP 0-9-1 protocol model,
with additional abstractions for ease of use.

An API reference is available separately.

The core API interfaces and classes are defined in the RabbitMQ.Client namespace:

using RabbitMQ.Client;

The core API interfaces and classes are

  • IModel: represents an AMQP 0-9-1 channel, and provides most of the operations (protocol methods)
  • IConnection: represents an AMQP 0-9-1 connection
  • ConnectionFactory: constructs IConnection instances
  • IBasicConsumer: represents a message consumer

Other useful interfaces and classes include:

  • DefaultBasicConsumer: commonly used base class for consumers

Public namespaces other than RabbitMQ.Client include:

  • RabbitMQ.Client.Events: various events and event handlers
    that are part of the client library, including EventingBasicConsumer,
    a consumer implementation built around C# event handlers.
  • RabbitMQ.Client.Exceptions: exceptions visible to the user.

All other namespaces are reserved for private implementation detail of
the library, although members of private namespaces are usually made
available to applications using the library in order to permit
developers to implement workarounds for faults and gaps they
discover in the library implementation. Applications cannot rely on
any classes, interfaces, member variables etc. that appear within
private namespaces remaining stable across releases of the library.

Connecting to RabbitMQ

Before an application can use RabbitMQ, it has to open a connection
to a RabbitMQ node. The connection then will be used to perform all subsequent
operations. Connections are meant to be long-lived. Opening a connection
for every operation (e.g. publishing a message) would be very inefficient and is
highly discouraged.

To open a connection with the .NET client, first instantiate a ConnectionFactory
and configure it to use desired hostname, virtual host, credentials, TLS settings,
and any other parameters as needed.

Then call the ConnectionFactory.CreateConnection() method to open a connection.
Successful and unsuccessful client connection events can be observed in server logs.

The following two code snippets connect to a RabbitMQ node using a hostname configured
using the hostName property:

ConnectionFactory factory = new ConnectionFactory();
// "guest"/"guest" by default, limited to localhost connections
factory.UserName = user;
factory.Password = pass;
factory.VirtualHost = vhost;
factory.HostName = hostName;

IConnection conn = factory.CreateConnection();
ConnectionFactory factory = new ConnectionFactory();
factory.Uri = new Uri("amqp://user:pass@hostName:port/vhost");

IConnection conn = factory.CreateConnection();

Using Lists of Endpoints

It is possible to specify a list of endpoints to use when connecting. The first
reachable endpoint will be used. In case of connection failures, using
a list of endpoints makes it possible for the application to connect to a different
node if the original one is down.

To use multiple endpoints, provide a list of AmqpTcpEndpoints to ConnectionFactory#CreateConnection.
An AmqpTcpEndpoint represents a hostname and port pair.

ConnectionFactory factory = new ConnectionFactory();
factory.UserName = "username";
factory.Password = "s3Kre7";

var endpoints = new System.Collections.Generic.List<AmqpTcpEndpoint> {
  new AmqpTcpEndpoint("hostname"),
  new AmqpTcpEndpoint("localhost")
};
IConnection conn = factory.CreateConnection(endpoints);

Since the .NET client uses a stricter interpretation of the AMQP 0-9-1 URI spec
than the other clients, care must be taken when using URIs.
In particular, the host part must not be omitted and virtual hosts with
empty names are not addressable.

All factory properties have default values. The default value for a property will be used if the property
remains unassigned prior to creating a connection:

Property Default Value
Username «guest»
Password «guest»
Virtual host «/»
Hostname «localhost»
Port 5672 for regular («plain TCP») connections,
5671 for connections with TLS enabled

Note that user guest can only connect from localhost by default.
This is to limit well-known credential use in production systems.

The IConnection interface can then be used to open a channel:

IModel channel = conn.CreateModel();

The channel can now be used to send and receive messages,
as described in subsequent sections.

Just like connections, channels are meant to be long-lived. Opening a new channel
for every operation would be highly inefficient and is highly discouraged. Channels,
however, can have a shorter life span than connections. For example, certain
protocol errors will automatically close channels. If applications can recover
from them, they can open a new channel and retry the operation.

This is covered in more detail in the Channel guide as well as other
guides such as Consumer Acknowledgements.

Disconnecting from RabbitMQ

To disconnect, simply close the channel and the connection:

channel.Close();
conn.Close();

Disposing channel and connection objects is not enough, they must be explicitly closed
with the API methods from the example above.

Note that closing the channel may be considered good practice, but isn’t strictly necessary here — it will be done
automatically anyway when the underlying connection is closed.

Client disconnection events can be observed in server node logs.

Connection and Channel Lifespan

Connections are meant to be long-lived. The underlying protocol is designed and optimized for
long running connections. That means that opening a new connection per operation,
e.g. a message published, is unnecessary and strongly discouraged as it will introduce a lot of
network roundtrips and overhead.

Channels are also meant to be long-lived but since many recoverable protocol errors will
result in channel closure, channel lifespan could be shorter than that of its connection.
Closing and opening new channels per operation is usually unnecessary but can be
appropriate. When in doubt, consider reusing channels first.

Channel-level exceptions such as attempts to consume from a
queue that does not exist will result in channel closure. A closed channel can no
longer be used and will not receive any more events from the server (such
as message deliveries). Channel-level exceptions will be logged by RabbitMQ
and will initiate a shutdown sequence for the channel (see below).

Client-Provided Connection Name

RabbitMQ nodes have a limited amount of information about their clients:

  • their TCP endpoint (source IP address and port)
  • the credentials used

This information alone can make identifying applications and instances problematic, in particular when credentials can be
shared and clients connect over a load balancer but Proxy protocol cannot be enabled.

To make it easier to identify clients in server logs and management UI,
AMQP 0-9-1 client connections, including the RabbitMQ .NET client, can provide a custom identifier.
If set, the identifier will be mentioned in log entries and management UI. The identifier is known as
the client-provided connection name. The name can be used to identify an application or a specific component
within an application. The name is optional; however, developers are strongly encouraged to provide one
as it would significantly simplify certain operational tasks.

RabbitMQ .NET client provides a connection factory property,
ConnectionFactory.ClientProvidedName,
which, if set, controls the client-provided connection name for all new connections opened
by this factory.

Here’s a modified connection example used above which provides such a name:

ConnectionFactory factory = new ConnectionFactory();
// "guest"/"guest" by default, limited to localhost connections
factory.UserName = user;
factory.Password = pass;
factory.VirtualHost = vhost;
factory.HostName = hostName;

// this name will be shared by all connections instantiated by
// this factory
factory.ClientProvidedName = "app:audit component:event-consumer";

IConnection conn = factory.CreateConnection();

Using Exchanges and Queues

Client applications work with exchanges and queues,
the high-level building blocks of the protocol.
These must be «declared» before they can be
used. Declaring either type of object simply ensures that one of that
name exists, creating it if necessary.

Continuing the previous example, the following code declares an
exchange and a queue, then binds them together.

channel.ExchangeDeclare(exchangeName, ExchangeType.Direct);
channel.QueueDeclare(queueName, false, false, false, null);
channel.QueueBind(queueName, exchangeName, routingKey, null);

This will actively declare the following objects:

  • a non-durable, non-autodelete exchange of «direct» type
  • a non-durable, non-autodelete, non-exclusive queue

The exchange can be customised by using additional parameters.
The above code then binds the queue to the exchange with the given
routing key.

Many channel API (IModel) methods are overloaded. The convenient
short form of ExchangeDeclare uses sensible defaults. There are
also longer forms with more parameters, to let you override these
defaults as necessary, giving full control where needed.

This «short version, long version» pattern is used throughout the API.

Passive Declaration

Queues and exchanges can be declared «passively». A passive declare simply checks that the entity
with the provided name exists. If it does, the operation is a no-op. For queues successful
passive declares will return the same information as non-passive ones, namely the number of
consumers and messages in ready state in the queue.

If the entity does not exist, the operation fails with a channel level exception. The channel
cannot be used after that. A new channel should be opened. It is common to use one-off (temporary)
channels for passive declarations.

IModel#QueueDeclarePassive and IModel#ExchangeDeclarePassive are the
methods used for passive declaration. The following example demonstrates IModel#QueueDeclarePassive:

var response = channel.QueueDeclarePassive("queue-name");
// returns the number of messages in Ready state in the queue
response.MessageCount;
// returns the number of consumers the queue has
response.ConsumerCount;

IModel#ExchangeDeclarePassive‘s return value contains no useful information. Therefore
if the method returns and no channel exceptions occurs, it means that the exchange does exist.

Operations with Optional Responses

Some common operations also have a «no wait» version which won’t wait for server
response. For example, to declare a queue and instruct the server to not send any
response, use

channel.QueueDeclareNoWait(queueName, true, false, false, null);

The «no wait» versions are more efficient but offer lower safety guarantees, e.g. they
are more dependent on the heartbeat mechanism for detection of failed operations.
When in doubt, start with the standard version. The «no wait» versions are only needed in scenarios
with high topology (queue, binding) churn.

Deleting Entities and Purging Messages

A queue or exchange can be explicitly deleted:

channel.QueueDelete("queue-name", false, false);

It is possible to delete a queue only if it is empty:

channel.QueueDelete("queue-name", false, true);

or if it is not used (does not have any consumers):

channel.QueueDelete("queue-name", true, false);

A queue can be purged (all of its messages deleted):

channel.QueuePurge("queue-name");

Publishing Messages

To publish a message to an exchange, use IModel.BasicPublish as
follows:

byte[] messageBodyBytes = System.Text.Encoding.UTF8.GetBytes("Hello, world!");
channel.BasicPublish(exchangeName, routingKey, null, messageBodyBytes);

For fine control, you can use overloaded variants to specify the
mandatory flag, or specify messages properties:

byte[] messageBodyBytes = System.Text.Encoding.UTF8.GetBytes("Hello, world!");
IBasicProperties props = channel.CreateBasicProperties();
props.ContentType = "text/plain";
props.DeliveryMode = 2;
channel.BasicPublish(exchangeName, routingKey, props, messageBodyBytes);

This sends a message with delivery mode 2 (persistent) and
content-type «text/plain». See the definition of the IBasicProperties
interface for more information about the available message properties.

In the following example, we publish a message with custom headers:

byte[] messageBodyBytes = System.Text.Encoding.UTF8.GetBytes("Hello, world!");

IBasicProperties props = channel.CreateBasicProperties();
props.ContentType = "text/plain";
props.DeliveryMode = 2;
props.Headers = new Dictionary<string, object>();
props.Headers.Add("latitude",  51.5252949);
props.Headers.Add("longitude", -0.0905493);

channel.BasicPublish(exchangeName, routingKey, props, messageBodyBytes);

Code sample below sets a message expiration:

byte[] messageBodyBytes = System.Text.Encoding.UTF8.GetBytes("Hello, world!");

IBasicProperties props = channel.CreateBasicProperties();
props.ContentType = "text/plain";
props.DeliveryMode = 2;
props.Expiration = "36000000";

channel.BasicPublish(exchangeName, routingKey, props, messageBodyBytes);

Retrieving Messages By Subscription («push API»)

The recommended and most convenient way to receive messages is to set up a subscription using the
IBasicConsumer interface. The messages will then be delivered
automatically as they arrive, rather than having to be requested
proactively.

One way to implement a consumer is to use the
convenience class EventingBasicConsumer, which dispatches
deliveries and other consumer lifecycle events as C# events:

var consumer = new EventingBasicConsumer(channel);
consumer.Received += (ch, ea) =>
                {
                    var body = ea.Body.ToArray();
                    // copy or deserialise the payload
                    // and process the message
                    // ...
                    channel.BasicAck(ea.DeliveryTag, false);
                };
// this consumer tag identifies the subscription
// when it has to be cancelled
string consumerTag = channel.BasicConsume(queueName, false, consumer);

Another option is to subclass DefaultBasicConsumer,
overriding methods as necessary, or implement IBasicConsumer
directly. You will generally want to implement the core method IBasicConsumer.HandleBasicDeliver.

More sophisticated consumers will need to implement further
methods. In particular, HandleModelShutdown traps
channel/connection closure. Consumers can also implement
HandleBasicCancelOk to be notified of cancellations.

The ConsumerTag property of DefaultBasicConsumer can be
used to retrieve the server-generated consumer tag, in cases where
none was supplied to the original IModel.BasicConsume call.

You can cancel an active consumer with IModel.BasicCancel:

channel.BasicCancel(consumerTag);

When calling the API methods, you always refer to consumers by their
consumer tags, which can be either client- or server-generated as
explained in the AMQP 0-9-1 specification document.

Consumer Memory Safety Requirements

As of version 6.0 of
the .NET client, message payloads are represented using the System.ReadOnlyMemory<byte>
type from the System.Memory library.

This library places certain restrictions on when a read only memory span can be
accessed by applications.

Important: consumer interface implementations must deserialize or copy delivery payload before delivery handler method returns.
Retaining a reference to the payload is not safe: the memory allocated for it can be deallocated at any moment
after the handler returns.

Async Consumer Implementations

The client provides an async-oriented consumer dispatch implementation. This dispatcher can only
be used with async consumers, that is, IAsyncBasicConsumer implementations.

In order to use this dispatcher, set the ConnectionFactory.DispatchConsumersAsync property to true:

ConnectionFactory factory = new ConnectionFactory();
// ...
// use async-oriented consumer dispatcher. Only compatible with IAsyncBasicConsumer implementations
factory.DispatchConsumersAsync = true;

then register a consumer that implements IAsyncBasicConsumer, such as AsyncEventingBasicConsumer or AsyncDefaultBasicConsumer:

var consumer = new AsyncEventingBasicConsumer(channel);
consumer.Received += async (ch, ea) =>
    {
        var body = ea.Body.ToArray();
        // copy or deserialise the payload
        // and process the message
        // ...

        channel.BasicAck(ea.DeliveryTag, false);
        await Task.Yield();

    };
// this consumer tag identifies the subscription
// when it has to be cancelled
string consumerTag = channel.BasicConsume(queueName, false, consumer);
// ensure we get a delivery
bool waitRes = latch.WaitOne(2000);

Fetching Individual Messages (Polling or «pull API»)

It is also possible to retrieve individual messages on demand («pull API» a.k.a. polling).
This approach to consumption is very inefficient as it is effectively polling
and applications repeatedly have to ask for results even if the vast majority of the requests
yield no results. Therefore using this approach is highly discouraged.

To «pull» a message, use the IModel.BasicGet method.
The returned value is an instance of BasicGetResult, from which the header
information (properties) and message body can be extracted:

bool autoAck = false;
BasicGetResult result = channel.BasicGet(queueName, autoAck);
if (result == null) {
    // No message available at this time.
} else {
    IBasicProperties props = result.BasicProperties;
    ReadOnlyMemory<byte> body = result.Body;
    ...

The above example uses manual acknowledgements (autoAck = false), so the application must also call
IModel.BasicAck to acknowledge the delivery after processing:

    ...
    // acknowledge receipt of the message
    channel.BasicAck(result.DeliveryTag, false);
}

Note that fetching messages using this API is relatively inefficient. If you’d prefer
RabbitMQ to push messages to the client, see the next section.

Concurrency Considerations for Consumers

There is a number of concurrency-related topics for a library user to consider.

Sharing Channels Between Threads

IModel instance usage by more than
one thread simultaneously should be avoided. Application code
should maintain a clear notion of thread ownership for IModel instances.

This is a hard requirement for publishers: sharing a channel (an IModel instance)
for concurrent publishing will lead to incorrect frame interleaving at the protocol level.
Channel instances must not be shared by threads that publish on them.

If more than one thread needs to access a particular IModel
instances, the application should enforce mutual exclusion. One
way of achieving this is for all users of an IModel to
lock the instance itself:

IModel ch = RetrieveSomeSharedIModelInstance();
lock (ch) {
  ch.BasicPublish(...);
}

Symptoms of incorrect serialisation of IModel operations
include, but are not limited to,

  • connection-level exceptions due to invalid frame
    interleaving on the wire. RabbitMQ server logs will
    contain unexpected frame errors in such scenario.
  • Pipelining and continuation exceptions thrown by the client

Consumption that involve sharing a channel between threads should be avoided
when possible but can be done safely.

Consumers that can be multi-threaded or use a thread pool internally, including TPL-based
consumers, must use mutual exclusion of acknowledgements operations
on a shared channel.

Per-Connection Thread Use

Each IConnection instance is, in the current implementation,
backed by a single background thread that reads from the socket and
dispatches the resulting events to the application.
If heartbeats are enabled, they will use a pair of .NET timers per connection.

Usually, therefore, there will be at least two threads active in an application
using this library:

the application thread
contains the application logic, and makes
calls on IModel methods to perform protocol operations.
the I/O activity thread
hidden away and completely managed by the
IConnection instance.

The one place where the nature of the threading model is visible to
the application is in any callback the application registers with the
library. Such callbacks include:

  • any IBasicConsumer method
  • the BasicReturn event on IModel
  • any of the various shutdown events on IConnection, IModel etc.

Consumer Callbacks and Ordering

As of version 3.5.0 application callback handlers can invoke blocking
operations (such as IModel.QueueDeclare or IModel.BasicCancel). IBasicConsumer callbacks are invoked concurrently.
However, per-channel operation order is preserved. In other words, if messages A and B were delivered
in this order on the same channel, they will be processed in this order. If messages A and B
were delivered on different channels, they can be processed in any order (or in parallel).
Consumer callbacks are invoked in tasks dispatched a TaskScheduler.

Handling Unroutable Messages

If a message is published with the «mandatory» flag
set, but cannot be delivered, the broker will return it to the sending
client (via a basic.return AMQP 0-9-1 command).

To be notified of such returns, clients can subscribe to the
IModel.BasicReturn event. If there are no listeners attached to the
event, then returned messages will be silently dropped.

channel.BasicReturn += (sender, ea) => {
    ...
};

The BasicReturn event will fire, for example, if the client
publishes a message with the «mandatory» flag set to an exchange of
«direct» type which is not bound to a queue.

Automatic Recovery From Network Failures

Connection Recovery

Network connection between clients and RabbitMQ nodes can fail.
RabbitMQ .NET/C# client supports automatic recovery of connections
and topology (queues, exchanges, bindings, and consumers). The feature
has certain limitations covered later in this guide.

The automatic recovery process performs the following steps:

  • Reconnect
  • Restore connection listeners
  • Re-open channels
  • Restore channel listeners
  • Restore channel basic.qos setting, publisher confirms and transaction settings

Topology recovery starts after the above actions are completed. The following steps are
performed for every channel known to being open at the time of connection failure:

  • Re-declare exchanges (except for predefined ones)
  • Re-declare queues
  • Recover all bindings
  • Recover all consumers

To enable automatic connection recovery, set
ConnectionFactory.AutomaticRecoveryEnabled to true:

ConnectionFactory factory = new ConnectionFactory();
factory.AutomaticRecoveryEnabled = true;
// connection that will recover automatically
IConnection conn = factory.CreateConnection();

If recovery fails due to an exception (e.g. RabbitMQ node is
still not reachable), it will be retried after a fixed time interval (default
is 5 seconds). The interval can be configured:

ConnectionFactory factory = new ConnectionFactory();
// attempt recovery every 10 seconds
factory.NetworkRecoveryInterval = TimeSpan.FromSeconds(10);

When Will Connection Recovery Be Triggered?

Automatic connection recovery, if enabled, will be triggered by the following events:

  • An I/O exception is thrown in connection’s I/O loop
  • A socket read operation times out
  • Missed server heartbeats are detected
  • Any other unexpected exception is thrown in connection’s I/O loop

whichever happens first.

If initial client connection to a RabbitMQ node fails, automatic connection
recovery won’t kick in. Applications developers are responsible for retrying
such connections, logging failed attempts, implementing a limit to the number
of retries and so on. Here’s a very basic example:

ConnectionFactory factory = new ConnectionFactory();
// configure various connection settings

try {
  IConnection conn = factory.CreateConnection();
} catch (RabbitMQ.Client.Exceptions.BrokerUnreachableException e) {
  Thread.Sleep(5000);
  // apply retry logic
}

When a connection is closed by the application via the Connection.Close method,
connection recovery will not be initiated.

Channel-level exceptions will not trigger any kind of recovery as they usually
indicate a semantic issue in the application (e.g. an attempt to consume from a
non-existent queue).

Effects on Publishing

Messages that are published using IModel.BasicPublish when connection is down
will be lost. The client does not enqueue them for delivery after connection has recovered.
To ensure that published messages reach RabbitMQ applications need to use Publisher Confirms
and account for connection failures.

Topology Recovery

Topology recovery involves recovery of exchanges, queues, bindings
and consumers. It is enabled by default but can be disabled:

ConnectionFactory factory = new ConnectionFactory();

IConnection conn = factory.CreateConnection();
factory.AutomaticRecoveryEnabled = true;
factory.TopologyRecoveryEnabled  = false;

Failure Detection and Recovery Limitations

Automatic connection recovery has a number of limitations and intentional
design decisions that applications developers need to be aware of.

When a connection is down or lost, it takes time to detect.
Therefore there is a window of time in which both the
library and the application are unaware of effective
connection failure. Any messages published during this
time frame are serialised and written to the TCP socket
as usual. Their delivery to the broker can only be
guaranteed via publisher confirms: publishing in AMQP 0-9-1 is entirely
asynchronous by design.

When a socket or I/O operation error is detected by a
connection with automatic recovery enabled, recovery
begins after a configurable delay, 5 seconds by
default. This design assumes that even though a lot of
network failures are transient and generally short
lived, they do not go away in an instant. Connection recovery
attempts will continue at identical time intervals until
a new connection is successfully opened.

When a connection is in the recovering state, any
publishes attempted on its channels will be rejected
with an exception. The client currently does not perform
any internal buffering of such outgoing messages. It is
an application developer’s responsibility to keep track of such
messages and republish them when recovery succeeds.
Publisher confirms is a protocol extension
that should be used by publishers that cannot afford message loss.

Connection recovery will not kick in when a channel is closed due to a
channel-level exception. Such exceptions often indicate application-level
issues. The library cannot make an informed decision about when that’s
the case.

Closed channels won’t be recovered even after connection recovery kicks in.
This includes both explicitly closed channels and the channel-level exception
case above.

Manual Acknowledgements and Automatic Recovery

When manual acknowledgements are used, it is possible that
network connection to RabbitMQ node fails between message
delivery and acknowledgement. After connection recovery,
RabbitMQ will reset delivery tags on all channels.

This means that basic.ack, basic.nack, and basic.reject
with old delivery tags will cause a channel exception. To avoid this,
RabbitMQ .NET client keeps track of and updates delivery tags to make them monotonically
growing between recoveries.

IModel.BasicAck, IModel.BasicNack, and
IModel.BasicReject then translate adjusted delivery tags into those used by RabbitMQ.

Acknowledgements with stale delivery tags will not be
sent. Applications that use manual acknowledgements and automatic
recovery must be capable of handling redeliveries.

Getting Help and Providing Feedback

If you have questions about the contents of this guide or
any other topic related to RabbitMQ, don’t hesitate to ask them
on the RabbitMQ mailing list.

Help Us Improve the Docs <3

If you’d like to contribute an improvement to the site,
its source is available on GitHub.
Simply fork the repository and submit a pull request. Thank you!

RabbitMQ C AMQP client library

Build Status

Coverage Status

Introduction

This is a C-language AMQP client library for use with v2.0+ of the RabbitMQ broker.

  • http://github.com/alanxz/rabbitmq-c

Announcements regarding the library are periodically made on the rabbitmq-c-users and cross-posted to rabbitmq-users.

  • https://groups.google.com/forum/#!forum/rabbitmq-c-users
  • https://groups.google.com/forum/#!forum/rabbitmq-users

Latest Stable Version

The latest stable release of rabbitmq-c can be found at:

  • https://github.com/alanxz/rabbitmq-c/releases/latest

Documentation

API documentation for v0.8.0+ can viewed from:

http://alanxz.github.io/rabbitmq-c/docs/0.8.0/

Getting started

Building and installing

Prereqs:

  • CMake v2.6 or better
  • A C compiler (GCC 4.4+, clang, and MSVC are test. Other compilers may also work)
  • Optionally OpenSSL v0.9.8+ to enable support for connecting to RabbitMQ over SSL/TLS
  • Optionally POpt to build some handy command-line tools.
  • Optionally XmlTo to build man pages for the handy command-line tools
  • Optionally Doxygen to build developer API documentation.

After downloading and extracting the source from a tarball to a directory (see above), the commands to build rabbitmq-c on most systems are:

mkdir build && cd build
cmake ..
cmake --build . [--config Release]

The —config Release flag should be used in multi-configuration generators e.g., Visual Studio or XCode.

It is also possible to point the CMake GUI tool at the CMakeLists.txt in the root of the source tree and generate build projects or IDE workspace

Installing the library and optionally specifying a prefix can be done with:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
cmake --build . [--config Release] --target install

More information on CMake can be found on its FAQ (http://www.cmake.org/Wiki/CMake_FAQ)

Other interesting flags that can be passed to CMake:

  • BUILD_EXAMPLES=ON/OFF toggles building the examples. ON by default.
  • BUILD_SHARED_LIBS=ON/OFF toggles building rabbitmq-c as a shared library. ON by default.
  • BUILD_STATIC_LIBS=ON/OFF toggles building rabbitmq-c as a static library. OFF by default.
  • BUILD_TESTS=ON/OFF toggles building test code. ON by default.
  • BUILD_TOOLS=ON/OFF toggles building the command line tools. By default this is ON if the build system can find the POpt header and library.
  • BUILD_TOOLS_DOCS=ON/OFF toggles building the man pages for the command line tools. By default this is ON if BUILD_TOOLS is ON and the build system can find the XmlTo utility.
  • ENABLE_SSL_SUPPORT=ON/OFF toggles building rabbitmq-c with SSL support. By default this is ON if the OpenSSL headers and library can be found.
  • BUILD_API_DOCS=ON/OFF — toggles building the Doxygen API documentation, by default this is OFF
  • RUN_SYSTEM_TESTS=ON/OFF toggles building the system tests (i.e. tests requiring an accessible RabbitMQ server instance on localhost), by default this is OFF

Building RabbitMQ — Using vcpkg

You can download and install RabbitMQ using the vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install librabbitmq

The RabbitMQ port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Running the examples

Arrange for a RabbitMQ or other AMQP server to be running on localhost at TCP port number 5672.

In one terminal, run

./examples/amqp_listen localhost 5672 amq.direct test

In another terminal,

./examples/amqp_sendstring localhost 5672 amq.direct test "hello world"

You should see output similar to the following in the listener’s terminal window:

Delivery 1, exchange amq.direct routingkey test
Content-type: text/plain
----
00000000: 68 65 6C 6C 6F 20 77 6F : 72 6C 64                 hello world
0000000B:

Writing applications using librabbitmq

Please see the examples directory for short examples of the use of the librabbitmq library.

Threading

You cannot share a socket, an amqp_connection_state_t, or a channel between threads using librabbitmq. The librabbitmq library is built with event-driven, single-threaded applications in mind, and does not yet cater to any of the requirements of pthreaded applications.

Your applications instead should open an AMQP connection (and an associated socket, of course) per thread. If your program needs to access an AMQP connection or any of its channels from more than one thread, it is entirely responsible for designing and implementing an appropriate locking scheme. It will generally be much simpler to have a connection exclusive to each thread that needs AMQP service.

Я пытаюсь построить RabbitMQ-C ( https://github.com/alanxz/rabbitmq-c ) с поддержкой SSL. Я загрузил и построил последнюю версию openSSL ( https://github.com/openssl/openssl ) и добавил ее. (библио…

Цель: сделать Rabbitmq-c динамически связанной через gcc ( https://github.com/alanxz/rabbitmq-c ). Проект называется storeman: #include <stdarg.h> #include <ctype.h> #include <stdlib…

Я пытаюсь подключиться к серверу RabbitMQ с использованием SSL, но я получаю эту ошибку «Ошибка проверки SSL-партнера SSL». Я проверяю сертификат с помощью openssl следующим образом: openssl s_clie…

Я хочу передать изображение с клиента на сервер с помощью RabbitMQ. Однако из всего, что я читал, я понял, что RabbitMQ может передавать только поток текста. Итак, как передать изображение?

Я пытаюсь создать обмен типа amq.fanout с помощью rabbitmq-c , amqp-клиента для RabbitMQ. Тем не менее, я все время спотыкаюсь о том, что именно я должен заявить для этого. В соответствии с этим я …

Я пытаюсь прочитать reply_to param из сообщения без успеха. Я использую библиотеку rabbitcpp C++ для сервера очереди сообщений RabbitMQ https://github.com/akalend/amqpcpp AMQPQueue * qu2 = amqp.cre…

Есть ли встроенные бинарные файлы для каждой платформы для AMQP-библиотек SimpleAmqpClient & rabbitmq-c (а если нет, какова будет причина)?

2 года, 11 месяцев назад

grunt

Я запускаю cmake в командной строке с помощью: mkdir build && cd build .. cmake Но теперь у меня проблема с созданием команды для создания статичности realease. Я пытался: C:UsersKubaDow…

6 лет, 2 месяца назад

Kuba

После публикации сообщения на RabbitMQ: [exchange publishMessage:@»YOUR MESSAGE» usingRoutingKey:routingQueue propertiesMessage:props mandatory:NO immediate:NO error:&error]; Он работает отличн…

6 лет, 3 месяца назад

OneTwo

Я пытаюсь создать собственный проект, т.е. Smart_parking, используя RabbitMQ C-master. Ссылка на API-интерфейс C: https://github.com/alanxz/rabbitmq-c Я создал папку с именем smart_parking в папке …

Я пробовал компилировать версию rabbitmq-c версии 0.6.0 (последняя стабильная версия) с использованием mingw (версия от 2013-10-27). Несколько ошибок компиляции связаны с использованием «include po…

Я пытаюсь подключиться с использованием SSL, SSL включен на сервере, но я не могу подключиться с помощью клиента rabbitmq-c. Я взял пример amqps_connect_timeout.c, и это ошибка, которую я получаю в…

Я использую SimpleAmqpClient библиотеку оберток c++ для rabbitmq-c для отправки сообщений брокеру rabbitmq с помощью c++. Окружающая среда: Windows 7, Visual Studio 2017, SimpleAmpqClient 2.4.0 (ус…

Я пишу рецепт для создания пакета для библиотеки rabbitmq-c . Когда опция ENABLE_SSL_SUPPORT в своем сценарии CMake проверена, для ее сборки требуется библиотека OpenSSL .

5 лет, 5 месяцев назад

bobeff

Я пытаюсь использовать Hello World для внедрения AMQP в rabbitmq-c. У меня есть небольшой сценарий, принятый из примера, включенного в источник rabbitmq-c. Вот фрагмент: socket = amqp_tcp_socket_ne…

7 лет, 6 месяцев назад

masonk

Я написал сервер-клиентское приложение. Серверная сторона сервер инициализирует очередь queue1 с ключом маршрутизации key1 при прямом обмене. После инициализации и декларации он потребляет данные в…

Я пытаюсь скомпилировать rabbitmq-c в соответствии с инструкциями hte от R_R ( Невозможно построить rabbitmq-c для приложения iOS ), но я получаю следующую ошибку: Ошибка CMake в /Users/karela/appD…

6 лет, 11 месяцев назад

Karela

Я пытаюсь отправить изображение с помощью мастера RabbitMQ C, используя его двоичные данные как сообщение, а затем передав его и скопировав в другой файл изображения. Мой код выглядит следующим обр…

Я пытаюсь получить список узлов в кластере, используя только C API. Более или менее то, что возвращает следующая команда оболочки, но из C API rabbitmqctl cluster_status -n rabbit@<remote hostna…

rabbitmq-c имеет только amqp_confirm_select для подтверждения производителя, как его использовать? Я не могу найти способы использовать эту функцию, она используется в библиотеке rabbitmq-c? /** * …

4 года, 4 месяца назад

karllen

Библиотека сообщений AMQP для C имеет функцию, которая принимает строку C и преобразует ее в собственный формат байта для обработки amqp_cstring_bytes . Есть ли обратная функция этой функции, чтобы…

6 лет, 10 месяцев назад

Shiri

Я использую alanxz RabbitMQ C master. Ссылка выглядит следующим образом: https://github.com/alanxz/rabbitmq-c В примерах amqp_sendstring.c и amqp_listen.c, когда я закрываю amqp_listen.c и продолжа…

Я хочу реализовать небольшой c++ клиент, который подключается к моему локальному RabbitMQ-серверу. Приложение настроено с CMakeList следующим образом: Boost_STATIC_LIBS: ON Boost SHARED_LIBS: ON EN…

Я хочу написать тестовую программу с помощью amqpcpp CopernicaMarketingSoftware/AMQP-CPP . Но компилятор (g++) жалуется: g++ main.cpp rabbitmq_handler.cpp -std=c++11 -lamqpcpp -lpthread -ldl In fil…

4 года, 7 месяцев назад

jam dc

Я пытаюсь кодировать простого потребителя, используя librabbitmq. Это работает, но когда я выполняю amqp_basic_consume, он потребляет всю очередь. Я хочу, чтобы он получил одно сообщение, обработал…

Я использую обертку C++ rabbitmq-c ( SimpleAmqpClient ) и использую синхронную версию получения сообщений от брокера, поскольку она более эффективна, чем асинхронная. Итак, я BasicConsumeMessage с …

У меня включен ACK для пользователей и производителей, отправляющих 2000 сообщений на сервер. Я вижу только около 1700 сообщений на потребителя. Может кто-то сказать, что не так? Я выполняю приведе…

Ищете еще? Найдите вопросы с помощью поисковой формы вверху страницы
или с помощью рубрикатора,
помогите ответить на вопросы без ответа.

Понравилась статья? Поделить с друзьями:
  • Error po7 canon mp250
  • Error pnkbstrb was unpacked but could not be found on the file system
  • Error pngquant failed to build make sure that libpng dev is installed windows
  • Error plugin innodb registration as a storage engine failed
  • Error plugin bridge dll is not supported