radxa / apt

radxa debian packages repository
http://radxa.com/Rabian
35 stars 6 forks source link

Libmraa armhf version for bullseye #51

Closed shawaj closed 1 year ago

shawaj commented 1 year ago

Please can you build an armhf version of libmraa for Debian bullseye-stable?

shawaj commented 1 year ago

@RadxaStephen @hipboi @dev-radxa @StephenInVamRs

Can you help with this?

RadxaStephen commented 1 year ago

Sure. Please give me some time.

shawaj commented 1 year ago

Thanks very much @RadxaStephen that's great ☺️

shawaj commented 1 year ago

Any progress yet @RadxaStephen ?

shawaj commented 1 year ago

@RadxaStephen any update on this?

RadxaYuntian commented 1 year ago

@nascs is currently working on this.

shawaj commented 1 year ago

@nascs do you have a timeline when this will be ready?

nascs commented 1 year ago

Just tested, uart has some problems, and now I'm trying to fix it.

shawaj commented 1 year ago

Thanks @nascs πŸ‘

nascs commented 1 year ago

I have compiled a bullseye armhf debian package, but we don't have a Debian 11 image of armhf, so the test have not be done, I wonder if you could test it for us ?

RadxaStephen commented 1 year ago

@nascs

You can use rockchip-bsp to build one debian11 armhf image.

shawaj commented 1 year ago

@nascs @RadxaStephen is it added to the apt repo already?

If it's added I can test it

nascs commented 1 year ago

libmraa_1.9_armhf.zip

nascs commented 1 year ago

This deb package has not been tested yet, and I will compile an image of debian11 armhf for testing tomorrow , you can test it too, and if any errors , please let me know, thanks for your testing help.

shawaj commented 1 year ago

@nascs can you add it to the bullseye-testing? This is best way for us to test it

shawaj commented 1 year ago

@nascs @RadxaStephen any update?

nascs commented 1 year ago

we will update apt by this evening Beijing time.

shawaj commented 1 year ago

we will update apt by this evening Beijing time.

πŸ™ŒπŸ™

shawaj commented 1 year ago

@RadxaStephen @nascs it's not working properly.

It doesn't load / import into python...

212917040-126083d1-b83a-4af0-a45e-3227ff229ad8

See the code here: https://github.com/NebraLtd/hm-config/blob/master/gatewayconfig/gpio/mraa_gpio.py#L6-L10

Cc @KevinWassermann94

shawaj commented 1 year ago

I think it is because libmraa here - https://github.com/radxa/apt/blob/cac0e24f05a9982d3d67285822591ff117a26707/bullseye-stable/pool/main/libm/libmraa/libmraa_1.9_armhf.deb - is only built for python 2.7 and python 3.9. Not 3.11

shawaj commented 1 year ago

It also does not work with python3.9 the latest version. there is nothing installed in /usr/local/lib/python3.9/dist-packages

Not sure if this is also relevant:

Setting up libmraa (1.9) ...
sudo: unable to resolve host 6d181a5: No address associated with hostname
ldconfig: /lib/libmraa.so.2 is not a symbolic link

Processing triggers for mailcap (3.69) ...
Processing triggers for libc-bin (2.31-13+rpi1+deb11u3) ...
ldconfig: /lib/libmraa.so.2 is not a symbolic link
shawaj commented 1 year ago

@RadxaStephen @nascs it seems /lib/libmraa.so.2 and /lib/libmraa.so should be symbolic links of /lib/libmraa.so.2.1.0 rather than individual files

shawaj commented 1 year ago

@RadxaStephen @nascs I can confirm that if I pull the mraa.py and _mraa.so files out of the deb package in the repo and put them in /usr/local/lib/python3.9/dist-packages it works correctly.

So it looks like the package is just built wrong.

Can you sort this?

RadxaYuntian commented 1 year ago

I have checked that Debian bullseye ship Python 3.9 by default. How did you install Python 3.11 on your system?

Also, software packaged and shipped via apt repo is considered distro managed, and as such should not install to /usr/local path to not breaking Filesystem Hierarchy Standard.

shawaj commented 1 year ago

@RadxaYuntian by default Balena install the latest python version. So need it to support 3.9 and 3.11

Your current packages do not install correctly. Perhaps it is because of the previous point:

libmraa.so.2 and libmraa.so should be symbolic links not files

Also on your buster-stable package it does install to /usr/local/lib/python3.7/dist-packages

nascs commented 1 year ago

It will be handled today.

RadxaYuntian commented 1 year ago

@floion How do you guys support custom python libraries in your system? Right now we are bending backwards to support a downstream usage, which feels very awkward since we don't even have any armhf images or build infrastructure.

I have asked nascs to be on hold until we know how Balena deals with this type of problems.

shawaj commented 1 year ago

@RadxaYuntian it is sufficient to just do the standard python 3.9 build as we can use venv for that.

But we still need the other parts fixing.

@nascs can you still sort this today?

It is very urgent now

RadxaStephen commented 1 year ago

@shawaj

Debian11 armhf libmraa (2.0) is released. Python version is 2.7/3.9.

I test the following commands on ROCK Pi 4B Debian11 Armhf image. And they run without error.

mraa-gpio version
Version v2.1.0-25-gf854463 on ROCK Pi 4

mraa-gpio list

Can you test it?

RadxaStephen commented 1 year ago

For your need of python3.11, you can built mraa on your device.

Please refer to this guide, https://wiki.radxa.com/Mraa. And see this part, "Install example: Install Mraa on ROCK Pi 4B Debian11 armhf system".

shawaj commented 1 year ago

@RadxaStephen thanks very much.

@KevinWassermann94 @NebraLtd/tech-support I've pushed this to testnet now. It looks like it is working to me but could you test was well to check it on your side?

shawaj commented 1 year ago

Cc @WayneNebra ^^

KevinWassermann94 commented 1 year ago

@shawaj Looks fine to me!

shawaj commented 1 year ago

@RadxaStephen @RadxaYuntian @nascs thanks for your help, it's working now :-)