You are not logged in.

#1 2022-11-26 14:07:00

stripwax
Member
Registered: 2022-01-22
Posts: 7

python-orjson out of date - homeassistant installation failure

Posting an observation, maybe already known? python3.10 is the current version of python, but python-orjson package is quite old 3.0.0 and installs to python3.8 site-packages. As a result, home-assistant installs but then fails to find orjson at runtime (since running under python3.10, and won't find any packages installed to python3.8 site-packages)


But I also gather this isn't supposed to happen (that's why there are the python-xyz packages instead of pip) so I'm not sure what's gone wrong, but I think this was a clean install and problem not caused by something I've done.

Happy to help try and fix, might need a bit of a pointer to understand whether this might be small/easy or huge/large. If install dependencies are wrong for python-orjson what else might be implicated in the scope or other stuff that also needs fixing..?

At a guess, need to repackage based on newest upstream, and also fix install dependencies (python-orjson depends on latest python)?

Offline

#2 2022-11-26 14:36:06

stripwax
Member
Registered: 2022-01-22
Posts: 7

Re: python-orjson out of date - homeassistant installation failure

Actually, I think I see part of the problem. I'm using pentium4, the last version is 3.0.0 for pentium4 arch, the recent versions haven't been packaged/released for pentium4 . So I guess I just need to understand why pacman didn't complain about unfulfilled dependencies when installing home-assistant/orjson on top of latest python3.10

Offline

#3 2022-11-26 15:02:38

stripwax
Member
Registered: 2022-01-22
Posts: 7

Re: python-orjson out of date - homeassistant installation failure

Assuming the answer starts with something like "use asp32 to get the package source", I'm probably stuck. Is asp32 still the correct tool, and is there some doc for configuration or typical errors? A quick Google finds one unresolved thread with the same error :-/

asp32 checkout python-orjson
fatal: unable to update url base from redirection:
  asked for: https://git.archlinux.org/svntogit/pack … pload-pack
   redirect: https://gitlab.archlinux.org/explore/groups
error: failed to update remote packages64

Offline

#4 2022-11-26 20:49:52

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: python-orjson out of date - homeassistant installation failure

Seems weird it's asking for a url that isn't related to the package name it's been asked to checkout, and doubly weird it's asking for a url that ends with service=git-upload-pack, given I'd expect a checkout to be a download rather than an upload, even hen it's 'updating the url base'.

And given if seems to want to clone a git repo, I'm not sure why you need to use asp32 at all, when you could just git clone instead.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#5 2022-11-27 09:05:46

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,032
Website

Re: python-orjson out of date - homeassistant installation failure

On the last python update most likely some packages got left behind because:
a) they were not rebuild
b) they cannot be rebuilt, so the old package is still around

python 3.10 cannot run with 3.8 packages, the fact that they got installed just
means you have non-running code which made it successfully to your harddisk. :-)

Offline

#6 2022-11-27 09:15:57

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,032
Website

Re: python-orjson out of date - homeassistant installation failure

I get:

maturin failed
  Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
  Caused by: `cargo metadata` exited with an error: cargo: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

So rust is broken and Python starts to depend more and more on Rust...

Offline

#7 2022-11-27 09:16:33

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,032
Website

Re: python-orjson out of date - homeassistant installation failure

rust, cargo needs a rebuilt because openssl 1.1 -> 3.0.7 and most likely because of other things too..

Offline

#8 2022-11-27 12:33:04

stripwax
Member
Registered: 2022-01-22
Posts: 7

Re: python-orjson out of date - homeassistant installation failure

@levi yes. I'm not sure if you're trying to hint that I'm doing the wrong thing and that asp32 is the wrong tool and I should go about this differently (in which case I would need a more specific hint please - how should I fix/contribute), or if you're confirming that asp32 doesn't work properly. If the latter, any suggestions? As mentioned I did see the same packages64 error in another thread, unresolved.

@abauman I don't think rust/cargo/ssl is related to the problem I encountered (see thread title). I guess you're just using the same thread to report an unrelated problem? If so could you start your own separate thread instead please.
And yes, I agree that the problem is that the package I need hasn't been updated for Python 3.10 - that's exactly what I am reporting - if you install it today it installs for 3.8 still. So that's clearly what needs to be fixed here.

I'd be surprised if it "cannot" be rebuilt, given that it has been rebuilt (for i686 only, not pentium4). If you can point me to specifically what you mean, I'll take a look and propose a fix.

Last edited by stripwax (2022-11-27 12:34:42)

Offline

#9 2022-11-28 07:57:44

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,032
Website

Re: python-orjson out of date - homeassistant installation failure

asp32 behaves like asp, see https://wiki.archlinux.org/title/Arch_Build_System

Eventually cleaning the cache in ~/.cache/asp32 helps, then

asp32 update
asp32 export community/python-orjson

Offline

#10 2022-11-28 10:40:49

stripwax
Member
Registered: 2022-01-22
Posts: 7

Re: python-orjson out of date - homeassistant installation failure

Understood. I had not previously used asp32 or asp, I installed it specifically for this, and it did not occur to me that might need to clean its cache to get it to work properly. I can try that later.

Offline

#11 2022-11-28 14:15:55

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,032
Website

Re: python-orjson out of date - homeassistant installation failure

There was a migration and some redirecting of git repos upstream, IIRC. :-)

About 'python-orjson': I tried yesterday to build it and was just one error message ahead, no problem.. ;-)

Offline

Board footer

Powered by FluxBB