wiedehopf / readsb

ADS-B decoder swiss knife
Other
341 stars 78 forks source link

Ubuntu 24.04 needs librtlsdr dependency bump #74

Closed BaloneyGeek closed 4 weeks ago

BaloneyGeek commented 2 months ago

Hi,

Ubuntu 24.04 calls the rtl-sdr library package librtlsdr2 instead of librtlsdr0. I was able to build the package fine by editing the control file locally and it runs flawlessly, so I guess it doesn't break source compatibility.

I'd submit a patch myself, but unfortunately I'm not sure how to support both package names with just one control file. Sorry about that :-(

Thanks, Boud

wiedehopf commented 2 months ago

Thought that was reverted to librtlsdr0 ... It is in debian: https://packages.debian.org/sid/libs/librtlsdr0

So i don't know what the F ubuntu is doing. I guess they went the same way for their dev branch but didn't change it back in 24.04? https://packages.ubuntu.com/search?keywords=librtlsdr

I'll leave this open ... but really it's not of concern to me. Solution: don't use Ubuntu.

wiedehopf commented 2 months ago

Or just use the containers on ubuntu ... https://sdr-enthusiasts.gitbook.io/ads-b

This version bump was a mistake and rolled back really. Especially because the API didn't change.

jprochazka commented 4 weeks ago

Came here because I noticed the same issue.

Ubuntu previously used librtlsdr0 because the package was being built against rtl-sdr version 0.6.0. They renamed it in Noble to librtlsdr2 because the package in Noble is now based on rtl-sdr version 2.0.1 code. I know what Ubuntu is doing not sure I understand why Debian would continue to label it as version 0 even though it is now using version 2 code as well. IMO they both should have named it librtlsdr if they were not planning on supporting two different versions at once.

The only two ways around this that I can think.

  1. Go the hard route and mimic FlightAware sensible-build.sh solution utilized in piaware_builder.
  2. Go the easier way replacing the librtlsdr0 dependencies with librtlsdr-dev.

It is hackish but using librtlsdr-dev will use an additional ~150kb to ~635kb of disk space for development files depending on the architecture but will fulfill the librtlsdr dependency on both distros.

wiedehopf commented 4 weeks ago

So ... this fixes the build for Ubuntu24 ... i gather people will manage to do this if they find this issue.

sed -i -e 's/librtlsdr0/librtlsdr2/g' debian/control
wiedehopf commented 4 weeks ago

Just as a note, the library version is usually only changed if the API changes. Because if the API doesn't change, there is no need to change that version number exactly because it breaks dependencies.

Osmocom realized their mistake and reverted the change. The issue is that Ubuntu did a release with this change which is very unfortunate.

jprochazka commented 4 weeks ago

Osmocom realized their mistake and reverted the change. The issue is that Ubuntu did a release with this change which is very unfortunate.

I see so they did set the soversion back to 0 instead of 2 in 2.0.2. It was 2 in v2.0.1 which was the version the Noble package was built against.

shawaj commented 4 weeks ago

Ran into this issue running against 24.04 on GitHub runner. But have reverted to 22.04 and all good.