Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails because uamqp wheel build fails #14

Open
waku1123 opened this issue Apr 2, 2024 · 8 comments
Open

Install fails because uamqp wheel build fails #14

waku1123 opened this issue Apr 2, 2024 · 8 comments

Comments

@waku1123
Copy link

waku1123 commented Apr 2, 2024

I want to install azure-iot-hub in a virtual environment (pip install azure-iot-hub), but the build of uamqp wheel fails.
Is there something wrong with the installation method?

M2 Pro
MacOS 14.4.1
python 3.9.17

      uamqp/c_uamqp.c:90791:109: warning: passing 'const IO_INTERFACE_DESCRIPTION *' (aka 'const struct IO_INTERFACE_DESCRIPTION_TAG *') to parameter of type 'IO_INTERFACE_DESCRIPTION *' (aka 'struct IO_INTERFACE_DESCRIPTION_TAG *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_t_2 = ((struct __pyx_vtabstruct_5uamqp_7c_uamqp_XIO *)__pyx_v_xio->__pyx_vtab)->create(__pyx_v_xio, __pyx_v_interface, ((PyObject *)__pyx_v_io_config), (&__pyx_v_io_config->_c_value)); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 39, __pyx_L1_error)
                                                                                                                  ^~~~~~~~~~~~~~~~~
      uamqp/c_uamqp.c:111209:3: warning: unused label 'bad' [-Wunused-label]
        bad:
        ^~~~
      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
@birddevelper
Copy link

birddevelper commented Apr 21, 2024

azure-iot-hub depends on azure-uamqp-python package which is deprecated and fails to build on certain systems including Mac ARM and Linux ARM on Python 3.12+.

As a stopgap, I developed an small alternative package azure-iot-hub-api that has basic functionalities to use in my own project until the azure-iot-hub receive necessary updates. I tired to keep it as similar as possible to azure-iot-hub.

Also, there exits another package azure-iot-sdk-python which I haven't used, maybe it helps.

@timozerrer
Copy link

How is there still no official solution? @cartertinney , is this SDK discontinued?

@sugawarayss
Copy link

sugawarayss commented Aug 28, 2024

it looks like this package is not maintained...

I took advantage of this package’s functionality by ignoring build errors. Because only some features were needed.

CFLAGS="-Wno-error=incompatible-function-pointer-types" pip install azure-iot-hub

@timozerrer
Copy link

Thank you @sugawarayss . Are you aware which features are affected?

@sugawarayss
Copy link

sugawarayss commented Aug 28, 2024

@timozerrer
I don’t know if this is correct, but I think it probably affects the part where C2D messages are sent. However, I was able to send C2D messages even if I ignored the build error on my device local.

@timozerrer
Copy link

This workaround does not seem to work on Python 3.12: Azure/azure-uamqp-python#386 (comment)
I can confirm build is still not running using Python 3.12 and M3

@sugawarayss
Copy link

fmmm...
i use Python 3.9.17 on M2 MacOS device...

@abhimanyusinghal
Copy link

abhimanyusinghal commented Nov 6, 2024

Is there any official update on this issue. This is really big gap for anyone using Mac as a development machine. Python SDKs are supposed to be fully cross platform.
cc @cartertinney @microsoftopensource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants