Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
55 stars 47 forks source link

[1.6.9] Failed building wheel for uamqp #386

Open cicharka opened 3 months ago

cicharka commented 3 months ago

Describe the bug Failed to install directly with pip:

pip install uamqp

      ...
      uamqp/c_uamqp.c:65557:146: error: incompatible function pointer types passing 'void (void *, enum MESSAGE_RECEIVER_STATE_TAG, enum MESSAGE_RECEIVER_STATE_TAG)' to parameter of type 'ON_MESSAGE_RECEIVER_STATE_CHANGED' (aka 'void (*)(const void *, enum MESSAGE_RECEIVER_STATE_TAG, enum MESSAGE_RECEIVER_STATE_TAG)') [-Wincompatible-function-pointer-types]
              __pyx_t_1 = ((struct __pyx_vtabstruct_5uamqp_7c_uamqp_cMessageReceiver *)__pyx_v_receiver->__pyx_vtab)->create(__pyx_v_receiver, __pyx_v_link, __pyx_f_5uamqp_7c_uamqp_on_message_receiver_state_changed, ((void *)__pyx_v_callback_context)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 23, __pyx_L1_error)
                                                                                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ...                                                                                                                                    
      35 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for uamqp
Failed to build uamqp
ERROR: Could not build wheels for uamqp, which is required to install pyproject.toml-based projects

To Reproduce Steps to reproduce the behavior:

  1. Create virtual env with desired python version
  2. Install package with pip install uamqp or pip install uamqp==1.6.9

Expected behavior Package should be installed.

Additional context Installation of version 1.6.8 works fine. Release 1.6.9 is blocking installation of requirements for azure collection.

Jangetta commented 3 months ago

I am facing the same issue but for all versions of uampq with Python 3.11.8 on a Macbook with Sonoma 14.4.1 and an M3 chip.

bhenderson-r7 commented 3 months ago

~I have the same issue with Python 3.8.17 on an M1 Macbook with Sonoma 14.2.1~

Edit: I followed the recommendation and updated my Azure SDK

kashifkhan commented 3 months ago

Hi everyone, are yall using uAMQP with either the eventhub or servicebus python sdks ? If thats the case we are wanting users to move over to the new versions of the SDK that uses a pure python based AMQP library

As such this library never officially supported ARM and didn't have wheels pushed out for it. We are just pushing out small updates overall as this library is no longer in active maintenance.

VidyaV1993 commented 3 months ago

I have the same issue with Python 3.11 on an Apple M2 Max with macOS Sonoma Version 14.3.1. I encountered this when I was trying to install azure-iot-hub.

rtrive commented 3 months ago

~I have the same issue with Python 3.8.17 on an M1 Macbook with Sonoma 14.2.1~

Edit: I followed the recommendation and updated my Azure SDK

Which one? Because I installed cmake, but it doesn't work

kashifkhan commented 3 months ago

@rtrive are you using the Azure Event Hub or Service Bus SDKs? Those also used uAMQP but now are using a new python based on. Upgrading those most likely fixed the issue for them

Gsantomaggio commented 2 months ago

have the same problem with 1.6.8 and 1.6.9

Same error:

uamqp/c_uamqp.c:112510:55: error: no member named 'ob_digit' in 'struct _longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      uamqp/c_uamqp.c:112651:55: error: no member named 'ob_digit' in 'struct _longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]
      294 warnings and 20 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

thank you

miguelmgl commented 2 months ago

UAMQP Package Version: 1.6.9 Operating System: Sonoma 14.4.1 Python Version: 3.11.6 M2

It is possible to build with this flag: CFLAGS="-Wno-error=incompatible-function-pointer-types" pip install uamqp==1.6.9

Not sure if there are side effects, but I only require to install uampq as a dependency of azure-iot-hub, and it doesn't seems to affect the functionality I need.

With Python 3.12 this workaround doesn't work.

justinokay commented 1 month ago

UAMQP Package Version: 1.6.9 Operating System: Sonoma 14.4.1 Python Version: 3.11.6 M2

It is possible to build with this flag: CFLAGS="-Wno-error=incompatible-function-pointer-types" pip install uamqp==1.6.9

Not sure if there are side effects, but I only require to install uampq as a dependency of azure-iot-hub, and it doesn't seems to affect the functionality I need.

With Python 3.12 this workaround doesn't work.

This worked for me installing the latest version. Thanks!

CFLAGS="-Wno-error=incompatible-function-pointer-types" pip3 install uamqp