Effacer les filtres
Effacer les filtres

Matlab crashing in ubuntu when using MATLAB coder

52 vues (au cours des 30 derniers jours)
Siva Heramb Peddada
Siva Heramb Peddada le 6 Juil 2022
Modifié(e) : cui,xingxing le 27 Avr 2024
The following error is shown on the terminal:
Inconsistency detected by ld.so: ../elf/dl-tls.c: 517: _dl_allocate_tls_init: Assertion `listp != NULL' failed!
Can someone suggest a fix for this?
Thanks
Siva
  8 commentaires
Yongjian Feng
Yongjian Feng le 10 Mar 2023
Modifié(e) : Yongjian Feng le 10 Mar 2023
The comparison shows more dependencies on the host machine?
One possible way to look for the difference is lddtree. It will give you the hierarchy of ldd. Then you might be able to find out why there are more dependencies on the host machine.
You can also contact Mathworks Techincal Support for this.
Thanks,
Yongjian
cui,xingxing
cui,xingxing le 21 Mar 2023
Modifié(e) : cui,xingxing le 21 Mar 2023
Hi,all:
The problem can finally be solved, thanks to the meticulous and professional investigation by Mathworks Techincal Support, this docker matlab mex opencv error has now been successfully reolved.Not related to matlab coder toolbox.
The problem was that the environment variable LD_LIBRARY_PATH was not effectively recognised by the docker matlab container. The current version of the R2022b container, once built, is not affected by the environment variables set in the container (i.e. neither setting LD_LIBRARY_PAH on the system nor using the setenv function within matlab can actually change its value within the container, even though getenv can ostensibly "show the results in effect").
To properly set environment variables to be passed to matlab, they should be passed directly when matlab is started, e.g. started in the following way.
LD_LIBRARY_PATH="REPLACE/THIS/PATH" matlab
or run matlab container
docker run -d --rm -p <host-port-id>:<contain-port-id> --shm-size=512M -e
LD_LIBRARY_PATH=<my_opencv_lib_dir> <my_image_name>:r2022b -browser
<host-port-id>:Replace with yourself
<container-port-id>:Replace with yourself
<my_opencv_lib_dir> : Replace with your own path
<my_image_name> : Replace with your own name

Connectez-vous pour commenter.

Réponses (1)

cui,xingxing
cui,xingxing le 28 Mar 2023
Modifié(e) : cui,xingxing le 27 Avr 2024
1. Ubuntu 18.04/20.04 has libcanberra-gtk3-module (gtk-3.0+) installed by default, and Matlab needs to call the gtk-2.0+ canberra dynamic link library;
(In fact, there is also a 2.0+ version of the dynamic link library file in the gtk-3.0+ directory, but it seems that Matlab does not support multiple versions of libcanberra-gtk-module.so under the same path)
2. the linux default library is found under the path "/usr/lib/", while the canberra dynamic link library is located under the path "/usr/lib/x86_64-linux-gnu/";
Solution:
1. Install the gtk-2.0+ version of canberra by running the following command in the terminal:
sudo apt-get install libcanberra-gtk-module -y
2. Add a soft connection, run the following command in the terminal (many people are missing this step):
sudo ln -s /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so /usr/lib/libcanberra-gtk-module.so
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com

Catégories

En savoir plus sur Containers dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by