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

Support for Ubuntu 22.04 #127

Closed
kbader94 opened this issue Jun 12, 2022 · 5 comments · Fixed by #165
Closed

Support for Ubuntu 22.04 #127

kbader94 opened this issue Jun 12, 2022 · 5 comments · Fixed by #165

Comments

@kbader94
Copy link

Issue

Some changes are required to make this work with Ubuntu 22.04 on RPI. I've successfully hacked some things together to get it to work successfully, but I'd appreciate some advice from @rsjudka and @icecube45 as to the best way to actually implement these changes to avoid regressions.

First Issue - Install script line 25 doesn't detect debian version properly.
On Ubuntu 22.04 /etc/debian_version simply contains "bookworm/sid" which breaks the install script as it doesn't properly read the version number, and therefore doesn't detect the changes needed in bullseye where qt5-default is missing from the repos. I'm not sure if there's a more universal approach to detecting the version so I think maybe searching the repos with apt-cache search --names-only 'qt5-default' and then adding the depencency if it's available may be a better approach?

Second Issue - aasdk/src/Transport.SSLWrapper.cpp - set_FIPS_mode(0);
Ubuntu 22.04 uses Openssl 3.0, which has removed the set_FIPS_mode() function. I've simply commented this line out, which I typically wouldn't feel comfortable doing, however this particular use is in a destructor so I don't think it breaks anything. Aasdk doesn't appear to set the fips mode anywhere else so I think this may be an acceptable fix.

Third Issue - qt-gstreamer fails to build
Ubuntu 22.04 uses libc 11 by default, which doesn't allow the second parameter of ‘__atomic_load’ to be volatile.
The fix I've used is to simply remove the volatile keyword from:
qt-gstreamer/elements/gstqtvideosink/gstqtvideosingplugin.h line 30
This could be implmented in another patch for qt-gstreamer.

Fourth Issue - The dreaded whitescreen of death
For some reason the "avdec_h264 " in openauto/openauto/Projection/GSTVideoOutput.cpp - line 61 doesn't work on Ubuntu 22.04. It's possible that it's missing from this distro version. I'm not sure of the best way to fix this without causing regressions but I do know how to make it work specifically for ubuntu 22.04. What I did was run "gst-inspect-1.0 | grep 264" and chose a decoder from the output. I used openh264dec, however I've noticed that v4l2h264dec is also a valid option here.
I think a possible solution would be to change the install script to basically do what I've done, run the gst-inspect-1.0 command and select the h264 decoder according to what's available on the system, instead of relying on the rpi define and then defaulting to avdec_h264 as it currently does. I'm not sure of the best way to pass this info to gstreamer. One option is to add some more defines for the specific decoders detected in the install script and defined in cmakelists, and use those to select the decoder in gstreamer, similar to what's already being done. Maybe there's a better decoder to default to? Some input here would definitely be appreciated.

@rsjudka
Copy link
Contributor

rsjudka commented Jun 13, 2022

thanks for going through these! im definitely noticing as various things gets updated its getting more and more difficult to get everything stable 🙃 fun times

ill try to think on this a bit... maybe have some way we can little "module" scripts depending on what versions of things youre using? @icecube45 i know youre currently working on the install scripts now if you nothing anything else "broken" with them feel free to mention them here as well!

@icecube45
Copy link
Member

Yea I like the idea of reworking the install script to be more modular.. if we do it right it would lend itself to pregenned images very well. I'm going to prioritize completing my install script update so that we have something functional in the repo for most use cases (raspbian), but I'll think about this after.

@eyeball29
Copy link

I'm using Raspberry Pi 64bit OS and have noted that I need to use the second and third issue fixes above to get everything to install. I was going to update my own fork, but realized those two items pertain to separate repos.

I'm still seeing this at the end but it does not seem to affect functionality yet:
/usr/bin/raspi-config: 3069: do_memory_split: not found Setting memory failed with error code 1 please set manually
Can open another issue, but thought it might be relevant here.

@Jeeshie
Copy link

Jeeshie commented Apr 29, 2024

Did the fixes still doesnt install.

@rsjudka
Copy link
Contributor

rsjudka commented May 2, 2024

@Jeeshie what errors are you seeing with the install?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants