You are not logged in.

#1 2023-07-30 16:11:23

branthebuilder
Member
Registered: 2016-10-01
Posts: 67

[SOLVED] MATLAB install "providing" libcurl and libstdc++ for system

I recently had to install MATLAB from source for a specific task. Since then I've noticed a couple of warning messages like

curl: /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libcurl.so.4: no version information available (required by curl)
...
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libcurl.so.4: no version information available (required by cmake)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by cmake)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by cmake)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by cmake)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by cmake)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/libjsoncpp.so.25)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/libcppdap.so)
cmake: /usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libcppdap.so)

What's going on here? How do I keep MATLAB but not override the system packages for curl and C lang stuff?

FWIW, I have curl and libstdc++ present in /usr/lib/ and

whereis libstd++.so.6

and

whereis libcurl.so.4

both return the path to /usr/lib/ installations not the MATLAB path.

$ ldd /usr/bin/curl
/usr/bin/curl: /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/curl)
	linux-vdso.so.1 (0x00007ffc8590d000)
	libcurl.so.4 => /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libcurl.so.4 (0x00007f17b4270000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f17b4062000)
	libssh2.so.1 => /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libssh2.so.1 (0x00007f17b401f000)
	libssl-mw.so.1.1 => /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libssl-mw.so.1.1 (0x00007f17b3f8d000)
	libcrypto-mw.so.1.1 => /usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64/libcrypto-mw.so.1.1 (0x00007f17b3c00000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f17b3f71000)
	librt.so.1 => /usr/lib/librt.so.1 (0x00007f17b3f6c000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f17b3f67000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f17b4334000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f17b3f62000)

somehow it's being linked to the MATLAB file instead of the system one.

My god. It's even screwing up the man utility because the system is trying to use the path /usr/local/MATLAB/MATLAB_Runtime/R2023a/extern/bin/glnxa64/libmandb-2.11.2.so. I tried just renaming the libcurl.so.4 file in the MATLAB path but that just shuts things down. At lease with that file available I just get the warning but am able to use pacman and such. So that makes me hesitant to just remove the MATLAB stuff until I know how to get all the links pointing back to the right stuff.

Last edited by branthebuilder (2023-07-30 17:17:01)

Offline

#2 2023-07-30 17:01:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: [SOLVED] MATLAB install "providing" libcurl and libstdc++ for system

No /usr/bin/curl is not "linked to" any specific instance of libcurl.so.4, but rather with your current setup the dynamic loader is prioritizing the MATLAB path over /usr/lib for loading of linked libraries.  One common source of a problem is if you (globally / unconditionally) set a LD_PRELOAD or similar LD_* environment variable.  Did you do that?

Or what did you do when you manually built / set up matlab from source?

EDIT: actually I'm checking on this now, but /usr/local/... may be *by default* higher priority than /usr/lib, though I doubt this would induce a recursive search under that path (I doubt, but I'm not sure it wouldnt).  Is there a reason you didn't install this to /opt/ rather than /usr/local?

EDIT 2: at least on my system, /usr/local/lib is in the default ld search path, but it is lower than /usr/lib, so this is most likely not relevant which puts suspicion back on an environment variable or related setting from your build / install of MATLAB.

Last edited by Trilby (2023-07-30 17:06:02)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#3 2023-07-30 17:13:52

branthebuilder
Member
Registered: 2016-10-01
Posts: 67

Re: [SOLVED] MATLAB install "providing" libcurl and libstdc++ for system

That was it. Thanks so much. Setting that LD_PRELOAD was part of the installation instructions I followed. Removed that and back to normal. Thanks!

Offline

Board footer

Powered by FluxBB