openDsh / dash

Join us on Slack! https://join.slack.com/t/opendsh/shared_invite/zt-la398uly-a6eMH5ttEQhbtE6asVKx4Q
GNU General Public License v3.0
238 stars 69 forks source link

Support for Ubuntu 22.04 #127

Open kbader94 opened 2 years ago

kbader94 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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 commented 3 months ago

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 commented 2 months ago

Did the fixes still doesnt install.

rsjudka commented 1 month ago

@Jeeshie what errors are you seeing with the install?