Closed hreuver0183 closed 4 years ago
Extra information.
On Ubuntu 18.04:
odroidn2:~$ .local/bin/oeserverd -a
oeserverd Version 1.17
odroidn2:~$ .local/bin/oeserverd -s
1
odroidn2:~$ ldd .local/bin/oeserverd
.local/bin/oeserverd:
linux-vdso.so.1 (0x0000007fab470000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fab3d0000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fab3bb000)
libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007fab227000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007fab203000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fab0aa000)
/lib/ld-linux-aarch64.so.1 (0x0000007fab445000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007faaff0000)
On Ubuntu 20.04:
odroidc4:~$ /usr/bin/oeserverd-arm64 -a
oeserverd Version 1.17
odroidc4:~$ /usr/bin/oeserverd-arm64 -s
0
odroidc4:~$ ldd /usr/bin/oeserverd-arm64
/usr/bin/oeserverd-arm64:
linux-vdso.so.1 (0x0000ffff9b132000)
/usr/lib/libgbm-compat.so (0x0000ffff9b0ca000)
/usr/lib/aarch64-linux-gnu/libmali.so (0x0000ffff99efe000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff99eb9000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff99ea5000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff99cc3000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff99c9e000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff99b2d000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff9b102000)
libgbm.so.1 => /lib/aarch64-linux-gnu/libgbm.so.1 (0x0000ffff99b0e000)
libwayland-server.so.0 => /lib/aarch64-linux-gnu/libwayland-server.so.0 (0x0000ffff99aea000)
libdrm.so.2 => /lib/aarch64-linux-gnu/libdrm.so.2 (0x0000ffff99ac7000)
libwayland-client.so.0 => /lib/aarch64-linux-gnu/libwayland-client.so.0 (0x0000ffff99aa8000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff999fd000)
libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000ffff999c6000)
libffi.so.7 => /lib/aarch64-linux-gnu/libffi.so.7 (0x0000ffff999ad000)
Since both github and pluginmanagers use binary versions of oeserverd and libsglock I don't think the problem lies in my github compile.
First point: Where did you get Ubuntu 20.04 (focal) for arm64?
2 sources. I prefer using the official RPI4 Ubuntu 20.04 as reference. (Other is some non-official odroid port, which indeed means I will post some other output).
opencpn@raspi4-4-64:~$ cat /proc/version
Linux version 5.4.0-1012-raspi (buildd@bos02-arm64-033) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #12-Ubuntu SMP Wed May 27 04:08:35 UTC 2020
opencpn@raspi4-4-64:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
opencpn@raspi4-4-64:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1547:1000 SG Intec Ltd & Co KG SG-Lock[U2]
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
opencpn@raspi4-4-64:~$ cat /etc/udev/rules.d/98-sglock.rules
ATTRS{idVendor}=="1547", ATTRS{idProduct}=="1000", MODE="666"
opencpn@raspi4-4-64:~$ /usr/bin/oeserverd-arm64 -a
oeserverd Version 1.17
opencpn@raspi4-4-64:~$ /usr/bin/oeserverd-arm64 -s
0
opencpn@raspi4-4-64:~$ ldd /usr/bin/oeserverd-arm64
linux-vdso.so.1 (0x0000ffffb082d000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffb0790000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffffb077c000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffffb059a000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffffb0575000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffb0404000)
/lib/ld-linux-aarch64.so.1 (0x0000ffffb07fd000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffffb0359000)
The complete strace:
opencpn@raspi4-4-64:~$ strace oeserverd-arm64 -s
execve("/usr/bin/oeserverd-arm64", ["oeserverd-arm64", "-s"], 0xffffd9c38778 /* 23 vars */) = 0
brk(NULL) = 0xaaaacabeb000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=93943, ...}) = 0
mmap(NULL, 93943, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffffbdbc4000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\240p\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=158008, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbdc08000
mmap(NULL, 193512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffbdb94000
mprotect(0xffffbdbae000, 65536, PROT_NONE) = 0
mmap(0xffffbdbbe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0xffffbdbbe000
mmap(0xffffbdbc0000, 13288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffbdbc0000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14528, ...}) = 0
mmap(NULL, 78080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffbdb80000
mprotect(0xffffbdb83000, 61440, PROT_NONE) = 0
mmap(0xffffbdb92000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xffffbdb92000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\240\247\t\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1895712, ...}) = 0
mmap(NULL, 1971880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffbd99e000
mprotect(0xffffbdb5f000, 65536, PROT_NONE) = 0
mmap(0xffffbdb6f000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c1000) = 0xffffbdb6f000
mmap(0xffffbdb7d000, 9896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffbdb7d000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\320)\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=84296, ...}) = 0
mmap(NULL, 148568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffbd979000
mprotect(0xffffbd98c000, 65536, PROT_NONE) = 0
mmap(0xffffbd99c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0xffffbd99c000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\350A\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1441800, ...}) = 0
mmap(NULL, 1510480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffbd808000
mprotect(0xffffbd961000, 61440, PROT_NONE) = 0
mmap(0xffffbd970000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158000) = 0xffffbd970000
mmap(0xffffbd976000, 11344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffbd976000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\300\333\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=633800, ...}) = 0
mmap(NULL, 696440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffbd75d000
mprotect(0xffffbd7f6000, 65536, PROT_NONE) = 0
mmap(0xffffbd806000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x99000) = 0xffffbd806000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbdc06000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbdc04000
mprotect(0xffffbd970000, 12288, PROT_READ) = 0
mprotect(0xffffbd806000, 4096, PROT_READ) = 0
mprotect(0xffffbd99c000, 4096, PROT_READ) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbdc02000
mprotect(0xffffbdb6f000, 45056, PROT_READ) = 0
mprotect(0xffffbdb92000, 4096, PROT_READ) = 0
mprotect(0xffffbdbbe000, 4096, PROT_READ) = 0
mprotect(0xaaaab2f5c000, 4096, PROT_READ) = 0
mprotect(0xffffbdc0c000, 4096, PROT_READ) = 0
munmap(0xffffbdbc4000, 93943) = 0
set_tid_address(0xffffbdc040e0) = 5814
set_robust_list(0xffffbdc040f0, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0xffffbdb9ab28, sa_mask=[], sa_flags=SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0xffffbdb9abe8, sa_mask=[], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL) = 0xaaaacabeb000
brk(0xaaaacac0c000) = 0xaaaacac0c000
futex(0xffffbdb7d708, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0xffffbdb7d70c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xffffbdc040e0) = 5815
wait4(-1, 0
NULL, 0, NULL) = 5815
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5815, si_uid=1001, si_status=0, si_utime=0, si_stime=0} ---
ptrace(PTRACE_CONT, 5815, NULL, 0) = -1 ESRCH (No such process)
exit_group(0) = ?
+++ exited with 0 +++
`
I tried to make it readable since the opload of the scripted output did not work. Hope it helps somehow.
@hreuver0183 ... I really want to find out if this is an experiment, or is this a viable beginning user configuration. Makes a difference how I prioritize the investigation.
First: So, I guess you are using the rPI Imager to download the Ubuntu 20.04?
Second point: Where does oesenc come from? We do not build managed plugin for arm64/20.04. Are you building locally?
Ubuntu 20.04 Focal and Bullseye are not ready for navigation yet. You see the same problems with GTK3 you see on x86_64 on arm64.
In my opinion early adapters should stick to Buster/arm64 or Bionic/arm64 for 2020 with the 5.2 release of OpenCPN. The release of OpenCPN 5.2 should be first priority.
I think the USB key dongle for ubuntu 20.04/arm64 should be made to work after, say, oktober-november 2020.
An "OpenPlotter"-like system should be based on Debian Stable in april or the Ubuntu LTS version of the previous year. And in 2021 both will be Bullseye-based. Therefore the Ubuntu 20.04/arm64 version of OpenCPN should be ready around the beginning of next season.
The second reason is Ubuntu 20.04 is the first official supported version for the Raspberry Pi. And many other arm64 systems are ported to Ubuntu 20.04 as well.
As for my RPI4, it is just a reference testing system. My navigation computer is the Odroid N2 (Ubuntu 18.04 this year, perhaps Ubuntu 20.04 next).
Currently Ubuntu 18.04 runs almost completely on plugins from the plugin-manager. Ubuntu 20.04 runs completely on local built plugins. The binary driver oeserverd fails, the (locally built) oesenc wrapper works.
After upgrading to oesenc_4.2.14 and reinstalling libusb-0.1 and libusb-1.0 and upgrading to OpenCPN-5.2.0 it worked. The udev rule for the USB key dongle was already available (it also got installed with the github version of oesenc_pi). (Libusb has been mentioned in the 5.1.xxx beta threat in CF). Since the libsglarm64 and the oeserverd have not changed since june I must have forgotten one step somewhere.
I thought I had tested the situation thoroughly. My apologies.
Tested on :
With Armbian the libwxgtk3.0-gtk3-0v5 is not available but the libwxgtk3.0-gtk3-0v5 is. Looks like it is really something in between bionic and focal. I used the opencpn bionic version there.
The issue: The SG lock has been ported to Ubuntu 18.04 (bionic) which is essentially the same as RaspiOS Buster. The oesenc_pi 4.2.12 can be downloaded from the pluginmanager and it works like it should.
For ARM64 on Ubuntu 20.04 however it does not work (focal/bullseye).
On the Pi4 with ubuntu 20.04:
$ oeserverd-armhf -a
oeserverd Version 1.14
$ oeserverd-armhf -s
1
$ oeserverd-arm64 -a
oeserverd Version 1.17
$ oeserverd-arm64 -s
0
$ oeserverd-arm64 -t
0
Included below: strace from the above oeserverd -s commands. oeserverd-problem.txt