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

ADS integration Exec format error #458

Closed
jandeschuttere opened this issue Nov 2, 2022 · 3 comments
Closed

ADS integration Exec format error #458

jandeschuttere opened this issue Nov 2, 2022 · 3 comments
Labels
wontfix This will not be worked on

Comments

@jandeschuttere
Copy link

Referring to home-assistant/core#74067 (and related home-assistant/core#74952

After some initial research I believe the ADS package issue correlates with home-assistant/docker#236 where the transition seems to be done to move to musllinux wheel.

I am willing to dive into this codebase and logic - when I find time - to identify what can be done to fix this, if someone can confirm this is a viable path. I am however not a python dev so it'll take me some time to catch up with wheels and how they interact with the codebase in terms of identification of requirements and how to identify which need different architecture targets.

@SaWey
Copy link

SaWey commented Nov 3, 2022

The problem is with the pyads library not being built for the different platforms.
It is using the binary adslib.so, but the wheels package is defined as being platform independant.
pyads-3.2.2-py3-none-any.whl

Before the switch to musllinux, the packages were built per platform, but were named the same and seemed platform independant:
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py3-none-any

I can't find info on how/when the wheel is built by HA and how it is defined to only produce the *py3-none-any.whl file
@pvizeli maybe you can explain how the packages are built and where we need to look?

@github-actions
Copy link

github-actions bot commented May 4, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label May 4, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
@SaWey
Copy link

SaWey commented Oct 14, 2023

I found some time to search the problem, and I think I found the reason why this has been failing all along.
pyads is building the adslib dependency in a special way which goes unnoticed by setuptools.

The library would need a special switch to let setuptools build the wheel with a platform specific name.

https://stackoverflow.com/a/64921892 (by CiaranWelsh):
Adding below line to setup arguments in setup.py
has_ext_modules=lambda: True
This let me build pyads-3.3.9-cp310-cp310-linux_x86_64.whl instead of pyads-3.3.9-py3-none-any.whl

So probably nothing to do with the way HA is building the wheels.

I have made a pull request on the library in the hope they will include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants