tsunghanliu / adsb-box.snap

a snap to build a ADS-B receiver station
29 stars 4 forks source link

error while loading shared libraries: librtlsdr.so.0: wrong ELF class: ELFCLASS64 #13

Closed satmandu closed 4 years ago

satmandu commented 5 years ago

Running adsb-box on arm64 rpi4 host.

Oct 31 13:37:16 rpi4 systemd[1]: Stopped Service for snap application adsb-box.rbfeeder.
Oct 31 13:37:16 rpi4 systemd[1]: Started Service for snap application adsb-box.rbfeeder.
Oct 31 13:37:16 rpi4 adsb-box.rbfeeder[23654]: + BIN=/snap/adsb-box/188/usr/bin/rbfeeder
Oct 31 13:37:16 rpi4 adsb-box.rbfeeder[23654]: + '[' '!' -f /snap/adsb-box/188/usr/bin/rbfeeder ']'
Oct 31 13:37:16 rpi4 adsb-box.rbfeeder[23654]: + sleep 3
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: + WORKDIR=/var/snap/adsb-box/188/rbfeeder
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: + RBFEEDER_INI=/var/snap/adsb-box/188/rbfeeder/rbfeeder.ini
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: + '[' '!' -d /var/snap/adsb-box/188/rbfeeder ']'
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: + '[' '!' -d /run/snap.adsb-box ']'
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: + '[' '!' -f /var/snap/adsb-box/188/rbfeeder/rbfeeder.ini ']'
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: + /snap/adsb-box/188/usr/bin/rbfeeder --config /var/snap/adsb-box/188/rbfeeder/rbfeeder.ini
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: ERROR: ld.so: object '/snap/adsb-box/188/lib/libsnapcraft-preload.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23654]: /snap/adsb-box/188/usr/bin/rbfeeder: error while loading shared libraries: librtlsdr.so.0: wrong ELF class: ELFCLASS64
Oct 31 13:37:19 rpi4 systemd[1]: snap.adsb-box.rbfeeder.service: Main process exited, code=exited, status=127/n/a
Oct 31 13:37:19 rpi4 systemd[1]: snap.adsb-box.rbfeeder.service: Failed with result 'exit-code'.
Oct 31 13:37:19 rpi4 systemd[1]: snap.adsb-box.rbfeeder.service: Service RestartSec=100ms expired, scheduling restart.
Oct 31 13:37:19 rpi4 systemd[1]: snap.adsb-box.rbfeeder.service: Scheduled restart job, restart counter is at 2438.
Oct 31 13:37:19 rpi4 systemd[1]: Stopped Service for snap application adsb-box.rbfeeder.
Oct 31 13:37:19 rpi4 systemd[1]: Started Service for snap application adsb-box.rbfeeder.
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23708]: + BIN=/snap/adsb-box/188/usr/bin/rbfeeder
Oct 31 13:37:19 rpi4 adsb-box.rbfeeder[23708]: + '[' '!' -f /snap/adsb-box/188/usr/bin/rbfeeder ']'
uname -a
Linux rpi4 5.3.7-v8-gc37c8efdd #1 SMP Wed Oct 30 19:23:41 EDT 2019 aarch64 aarch64 aarch64 GNU/Linux
file /snap/adsb-box/188/usr/bin/rbfeeder
/snap/adsb-box/188/usr/bin/rbfeeder: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=80fbbd2374e6923d7fbe1057e7ffd45333b1d61e, stripped
file /snap/adsb-box/188/lib/libsnapcraft-preload.so
/snap/adsb-box/188/lib/libsnapcraft-preload.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=44d7ee899d3d579212c6e91db3827bfd2a69f4ae, not stripped
file /snap/adsb-box/188/usr/lib/aarch64-linux-gnu/librtlsdr.so.0
/snap/adsb-box/188/usr/lib/aarch64-linux-gnu/librtlsdr.so.0: symbolic link to librtlsdr.so.0.5.3
file /snap/adsb-box/188/usr/lib/aarch64-linux-gnu/librtlsdr.so.0.5.3
/snap/adsb-box/188/usr/lib/aarch64-linux-gnu/librtlsdr.so.0.5.3: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=77a427393f781b731f561efa9d4a35f1dab7242b, stripped
tsunghanliu commented 5 years ago

@satmandu Thanks for reporting the issue, I'll investigate it soon and update here.

tsunghanliu commented 5 years ago

It seems some libraries for armhf are missing. I'll check if this issue can be resolved by adding the missing libraries.

tsunghanliu commented 4 years ago

Hi @satmandu,

On Arm64 platform, there are some Armhf libraries missing and libsnapcraft-preload should be armhf format as well. I've created a test build to verify the solution. I can see the rbfeeder started correctly, but I don't have a spare dongle to verify the whole flow. Could you please give it a try? Thanks.

satmandu commented 4 years ago

I'm no longer seeing errors after installing the test build.