Matlab runtime should provide static libraries instead of shared libraries

4 visualizaciones (últimos 30 días)
Jason
Jason el 20 de Ag. de 2017
Respondida: Jan el 20 de Ag. de 2017
Currently Matlab runtime packages it's libraries as shared libraries and dump it inside MATLAB_Runtime/vXX/bin/glnxa64/ along with other shared libraries it depends with. This is a big problem because the shared libraries it depends with often exist in the system already in /usr/lib, just to name a few, libtiff.so.5, libtbb.so.2. Therefore, when I compile my application that intends to use matlab runtime, I had to add MATLAB_Runtime/vXX/bin/glnxa64/ into RPATH in order to link to them. However, this causes compilation error when I am linking to another external library (in my case OpenCV) that was compiled with the libtiff.so.5, libtbb.so.2 in /usr/lib, because my application is now linking to libtiff.so.5, libtbb.so.2 in MATLAB_Runtime/vXX/bin/glnxa64/.
Making a copy of the shared libraries that you depend with and distribute it is always a bad idea. I see two ways to solve this.
1. distribute matlab runtime as static libraries instead of shared libraries, this is probably the most effortless way for mathworks to make it happen.
2. create a matlab runtime deb file that has the build-depends section that is dependent on the libraries from the ubuntu distros, this is probably the most ideal way but will require more effort from mathworks.
Please consider to make these changes, I will appreciate it. Thanks.

Respuestas (1)

Jan
Jan el 20 de Ag. de 2017
This is the public Matlab forum, where other Matlab users post answers in general. We cannot change the way Matlab produces libraries. If you want to contact MathWorks officially, please use the "Contact Us" button on this page.

Categorías

Más información sobre C Shared Library Integration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by