Ok, so probably not an issue I expect to get a ton of support for, but I have been working on porting jetson libs to libreelec. For the most part it all works(Vulkan, X, …) at leas the parts I need. Small problem when trying to get the decoder to work with ffmeg, which doesnt happen in ubuntu…
If I modify NVV4lElementPlane.cpp then I can get jetson-ffmpeg(nvmpi) lib to work, but it crashes on decoder close, with a double free or corruption out issue. Without modified nvv4lElementPlane.cpp, the decoder doesnt start, due to issue in deinitPlane function.
If I use nvv4l2dec all I get is a segfault on decoder open.
any thoughts on libs that have to be in aarch64-linux-gnu/{tegra, tegra-egl} I did find that libv4l extensions must follow this path, but the rest of the libs are a bit of a mystery to me…
here is how I am installing bsp libs, note this is still rough and still needs support for other L4T devices added. Lakka-LibreELEC/package.mk at Lakka-v4.x-new-jetson-ffmpeg-patches · GavinDarkglider/Lakka-LibreELEC · GitHub
Here is modified NvV4LElementPlane.cpp That works with nvmpi lib, but has issues on decoder close.
I would just dump the libs the way they are in ubuntu, which has worked in other distro ports(Arch, and fedora), but there is no way to run ldconfig in lakka/libreelec, as it is a squashfs system image, with minimal tools(no ldconfig, even if linker cache could be updated)
Any thoughts on fixing these lib issues(As from what I can tell that is where the problem is) or a new directions to look in would be helpful.
gdb output from ffmpeg with libnvmpi:
Thread 11 "retroarch" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f70424f70 (LWP 4916)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1 0x0000007f7858cf74 in __GI_abort () at abort.c:79
#2 0x0000007f785d7c44 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f78691c90 "%s\n")
at ../sysdeps/posix/libc_fatal.c:155
#3 0x0000007f785df68c in malloc_printerr (str=str@entry=0x7f7868d678 "free(): invalid pointer")
at malloc.c:5389
#4 0x0000007f785e179c in free_check (mem=0x13a8fd0, caller=<optimized out>) at hooks.c:255
#5 0x0000007f7792bc90 in NvDdkVicFreeSession () from /usr/lib/libnvddk_vic.so
#6 0x0000007f77cd1174 in NvBufferSessionDestroy () from /usr/lib/libnvbuf_utils.so.1.0.0
#7 0x0000007f7802aa00 in dec_capture_loop_fcn (arg=0xedebc0) at ../nvmpi_dec.cpp:316
#8 0x0000007f78881ddc in std::execute_native_thread_routine (__p=0xfbd2e0)
at /home/gavin/Lakka-LibreELEC/build.Lakka-Switch.aarch64/build/gcc-10.2.0/libstdc++-v3/src/c++11/thread.cc:80
#9 0x0000007f7a366f14 in start_thread (arg=0x0) at pthread_create.c:463
#10 0x0000007f78639e1c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
and I will post output of nv4l2_dec codec once I have built a proper debug build for that.