PiBrewing / craftbeerpi4

GNU General Public License v3.0
58 stars 28 forks source link

potential issue with latest release and armv6 devices (Pi Zero W) -> Illegal Instruction #108

Closed avollkopf closed 1 year ago

avollkopf commented 1 year ago

There seems to be a potential issue with older armv6 based systems and the latest releases of craftbeerpi4. User @dimontau has reported this issue here.

The issue must be related to the required upgrade of the cryptography package to package versions > 39.0.1 due to security issues

Not sure if there is already a fix for these systems, but I will change the dependency for the development branch to cryptography 40.0.1 as there seems to be some fix for 32 bit systems. However, I am not able to test it myself

dimontau commented 1 year ago

Tried today's update. Everything remains the same. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Apr 5 15:21:40 2023 from 192.168.1.100 pi@raspberrypi:~ $ sudo cbpi start Illegal instruction

avollkopf commented 1 year ago

@dimontau ok. Then cryptography is most likely breaking it. You could clone the current repo

´git clone https://github.com/PiBrewing/craftbeerpi4´

then navigate into the directory

cd craftbeerpi4

Afterward, you can checkout the branch you want:

git checkout development to checkout the development branch

then you can edit the setup.py file and change

"cryptography==40.0.0" to "cryptography==36.0.1"

navigate on directory up:

cd ..

and install cbpi directly from the path:

sudo pip install ./craftbeerpi4

The other option is to revert back to 4.1.6.

The only thing I can offer later is the creation of an obsolete branch including the old cryptography package with the next merge into the main branch. But I am not planning any future releases with older versions of the cryptography dependency, nor the update of the potential obsolete branch.

avollkopf commented 1 year ago

@dimontau not sure, if this will help, but on 64 bit systems there is a different issue after cryptography upgrade which can be solved: https://openbrewing.gitbook.io/craftbeerpi4_support/readme/troubleshooting/cryptography_update.

Not sure, if this will help... Bit I fear, they only way is mentioned in my message before.

dimontau commented 1 year ago

I haven't been able to verify this yet. For some reason, there is a problem with connecting to the Raspberry servers. As soon as I try it, I will write about the result.

dimontau commented 1 year ago

Greetings. I finally got it working according to your instructions. Will I be able to solve this problem with new updates in the future as well?

avollkopf commented 1 year ago

Greetings. I finally got it working according to your instructions. Will I be able to solve this problem with new updates in the future as well?

Ok, this is good. With respect to future versions, it'll get more unlikely that it can be solved as other dependencies may require the latest cryptography version in future (e.g. aiohttp). Not sure if the cryptography coders can solve this. If not, a pi zero 2 should be working as the quad core upgrade should be comparable to the pi3/4 in terms of the os requirements

avollkopf commented 1 year ago

It is probably more an issue in pywheels when they build the package.

dimontau commented 1 year ago

Hello, Alexander. Off topic, but I don't know where else to post. Can you help me redesign the cbpi4-Flowmeter plugin? I don't know python myself. I constantly have an error with the volume of water, since the speed of the water is not constant. Is it possible to change the code or add to the code the ability to calculate the volume of water by the number of pulses per liter, and not by frequency? The documentation says that there are 450 pulses per liter. Well, so that you can change the number of pulses in the settings. The author of the plugin does not get in touch. I tried this with an arduino. It turns out high accuracy to measure the amount of water, regardless of the flow rate.

avollkopf commented 1 year ago

@dimontau I have referenced it in the corresponding plugin where it belongs to. It is not recommended to 'hijack' a different issue.

avollkopf commented 1 year ago

added info to changes and troubleshooting