MATLAB cannot find CMake on Ubuntu 20.04

31 visualizaciones (últimos 30 días)
Phil Pesce
Phil Pesce el 25 de Mzo. de 2022
Comentada: Phil Pesce el 28 de Mzo. de 2022
Hello! I've installed MATLAB 2021a into /usr/local/MATLAB/R2021a on my Ubuntu machine. I've also installed gcc, g++, and CMake (3.16.3). I am trying to use the RTI Connext DDS block set, which for some reason requires CMake even to only generate code. I've also installed RTI's toolchain, which provides the necessary commands/tools.
In a terminal, cmake -version returns the expected value, which seems to suggest the PATH was setup correctly (maybe?). cmake is installed in /usr/bin//cmake. In MATLAB, when I generate the Simulink model with the DDS blocks, I get an error that CMake is not found. Searching the web, it was suggested using the following command in MATLAB:
>> system('cmake --version')
cmake: /usr/local/MATLAB/R2021a/bin/glnxa64/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by cmake)
cmake: /usr/local/MATLAB/R2021a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by cmake)
cmake: /usr/local/MATLAB/R2021a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib/x86_64-linux-gnu/libjsoncpp.so.1)
Doesn't look good. I'm not sure what the next step is, and everything else I've seen says to break symbolic links. I'm not thrilled with that idea, as eventually I'm going to have to rebuild my setup in a Docker container.
Help?
Thanks!

Respuestas (1)

Mark McBroom
Mark McBroom el 28 de Mzo. de 2022
Is R2021b or R2022a an option? We began shipping cmake with MATLAB in those releases so there is no need to install cmake separately.
If you are stuck on 21a, best guess is that the cmake version you installed is too old. Can you try installing the latest version of cmake using apt?
  1 comentario
Phil Pesce
Phil Pesce el 28 de Mzo. de 2022
Thanks, Mark!
Currently stuck on 21a, but your recommendation worked. Ubuntu apt package manager was installing CMake 3.16, which was the root cause.
I uninstalled CMake 3.16 and installed 3.22 and everything works now.
https://graspingtech.com/upgrade-cmake/

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by