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

aiohttp-isal causes installation issues for users. #116681

Closed
rhpvorderman opened this issue May 3, 2024 · 28 comments · Fixed by #116814
Closed

aiohttp-isal causes installation issues for users. #116681

rhpvorderman opened this issue May 3, 2024 · 28 comments · Fixed by #116814

Comments

@rhpvorderman
Copy link

The problem

Home assistent requires aiohttp-isal which is aiohttp accelerated using the python bindings for the ISA-L library.

As stated in those python bindings, python-isal cannot be added as a dependency without due dilligence:

https://python-isal.readthedocs.io/en/stable/index.html#python-isal-as-a-dependency-in-your-project

If there are no wheels build for a user's platform, the chance that they are able to fix it themselves are fairly small. This is a complex library to install.

Those users see an error in their pip installation, and they start posting issues on Python-isal such as this one: pycompression/python-isal#195.

However the core problem here is not that python-isal is hard to install, but that it is flat-out required here without providing any fallback options on the builtin zlib module from python. Please refer to the python-isal documentation how to list ISA-L as a dependency. Please also add a simple fallback to zlib, so there is no problem for users that are on slightly less mainstream platforms.

Ping @bdraco

What version of Home Assistant Core has the issue?

2024.5.0

What was the last working version of Home Assistant Core?

2024.5.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

aiohttp-isal

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@bdraco
Copy link
Member

bdraco commented May 3, 2024

We are publishing wheels for all the images we currently support: https://wheels.home-assistant.io/

Listing the dep based on platform.machine isn't possible for us due to how builds are done. We started with that approach but had too many problems with x86_64 vs i386 builds so that approach was abandoned. I'm not sure that will help here anyway, as it seems to be a problem of which aarch64 vs which machine.

~97%+ of users install via an image so they won't have an issue or have to deal with building/finding the wheel themselves. For context, we expect someone who is doing a manual core install to be an expert and be able to deal with getting packages to build on their system. The docs try hard to point people away from this method. https://www.home-assistant.io/installation/#advanced-installation-methods https://www.home-assistant.io/installation/linux#install-home-assistant-core

It looks like one of users in that issue was trying to use it on FreeBSD which isn't a platform we want to support.
pycompression/python-isal#195 (comment)

For the other case, its not so clear about the trouble on their RPi as the quote in that issue is

On my Raspberry Pi it works without changes

That one is a bit confusing since they are using piwheels on aarch64 but also piwheels doesn't support aarch64 piwheels/packages#119. It might be that they are somehow missing wheels.home-assistant.io or
the wheel isn't compatible with their system for some reason?

@bdraco
Copy link
Member

bdraco commented May 3, 2024

I also appreciate that you want users to avoid ending up in your issue queue. I'll look at what we can do as a fallback without trying to add code to explicitly handle FreeBSD as it has been very clear that we don't support FreeBSD, despite not seeming to deter some users.

edit: it looks like the user in that issue using FreeBSD is aware its not supported pycompression/python-isal#195 (comment)

bdraco added a commit that referenced this issue May 3, 2024
Since `isal` can be difficult for users to build when not using a supported Home Assistant image, fallback to `zlib` with a warning that performance will suffer. This change will help FreeBSD users to avoid doubt; the Home Assistant project does not support FreeBSD.

fixes #116681
@bdraco bdraco mentioned this issue May 3, 2024
20 tasks
@bdraco
Copy link
Member

bdraco commented May 3, 2024

I opened #116720, but I'm not sure it solves anything except disabling it on FreeBSD since the problem seems to be that the user has a different variant of aarch64 (or maybe it's not aarch64 and really armv7 based on using pinwheels?).

What is going on there needs to be clarified before we can devise a solution for that case.

@tkundrat
Copy link

tkundrat commented May 3, 2024

I opened #116720 but I'm not sure it actually solves anything except disabling isal on FreeBSD since the problem seems to be that the user has a different variant of aarch64 (or maybe its not aarch64 and really armv7 based on using piwheels?)

Its not really clear what is going on there.

Hey there, I opened the issue originally in the isal pythin lib repo.
I'm running HA core on Raspbian bookworm with an aarch64 kernel on my RasPi4. I finally upgraded to Python3.12.2 manually (building myself as there are no official packages) and am using homeassistant==2024.4.4 currently inside a python venv. Yesterday I tried to install 2024.5.0 (pip install --upgrade homeassistant) and that's where I met this problem and created the issue on the other repo.

@tkundrat
Copy link

tkundrat commented May 3, 2024

FreeBSD was mentioned by another person who responded to my issue. But I am running a Linux distro, so my OS should be supported. I installed HA core by the official guide from home-assistant.io

@bdraco
Copy link
Member

bdraco commented May 3, 2024

@tkundrat Can you run the following so we can see the tag for your system?

python3 -c "from setuptools.dist import Distribution; from setuptools import Extension ; dist = Distribution(attrs={'ext_modules':[Extension('dummy',['dummy.c'])]}) ; bdist_wheel_cmd = dist.get_command_obj('bdist_wheel') ; bdist_wheel_cmd.ensure_finalized() ; print(bdist_wheel_cmd.get_tag()) "

@tkundrat
Copy link

tkundrat commented May 3, 2024

@tkundrat Can you run the following so we can see the tag for your system?

python3 -c "from setuptools.dist import Distribution; from setuptools import Extension ; dist = Distribution(attrs={'ext_modules':[Extension('dummy',['dummy.c'])]}) ; bdist_wheel_cmd = dist.get_command_obj('bdist_wheel') ; bdist_wheel_cmd.ensure_finalized() ; print(bdist_wheel_cmd.get_tag()) "

I only get an error running your command:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pi/test-venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 861, in get_command_obj
    klass = self.get_command_class(command)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/test-venv/lib/python3.12/site-packages/setuptools/dist.py", line 717, in get_command_class
    return _Distribution.get_command_class(self, command)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/test-venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 845, in get_command_class
    raise DistutilsModuleError("invalid command '%s'" % command)
distutils.errors.DistutilsModuleError: invalid command 'bdist_wheel'

Edit: I should say that test-venv is the venv where I currently try to install 2024.5.0 so I don't break my running installation.

@bdraco
Copy link
Member

bdraco commented May 3, 2024

Lets try this instead

python3 -c 'import packaging.tags; print (list(packaging.tags.compatible_tags()))'

@tkundrat
Copy link

tkundrat commented May 3, 2024

Lets try this instead

python3 -c 'import packaging.tags; print (list(packaging.tags.compatible_tags()))'

This is the output:
tags.txt

@bdraco
Copy link
Member

bdraco commented May 3, 2024

So it looks like manylinux_2_36_armv8l and its not aarch64

@bdraco
Copy link
Member

bdraco commented May 3, 2024

But you also have tags for armv7l

@bdraco
Copy link
Member

bdraco commented May 3, 2024

So its 32bit but your in your post here, you have aarch64 pycompression/python-isal#195 (comment)

What does your uname -a show?

@tkundrat
Copy link

tkundrat commented May 3, 2024

Linux raspi4 6.1.58-v8+ #1692 SMP PREEMPT Thu Oct 19 17:06:12 BST 2023 aarch64 GNU/Linux

@tkundrat
Copy link

tkundrat commented May 3, 2024

Maybe this can be because I am using a 64bit kernel, but the majority of the userland is 32bit, as Raspberry Pi OS added support for 64bit not that long ago. I upgraded my existing installation to the 64bit kernel, but I think most of the software installed is still running in 32bit.

@bdraco
Copy link
Member

bdraco commented May 3, 2024

What its going to come down to is that while aarch64 is supported, we don't test or build anything for armv8l (32bit), only armv7l so its probably not going to work.

@bdraco
Copy link
Member

bdraco commented May 3, 2024

If we can come up with a way to exclude armv8l, I'm happy to do it. Normally I'd write it as

diff --git a/pyproject.toml b/pyproject.toml
index b6bd95f..41ec2ea 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -26,7 +26,7 @@ packages = [
 python = "^3.8"
 aiohttp = ">=3.9.0"
 isal = [
-   { version = ">=1.6.1", platform = "linux" },
+   { version = ">=1.6.1", platform = "linux", markers = "platform.machine != 'armv8'" },
    { version = ">=1.6.1", platform = "darwin" },
    { version = ">=1.6.1", platform = "win32" }
 ]

but your platform.machine() is returning aarch64 so thats not going to help

@bdraco
Copy link
Member

bdraco commented May 3, 2024

@tkundrat
Copy link

tkundrat commented May 4, 2024

I worked through the table with all markers:

os_name: 'posix'
sys_platform: 'linux'
platform_machine: 'aarch64'
platform_python_implementation: 'CPython'
platform_release: '6.1.58-v8+'
platform_system: 'Linux'
platform_version: '#1692 SMP PREEMPT Thu Oct 19 17:06:12 BST 2023'
python_version: '3.12'
python_full_version: '3.12.2'
implementation_name: 'cpython'
implementation_version: sys.version_info(major=3, minor=12, micro=2, releaselevel='final', serial=0)

Looks like we can't get the information that I'm running a 64bit kernel with mostly 32bit userland. So I either have to revert back to the 32bit kernel, reinstall a version of linux where everything is 64bit or just use HA OS.
Or is there another option I can still try?

@bdraco
Copy link
Member

bdraco commented May 4, 2024

That sums up the most reasonable options. Anything else would involve patching Home Assistant, and since your user land doesn't match your kernel, I expect there are other assumptions that will fail as well so best to get them to match.

bdraco added a commit that referenced this issue May 4, 2024
aiohttp-isal does not work on core installs where the system has 32bit userland and a 64bit kernel because we have no way to detect this configuration or handle it.

fixes #116681
balloob pushed a commit that referenced this issue May 5, 2024
…116814)

* Switch out aiohttp-isal for aiohttp-fast-zlib to make isal optional

aiohttp-isal does not work on core installs where the system has 32bit userland and a 64bit kernel because we have no way to detect this configuration or handle it.

fixes #116681

* Update homeassistant/components/isal/manifest.json

* Update homeassistant/components/isal/manifest.json

* hassfest

* isal

* fixes

* Apply suggestions from code review

* make sure isal is updated before http

* fix tests

* late import
@bdraco
Copy link
Member

bdraco commented May 5, 2024

Since specifiers where not a viable path to solve this, it took a bit of redesign so it will be in 2024.6.x.

Docs at home-assistant/home-assistant.io#32588

@bdraco
Copy link
Member

bdraco commented May 5, 2024

Docs preview

https://deploy-preview-32588--home-assistant-docs.netlify.app/integrations/isal/

@Artyrm
Copy link

Artyrm commented May 11, 2024

Since specifiers where not a viable path to solve this, it took a bit of redesign so it will be in 2024.6.x.

Hi! Thank you for your work.
I guess you're talking this PR: #116814 ?

I'm on Raspberry Pi 4 with Core and had that issue with isal installing latest release. Since fix is merged into dev, I tried to install 2024.6.0.dev0 Install went fine, but during hass startup it tries to build isal several times with the same error that broke install before, with multiple dependencies failing after that (log: https://pastebin.com/PdARgfjD )

Does fallback work like intended, or it needs to be fixed further?

@nageshshetty
Copy link

nageshshetty commented May 14, 2024

same here. on Pi 4 with diet pi OS, the isal dependency breaks the ha core update. one of the detected error is unknown architecture `armv8-a+crc'. I tried pip isal install too and same error so know its not HA fault but having the isal dependency which doesnt work on a very important hardwar i.e. PI is alarming. thanks for looking at this peeps!

@torkis
Copy link

torkis commented Jun 6, 2024

Hi! The build of 'isal' still does not work on Raspberry Pi 4 with the new HomeAssistant 2024.6.0 version.

2024-06-06 06:25:03.411 ERROR (SyncWorker_7) [homeassistant.util.package] Unable to install package isal==1.6.1: error: subprocess-exited-with-error

  × Building wheel for isal (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [226 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-312
      creating build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/igzip.py -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/__init__.py -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/igzip_threaded.py -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/igzip_lib.pyi -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/isal_zlib.pyi -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/_isal.pyi -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/py.typed -> build/lib.linux-aarch64-cpython-312/isal
      creating build/lib.linux-aarch64-cpython-312/isal/isa-l
      copying src/isal/isa-l/LICENSE -> build/lib.linux-aarch64-cpython-312/isal/isa-l
      copying src/isal/isa-l/README.md -> build/lib.linux-aarch64-cpython-312/isal/isa-l
      copying src/isal/isa-l/Release_notes.txt -> build/lib.linux-aarch64-cpython-312/isal/isa-l
      running build_ext
      mkdir -p bin
      Building isa-l.h
        ---> Building erasure_code/ec_base.c  aarch64
        ---> Building raid/raid_base.c  aarch64
        ---> Building crc/crc_base.c  aarch64
        ---> Building crc/crc64_base.c  aarch64
        ---> Building igzip/igzip.c  aarch64
        ---> Building igzip/hufftables_c.c  aarch64
        ---> Building igzip/igzip_base.c  aarch64
        ---> Building igzip/igzip_icf_base.c  aarch64
        ---> Building igzip/adler32_base.c  aarch64
        ---> Building igzip/flatten_ll.c  aarch64
        ---> Building igzip/aarch64/encode_df.S  aarch64
      igzip/aarch64/encode_df.S: Assembler messages:
      igzip/aarch64/encode_df.S:32: Error: unknown architecture `armv8-a+crc'

Is there any solution to this problem?

@armin-gh
Copy link

armin-gh commented Jun 6, 2024

Similar here.
Pi4, bookworm, Python 3.12.2

>>> import platform
>>> platform.machine()
'aarch64'

created a new clean venv and followed instructions to install homeassistant
Reading previous comments I expected isal to be optional?
Can we reopen this issue or is a new issue required?

2024-06-06 14:16:17.297 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package isal==1.6.1: error: subprocess-exited-with-error

  × Building wheel for isal (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [226 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-312
      creating build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/igzip.py -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/igzip_threaded.py -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/__init__.py -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/isal_zlib.pyi -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/_isal.pyi -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/igzip_lib.pyi -> build/lib.linux-aarch64-cpython-312/isal
      copying src/isal/py.typed -> build/lib.linux-aarch64-cpython-312/isal
      creating build/lib.linux-aarch64-cpython-312/isal/isa-l
      copying src/isal/isa-l/LICENSE -> build/lib.linux-aarch64-cpython-312/isal/isa-l
      copying src/isal/isa-l/README.md -> build/lib.linux-aarch64-cpython-312/isal/isa-l
      copying src/isal/isa-l/Release_notes.txt -> build/lib.linux-aarch64-cpython-312/isal/isa-l
      running build_ext
      mkdir -p bin
      Building isa-l.h
        ---> Building erasure_code/ec_base.c  aarch64
        ---> Building raid/raid_base.c  aarch64
        ---> Building crc/crc_base.c  aarch64
        ---> Building crc/crc64_base.c  aarch64
        ---> Building igzip/igzip.c  aarch64
        ---> Building igzip/hufftables_c.c  aarch64
        ---> Building igzip/igzip_base.c  aarch64
        ---> Building igzip/igzip_icf_base.c  aarch64
        ---> Building igzip/adler32_base.c  aarch64
        ---> Building igzip/flatten_ll.c  aarch64
        ---> Building igzip/aarch64/encode_df.S  aarch64
      igzip/aarch64/encode_df.S: Assembler messages:
      igzip/aarch64/encode_df.S:32: Error: unknown architecture `armv8-a+crc'

      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x0' -- .req ignored
      igzip/aarch64/encode_df.S:64:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w0' -- .req ignored
      igzip/aarch64/encode_df.S:64:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x0' -- .req ignored
      igzip/aarch64/encode_df.S:64:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x1' -- .req ignored
      igzip/aarch64/encode_df.S:65:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w1' -- .req ignored
      igzip/aarch64/encode_df.S:65:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x1' -- .req ignored
      igzip/aarch64/encode_df.S:65:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x2' -- .req ignored
      igzip/aarch64/encode_df.S:66:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w2' -- .req ignored
      igzip/aarch64/encode_df.S:66:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x2' -- .req ignored
      igzip/aarch64/encode_df.S:66:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x3' -- .req ignored
      igzip/aarch64/encode_df.S:67:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w3' -- .req ignored
      igzip/aarch64/encode_df.S:67:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x3' -- .req ignored
      igzip/aarch64/encode_df.S:67:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x4' -- .req ignored
      igzip/aarch64/encode_df.S:70:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w4' -- .req ignored
      igzip/aarch64/encode_df.S:70:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x4' -- .req ignored
      igzip/aarch64/encode_df.S:70:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'w5' -- .req ignored
      igzip/aarch64/encode_df.S:71:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w5' -- .req ignored
      igzip/aarch64/encode_df.S:71:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x5' -- .req ignored
      igzip/aarch64/encode_df.S:71:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x6' -- .req ignored
      igzip/aarch64/encode_df.S:72:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w6' -- .req ignored
      igzip/aarch64/encode_df.S:72:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x6' -- .req ignored
      igzip/aarch64/encode_df.S:72:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x7' -- .req ignored
      igzip/aarch64/encode_df.S:73:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w7' -- .req ignored
      igzip/aarch64/encode_df.S:73:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x7' -- .req ignored
      igzip/aarch64/encode_df.S:73:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x8' -- .req ignored
      igzip/aarch64/encode_df.S:74:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w8' -- .req ignored
      igzip/aarch64/encode_df.S:74:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x8' -- .req ignored
      igzip/aarch64/encode_df.S:74:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x9' -- .req ignored
      igzip/aarch64/encode_df.S:75:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w9' -- .req ignored
      igzip/aarch64/encode_df.S:75:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x9' -- .req ignored
      igzip/aarch64/encode_df.S:75:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x10' -- .req ignored
      igzip/aarch64/encode_df.S:76:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w10' -- .req ignored
      igzip/aarch64/encode_df.S:76:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x10' -- .req ignored
      igzip/aarch64/encode_df.S:76:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x11' -- .req ignored
      igzip/aarch64/encode_df.S:77:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w11' -- .req ignored
      igzip/aarch64/encode_df.S:77:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x11' -- .req ignored
      igzip/aarch64/encode_df.S:77:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x12' -- .req ignored
      igzip/aarch64/encode_df.S:78:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w12' -- .req ignored
      igzip/aarch64/encode_df.S:78:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x12' -- .req ignored
      igzip/aarch64/encode_df.S:78:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x13' -- .req ignored
      igzip/aarch64/encode_df.S:79:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w13' -- .req ignored
      igzip/aarch64/encode_df.S:79:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x13' -- .req ignored
      igzip/aarch64/encode_df.S:79:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x4' -- .req ignored
      igzip/aarch64/encode_df.S:81:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w4' -- .req ignored
      igzip/aarch64/encode_df.S:81:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x4' -- .req ignored
      igzip/aarch64/encode_df.S:81:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x7' -- .req ignored
      igzip/aarch64/encode_df.S:82:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w7' -- .req ignored
      igzip/aarch64/encode_df.S:82:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x7' -- .req ignored
      igzip/aarch64/encode_df.S:82:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x14' -- .req ignored
      igzip/aarch64/encode_df.S:84:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w14' -- .req ignored
      igzip/aarch64/encode_df.S:84:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x14' -- .req ignored
      igzip/aarch64/encode_df.S:84:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:46: Warning: unknown register 'x15' -- .req ignored
      igzip/aarch64/encode_df.S:85:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:47: Warning: unknown register 'w15' -- .req ignored
      igzip/aarch64/encode_df.S:85:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:48: Warning: unknown register 'x15' -- .req ignored
      igzip/aarch64/encode_df.S:85:  Info: macro invoked from here
      igzip/aarch64/encode_df.S:94: Error: ARM register expected -- `cmp next_in,end_in'
      igzip/aarch64/encode_df.S:97: Error: bad instruction `ldp bb_out_buf,bb_out_end,[bb,offset_m_out_buf]'
      igzip/aarch64/encode_df.S:98: Error: ARM register expected -- `cmp bb_out_end,bb_out_buf'
      igzip/aarch64/encode_df.S:101: Error: ARM register expected -- `ldr bb_bit_count,[bb,offset_m_bit_count]'
      igzip/aarch64/encode_df.S:102: Error: ARM register expected -- `ldr bb_bits,[bb,offset_m_bits]'
      igzip/aarch64/encode_df.S:107: Error: ARM register expected -- `ldr bb_out_end,[bb,offset_m_out_end]'
      igzip/aarch64/encode_df.S:108: Error: ARM register expected -- `cmp bb_out_end,bb_out_buf'
      igzip/aarch64/encode_df.S:112: Error: ARM register expected -- `ldrh w_code_and_extra,[next_in]'
      igzip/aarch64/encode_df.S:113: Error: ARM register expected -- `add next_in,next_in,4'
      igzip/aarch64/encode_df.S:114: Error: ARM register expected -- `ldr w_dist_lit_table,[next_in,-4]'
      igzip/aarch64/encode_df.S:115: Error: ARM register expected -- `and code_and_extra,code_and_extra,1023'
      igzip/aarch64/encode_df.S:117: Error: ARM register expected -- `ldrh w_dist_extra,[next_in,-2]'
      igzip/aarch64/encode_df.S:118: Error: ARM register expected -- `add code_and_extra,code_and_extra,31'
      igzip/aarch64/encode_df.S:119: Error: ARM register expected -- `ubfx x_dist_lit_table,x_dist_lit_table,10,9'
      igzip/aarch64/encode_df.S:120: Error: ARM register expected -- `add x_tmp0,hufftables,code_and_extra,lsl 2'
      igzip/aarch64/encode_df.S:121: Error: ARM register expected -- `ubfx x_dist_extra,x_dist_extra,3,13'
      igzip/aarch64/encode_df.S:122: Error: ARM register expected -- `lsl x_dist_lit_table,x_dist_lit_table,2'
      igzip/aarch64/encode_df.S:124: Error: ARM register expected -- `ldr w_code_and_extra,[hufftables,code_and_extra,lsl 2]'
      igzip/aarch64/encode_df.S:125: Error: ARM register expected -- `add x_d_extra_bit_count,hufftables,x_dist_lit_table'
      igzip/aarch64/encode_df.S:126: Error: ARM register expected -- `ldrb w_l_length,[x_tmp0,3]'
      igzip/aarch64/encode_df.S:127: Error: ARM register expected -- `and code_and_extra,code_and_extra,0xffffff'
      igzip/aarch64/encode_df.S:128: Error: ARM register expected -- `ldrh w_code_sum,[hufftables,x_dist_lit_table]'
      igzip/aarch64/encode_df.S:129: Error: ARM register expected -- `ldrb w_d_length,[x_d_extra_bit_count,3]'
      igzip/aarch64/encode_df.S:130: Error: ARM register expected -- `add w_l_length,w_l_length,bb_bit_count'
      igzip/aarch64/encode_df.S:131: Error: ARM register expected -- `ldrb w_d_extra_bit_count,[x_d_extra_bit_count,2]'
      igzip/aarch64/encode_df.S:133: Error: ARM register expected -- `lsl x_tmp0,code_and_extra,x_bb_bit_count'
      igzip/aarch64/encode_df.S:134: Error: ARM register expected -- `add bb_bit_count,w_d_length,w_l_length'
      igzip/aarch64/encode_df.S:135: Error: ARM register expected -- `lsl x_code_sum,x_code_sum,x_l_length'
      igzip/aarch64/encode_df.S:136: Error: ARM register expected -- `orr x_code_sum,x_code_sum,x_tmp0'
      igzip/aarch64/encode_df.S:137: Error: ARM register expected -- `add w_count_sum,w_d_extra_bit_count,bb_bit_count'
      igzip/aarch64/encode_df.S:138: Error: ARM register expected -- `lsl x_bb_bit_count,x_dist_extra,x_bb_bit_count'
      igzip/aarch64/encode_df.S:140: Error: ARM register expected -- `orr x_bb_bit_count,x_bb_bit_count,bb_bits'
      igzip/aarch64/encode_df.S:141: Error: ARM register expected -- `orr x_tmp0,x_code_sum,x_bb_bit_count'
      igzip/aarch64/encode_df.S:142: Error: ARM register expected -- `str x_tmp0,[bb,offset_m_bits]'
      igzip/aarch64/encode_df.S:143: Error: ARM register expected -- `str w_count_sum,[bb,offset_m_bit_count]'
      igzip/aarch64/encode_df.S:145: Error: ARM register expected -- `str x_tmp0,[bb_out_buf]'
      igzip/aarch64/encode_df.S:146: Error: ARM register expected -- `ldr bb_bit_count,[bb,offset_m_bit_count]'
      igzip/aarch64/encode_df.S:147: Error: ARM register expected -- `ldr bb_bits,[bb,offset_m_bits]'
      igzip/aarch64/encode_df.S:148: Error: ARM register expected -- `and w_tmp0,bb_bit_count,-8'
      igzip/aarch64/encode_df.S:149: Error: ARM register expected -- `ldr bb_out_buf,[bb,offset_m_out_buf]'
      igzip/aarch64/encode_df.S:150: Error: ARM register expected -- `lsr w_tmp1,bb_bit_count,3'
      igzip/aarch64/encode_df.S:151: Error: ARM register expected -- `lsr bb_bits,bb_bits,x_tmp0'
      igzip/aarch64/encode_df.S:152: Error: ARM register expected -- `sub bb_bit_count,bb_bit_count,w_tmp0'
      igzip/aarch64/encode_df.S:153: Error: ARM register expected -- `add bb_out_buf,bb_out_buf,x_tmp1'
      igzip/aarch64/encode_df.S:154: Error: ARM register expected -- `str bb_bits,[bb,offset_m_bits]'
      igzip/aarch64/encode_df.S:155: Error: ARM register expected -- `str bb_bit_count,[bb,offset_m_bit_count]'
      igzip/aarch64/encode_df.S:156: Error: ARM register expected -- `str bb_out_buf,[bb,offset_m_out_buf]'
      igzip/aarch64/encode_df.S:158: Error: ARM register expected -- `cmp end_in,next_in'
      igzip/aarch64/encode_df.S:162: Error: bad instruction `ret'
      make: *** [make.inc:245: bin/encode_df.o] Error 1
      make: *** Waiting for unfinished jobs....
      building 'isal.isal_zlib' extension
      creating build/temp.linux-aarch64-cpython-312
      creating build/temp.linux-aarch64-cpython-312/src
      creating build/temp.linux-aarch64-cpython-312/src/isal
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/tmp/tmp597bbi4g -I/srv/homeassistant312_2024_6/include -I/usr/local/include/python3.12 -c src/isal/isal_zlibmodule.c -o build/temp.linux-aarch64-cpython-312/src/isal/isal_zlibmodule.o
      src/isal/isal_zlibmodule.c: In function ‘ParallelCompress__new__’:
      src/isal/isal_zlibmodule.c:323:21: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]
        323 |     if (buffer_size > UINT32_MAX) {
            |                     ^
      src/isal/isal_zlibmodule.c: In function ‘ParallelCompress_compress_and_crc’:
      src/isal/isal_zlibmodule.c:399:30: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]
        399 |     if (data.len + zdict.len > UINT32_MAX) {
            |                              ^
      In file included from /usr/local/include/python3.12/Python.h:39,
                       from src/isal/isal_shared.h:23,
                       from src/isal/isal_zlibmodule.c:27:
      src/isal/isal_zlibmodule.c: In function ‘GzipReader_read_into_buffer’:
      /usr/local/include/python3.12/pymacro.h:27:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
         27 | #define Py_MIN(x, y) (((x) > (y)) ? (y) : (x))
            |                            ^
      src/isal/isal_zlibmodule.c:1756:44: note: in expansion of macro ‘Py_MIN’
       1756 |                     self->state.avail_in = Py_MIN((buffer_end -current_pos), UINT32_MAX);
            |                                            ^~~~~~
      /usr/local/include/python3.12/pymacro.h:27:43: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘unsigned int’ due to unsignedness of other operand [-Wsign-compare]
         27 | #define Py_MIN(x, y) (((x) > (y)) ? (y) : (x))
            |                                           ^~~
      src/isal/isal_zlibmodule.c:1756:44: note: in expansion of macro ‘Py_MIN’
       1756 |                     self->state.avail_in = Py_MIN((buffer_end -current_pos), UINT32_MAX);
            |                                            ^~~~~~
      gcc -shared build/temp.linux-aarch64-cpython-312/src/isal/isal_zlibmodule.o /tmp/tmp597bbi4g/bin/isa-l.a -o build/lib.linux-aarch64-cpython-312/isal/isal_zlib.cpython-312-arm-linux-gnueabihf.so
      /usr/bin/ld: cannot find /tmp/tmp597bbi4g/bin/isa-l.a: No such file or directory
      collect2: error: ld returned 1 exit status
      error: command '/usr/bin/gcc' 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 isal

@nageshshetty
Copy link

was able to install HA core but not able to run the setup or load the frontend. checking the error log it seems there is still some dependency on isal;
ERROR (MainThread) [homeassistant.setup] Setup failed for 'automation': Requirements for isal not found: ['isal==1.6.1'].

it has broken everything else (crying face!!). please help fellas!

@armin-gh
Copy link

armin-gh commented Jun 7, 2024

you might want to check #118996
there is still a dependency in the http-component
.lib/python3.12/site-packages/homeassistant/components/http/manifest.json in your venv
I had it removed and on startup it continued to install other dependencies.
Quick & Dirty of course, the issue will come back with subsequent updates

I had unrelated errors then and don't have time until Monday to look at them.

Recommentation: Always create a new venv and follow instructions for a new install, only shutdown the existing service prior to running the new version first time. If it breaks switch back to the old venv-Folder in the service.

If you already broke your installation: create a new venv and explicity install a working version of HA

@nageshshetty
Copy link

the new update 6.1 fixes the isal dependency so didnt had the chance for manual change. Thanks for the quick resolution!!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants