allsky: [BUG] Allsky fixes for Bookworm

Environment

  • Camera: ASI178MC
  • OS: Raspbian 12
  • Allsky version: v2023.05.01_03
  • Pi 4B with 8GB RAM

Bug Description

Unable to build src/ directory due to FPU error:

Building capture_ZWO.o ...
cc1plus: error: '-mfloat-abi=hard': selected architecture lacks an FPU
make: *** [Makefile:131: capture_ZWO.o] Error

Log / configuration files

make_all.log

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 84 (3 by maintainers)

Most upvoted comments

@Alex-developer I have a fresh 32bit bookworm lite I’ve just installed, only to find out I cannot pip any 3rd party pythhon libraries any more.

Whilst I try and get my head round that, I’ll be happy to test your new bookworm-proof allsky! I have nothing to lose if there are any issues.

Will it be put into the dev branch?

One thing I would suggest in general, is can the installer run without having to plug in a camera? If so, I personally would prefer that, as I often bring the test pi indoors, leaving the camera outside.

The Point-Release-4 has changes for Bookworm - Please bear in mind that this is NOT fully tested yet. I have installed it on a few Pi’s and it installs ok, there is a dev branch for the extra modules that also supports Bookworm

Once you have the new version to add any new python modules you will need to put them in the venv so something like

source /home/pi/allsky/venv/bin/activate

pip3 whatever module

deactivate

I’ll leave @EricClaeys to answer the question about the camera as thats his area really.

Cheers

Alex

I had a small problem with the latitude and longitude in controller.js.

In install.sh, line 1596 or 1601 states as an example that you can specify the direction of the compass without spaces after the number N or S (e.g., 20.1S).

In controller.js (lines 221, 223,254 and 256), in the case of a string, 2 characters are removed from the end in the conversion functions sc.latitude = lat.substr(0, len-2) * 1;

Either you have to specify a space in configuration.json during installation or you change the code in the conversion functions to ...len-1...

Just trying out this branch on a new Bookworm OS Lite (64bit install). (On an RPi 4)

No problems with the install script, but switching over to the overlay module didn’t work. The legacy overlay disappeared as expected, but the overlay module text wasn’t added to the image.

Looks like the problem was a missing library, as the log file showed the following at every capture

2023-11-19T14:52:44.026676+00:00 allsky allsky[921]: STARTING EXPOSURE at: 2023-11-19 14:52:44   @ 80.22 ms (0.08 sec)
2023-11-19T14:52:47.718795+00:00 allsky allsky[2062]: Traceback (most recent call last):
2023-11-19T14:52:47.719255+00:00 allsky allsky[2062]:   File "/home/iain/allsky/scripts/flow-runner.py", line 53, in <module>
2023-11-19T14:52:47.719519+00:00 allsky allsky[2062]:     import allsky_shared as shared
2023-11-19T14:52:47.719748+00:00 allsky allsky[2062]:   File "/home/iain/allsky/scripts/modules/allsky_shared.py", line 21, in <module>
2023-11-19T14:52:47.719864+00:00 allsky allsky[2062]:     import board
2023-11-19T14:52:47.719952+00:00 allsky allsky[2062]:   File "/home/iain/allsky/venv/lib/python3.11/site-packages/board.py", line 45, in <module>
2023-11-19T14:52:47.720042+00:00 allsky allsky[2062]:     from adafruit_blinka.board.raspberrypi.raspi_4b import *
2023-11-19T14:52:47.720124+00:00 allsky allsky[2062]:   File "/home/iain/allsky/venv/lib/python3.11/site-packages/adafruit_blinka/board/raspberrypi/raspi_4b.py", line 6, in <module>
2023-11-19T14:52:47.720200+00:00 allsky allsky[2062]:     from adafruit_blinka.microcontroller.bcm2711 import pin
2023-11-19T14:52:47.720411+00:00 allsky allsky[2062]:   File "/home/iain/allsky/venv/lib/python3.11/site-packages/adafruit_blinka/microcontroller/bcm2711/pin.py", line 5, in <module>
2023-11-19T14:52:47.720546+00:00 allsky allsky[2062]:     from RPi import GPIO
2023-11-19T14:52:47.720634+00:00 allsky allsky[2062]: ModuleNotFoundError: No module named 'RPi'
2023-11-19T14:53:15.306784+00:00 allsky allsky[921]: STARTING EXPOSURE at: 2023-11-19 14:53:15   @ 68.50 ms (0.07 sec)

After manually adding RPi.GPIO via the following, all then worked as expected, overlays started appearing and the errors stopped.

iain@allsky:~ $ source ~/allsky/venv/bin/activate
(venv) iain@allsky:~ $ pip3 install RPi.GPIO
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.1.tar.gz (29 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: RPi.GPIO
  DEPRECATION: RPi.GPIO is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for RPi.GPIO ... done
Successfully installed RPi.GPIO-0.7.1
(venv) iain@allsky:~ $ deactivate

Camera is a ZWO device in case that affects any paths the installer may take.

Hope this helps Iain

I have just installed pR4 on Bookworm and tested the basic GPIO functions using a DHT22 and a relay - All works fine. If you can could you reinstall Allsky, preferably on a clean card? To get PR4 to install you will need to remove the ‘exit’ command towards the top of the install.sh script

I have not had chance to test the pi5 yet but will do so over the next few days

@duckend, I fixed this in Point Release 4 (which is NOT ready to be used yet). To fix, replace all occurrences of REMOTE_DIR with DIRECTORY. There are about 10. Thanks again.

Hello,

I installed Allsky on a Pi5 64bit Bookworm (Camera = RPiHQ). The WebUI and the website work at first glance. But I haven’t finished everything yet so that everything runs like my year-old system with 32bit Bullseye and the Pi4.

The allsky.log states that libgpiod cannot be loaded, which is not surprising since the GPIOS work completely differently on a Pi5. https://blog.adafruit.com/2023/10/26/comparing-libgpiod-and-gpiozero-speeds-on-the-raspberry-pi-5/

It would be great if the installation script recognized the Pi5 and installed the correct settings for the GPIOs. Would it be possible? Until then, can I manually install the correct libraries for the Pi5?

Thanks for an answer

CS Andreas

Andreas

I am looking at this now. Unfortunately its not just a case of using different libraries as the pi5 has a whole new architecture around the RP1, as you mentioned.

I am going to convert all of the code to use the c libgpiod python bindings as its going to be far easier, at least I think it will !!!

I just need to confirm that all versions of the pi prior to the 5 use /dev/gpiochip0 for gpio access, the pi 5 use s/dev/gpiochip4

Cheers

Alex

@Adler6907, Andreas, I believe @Alex-developer is aware of the libgpiod issue and is using his Pi 5 to try and resolve it.

Ok, am writing a fresh PiOS Bookworm Lite 32Bit now, then will try to install allsky before I touch anything else!

Can you explain more why it would be beneficial to not require it to be plugged in during installation? I can’t think of any use case for that.

@EricClaeys I have 2 systems, 1 outside on the roof with the Pi being relatively inaccessible - this is running an older Allsky that I only update when I’m happy to.

The other PI is in the ROR shed, over PoE, with a fixed camera. Quite often I need to power down the PI and bring it in as I don’t have remote power on it yet. As it’s a test PI, I often bring it in to write a new OS and bringing in the camera too is not sensible for me.

@Alex-developer

I’ve tried your suggestions, ran the installation script (with env at the prompt) and I have this as a result:

(env) pi@rorpi:~ $ cd allsky (env) pi@rorpi:~/allsky $ ./install.sh

  • STARTING INSTALLATON AT Sat 21 Oct 14:34:34 BST 2023.

*** Welcome to the Allsky Installer! ***

  • ZWO camera found.
  • Using ZWO camera.
  • Size of current swap (100 MB) is sufficient; no change needed. mount: (hint) your fstab has been modified, but systemd still uses the old version; use ‘systemctl daemon-reload’ to reload.
  • /home/pi/allsky/tmp is now in memory.

*** NOTICE:

The following steps can take up to an hour depending on the speed of your Pi and how many of the necessary dependencies are already installed. You will see progress messages throughout the process. At the end you will be prompted again for additional steps.

  • Installing the web server.
  • Installing dependencies.
  • Preparing Allsky commands.

*** ERROR:

Compile failed

  • The full log file is in /home/pi/allsky/config/installation_logs/make_all.log The end of the file is: Building capture_ZWO.o … cc1plus: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU make[1]: *** [Makefile:131: capture_ZWO.o] Error 1 make[1]: Leaving directory ‘/home/pi/allsky/src’ make: *** [Makefile:24: all] Error 2
  • ENDING INSTALLATON AT Sat 21 Oct 14:38:40 BST 2023.

It’s worth noting that I installed the lite version of bookworm as I have no need for the desktop environment. I had to install python-full (1st ‘huh?’ moment), git wasn’t recognised as a command and am still nonethewiser how to install ‘3rd party’ python packages in a venv, but I’ll do some reading.

Is the lite version causing these issues? (Missing packages and “cc1plus: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU”)

I’ve looked up that message and there are a lot of results, some pre-bookworm by the looks of it.

The pi is a 4B 8GB and I’m running the os from an m.2/usb3 combo.

Allsky logs attached.

lighttpd.install.log make_all.log make_deps.log install.sh.log status.txt

I think you are still using the master branch try the following on a clean install of Bookworm (Doesn’t matter which one, the git install is ONLY required for the lite versions but won’t hurt to run it on a desktop version)

sudo apt install git git clone https://github.com/thomasjacquin/allsky.git cd allsky git checkout Point-Release-4 ./install.sh

There is now a check in the master branch that will warn you ig you are trying to install on Bookworm

On the git clone ... command line, add --branch Point-Release-4. Keep in mind we have not tested it as a release, although the updates have been tested by themselves.

Just a quick update.

I have a version that now runs on Bookworm. Next stage is to get it tested fully then we can think about releasing it

Alex