Matlab Gnutls Error
When starting Matlab on Arch Linux the error including the line
# C [libmwlmgrimpl.so+0x22c420] Ox76b599173db0bd16+0x190
is reported.
To find details on the error we can use coredumpctl and gdb to view the stack trace.
|
|
Which produces the following truncated output:
Stack trace of thread 3291923:
#0 0x00007fdbd78255df abort (libc.so.6 + 0x255df)
#1 0x00007fdbd78254e3 n/a (libc.so.6 + 0x254e3)
#2 0x00007fdbd7f755e0 n/a (libmwfl.so + 0x4e5e0)
#3 0x00007fdbd7f77176 n/a (libmwfl.so + 0x50176)
#4 0x00007fdbd7f77310 _ZN10foundation4core4diag9terminateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKciSB_ (libmwfl.so + 0x50310)
#5 0x00007fdbb4f6a14a n/a (libmwjmi.so + 0x16a14a)
#6 0x00007fdb6670e700 _ZN2os5abortEb (libjvm.so + 0x90e700)
#7 0x00007fdb668d3683 _ZN7VMError14report_and_dieEv (libjvm.so + 0xad3683)
#8 0x00007fdb66718995 JVM_handle_linux_signal (libjvm.so + 0x918995)
#9 0x00007fdb6670b858 _Z13signalHandleriP7siginfoPv (libjvm.so + 0x90b858)
#10 0x00007fdbd783e4d0 n/a (libc.so.6 + 0x3e4d0)
#11 0x00007fdb67e2c420 Ox76b599173db0bd16 (libmwlmgrimpl.so + 0x22c420)
#12 0x00007fdb67e2cd37 lc_init (libmwlmgrimpl.so + 0x22cd37)
#13 0x00007fdaf5464768 n/a (libgnutls.so.30 + 0x64768)
#14 0x00007fdaf542652f n/a (libgnutls.so.30 + 0x2652f)
...
It turns out this version of Matlab is incompatable with the current version of gnutls 3.8.11 packaged with Arch Linux. (I honestly don’t know why, there appear to only be additional functions in the new version with no ABI breaking changes according to abidiff.)
This solution was aided by the discussion on the Arch Forums https://bbs.archlinux.org/viewtopic.php?id=310244.
To fix this I downloaded an older version of gnutls (gnutls-3.8.9) and put the extracted packages into one of the paths used by Matlab to load shared libraries (earlier than the system path).
|
|
Now we need to copy the library files to the Matlab LD_LIBRARY_PATH which we can find using
matlab -n.
I have matlab installed to /opt/MATLAB/R2022a therefore the first directory in the search path is
/opt/MATLAB/R2022a/sys/os/glnxa64.
Copy the files from the extracted package
|
|
This fixed the problem for me. There is aparently another issue with executable stacks that I haven’t run into yet. If I do, I will update this page.