External Email - Use Caution
Below, an issue, and solution to matlab runtime libraries with freesurfer8 on Ubuntu 24.
I was trying to use the AANSegment tool: https://secure-web.cisco.com/1H4cbEXrxSNts7sQntuDLTelBVbN0CKybPNrkpsA2FJAKHp...
And came across some problems (now solved).
1) The utility uses the Matlab runtime. I have freesurfer 8 installed, but the instructions on that page (and also the MatlabRuntimehttps://secure-web.cisco.com/1_scv-lDtfw8ziHNttN1aI2gULzNJVSX5styh_neviSU-HHRFUdnbvRZGyKSUBGaH6gZJPj6mdLMqWO51Rx0j1WAa3SNDrIpyEQfhrvJ6rqaN2tsHqlD2Geidl3Ai3HS1Z4I1LKohQnLV_k3ZE0EkxJxvIZO7QP0irhuQWvucp-Cs1pNi45d7apZigIqU0qppSaGVBZ-9k4MYtrsisdMMrMqO0PkHNxv_k8qC-jPe7BziTdaAepRvzNLMVMS88P_Q8GvJy9op1bg0rLfx5_IRQmeG7V8eSGoQOZETvEuhEDqT4KUNor51WOsoAKvx1P2vskjxm_WkFmKBNNZeWMjkRw/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FMatlabRuntime page) only refer to version 6 and 7. Could this be updated?
2) Having got the right matlab version, I ran into problems with missing libraries. Discussing this with our IT team, they said:
"The problem is that the MCR runtime is supplying its own version of libstdc++ (the GLIBC C++ standard library) which is conflicting with other software/libraries which are loaded at the same time, namely /lib/x86_64-linux-gnu/libitkvnl_algo-5.3.so.1 (probably some other code/application which is part of freesurfer is wanting that library).
So the MCR runtime is adjusting the library path to load its own libstdc++ library (an older version), but other code which is running wants libitkvnl_algo-5.3.so.1 which in turn wants the (later) version of libstdc++ which is included as part of the Ubuntu 24 OS."
Their solution was to replace the library in the MCR directory with a symbolic link to the ubuntu system one. ie that /usr/local/freesurfer/8.2.0/MCRv97/sys/os/glnxa64/libstdc++.so.6 is now a symbolic link to /lib/x86_64-linux-gnu/libstdc++.so.6
which seemed to solve the problem.
Best wishes
Michael
Michael Firbank #mynameis [my-kel fur-bank] Newcastle University Health Innovation Neighbourhood (formerly Campus for Ageing and Vitality) Newcastle upon Tyne, NE4 5PL
freesurfer@nmr.mgh.harvard.edu