MATLAB libraries conflict with existing libraries - CMake crashes

I am working on C ++ code on a 64-bit Ubuntu 16.04 machine. As part of the code, I need to call Matlab, which I use with the libmat and libmx libraries.

When delivering the CMake path to these libraries, I get a warning from CMake that existing libraries may conflict (see error below). I can still generate the code, but when I execute it, I get a failure.


CMake Warning :

It is not possible to create a safe run-time search path for target depth_forest_trainer because files in some directories may conflict with libraries in implicit directories:

runtime library [libpng12.so.0] in / usr / lib / x 86_64-linux-gnu can be hidden by files in: / usr / local / MATLAB / R2016a / bin / glnxa64

Some of these libraries may not be found correctly.

Runtime Error :

Error in `./depth_forest_trainer ': free (): invalid pointer: 0x00000000021c7328

======= Backtrace: ===========

/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7fe7abf49725] /lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7fe7abf51f4a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fe7abf55abc] ./depth_forest_trainer(_ZN5boost10filesystem4pathD1Ev+0x18)[0x5290a8] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7fe7abf0c35a] /usr/local/MATLAB/R2016a/bin/glnxa64 /libboost_filesystem.so.1.56.0(+0x7ba6) 

[0x7fe7ab0beba6]

======= Memory card: ========

[...]

 7fe7a0000000-7fe7a0021000 rw-p 00000000 00:00 0 7fe7a0021000-7fe7a4000000 ---p 00000000 00:00 0 7fe7a49bd000-7fe7a537c000 r--p 00000000 08:01 4201449 

/ Usr / lib / locale / archive locale

 7fe7a537c000-7fe7a5381000 r-xp 00000000 08:01 4202446 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 7fe7a5381000-7fe7a5580000 ---p 00005000 08:01 4202446 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 7fe7a5580000-7fe7a5581000 r--p 00004000 08:01 4202446 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 7fe7a5581000-7fe7a5582000 rw-p 00005000 08:01 4202446 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 7fe7a5582000-7fe7a5584000 r-xp 00000000 08:01 4202435 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 

[he continues ...]


My question is that someone saw this behavior and could comment on how to solve this?

+2
matlab cmake
source share

No one has answered this question yet.

See similar questions:

8
CMake: link to two pre-compiled libraries, depending on different versions of the third library

or similar:

nineteen
CMake does not know where Qt4 qmake
12
matlab on linux cannot do anything (cannot load libstdc ++. so.6: version `CXXABI_1.3.8 'not found)
2
CMAKE - Hidden Runtime Library Files
one
invalid mex file error (libstd ++ version)
one
g ++ will not reference the library in / usr / lib /
0
weird behavior with readlink under cmake
0
Matlab R2016a Mex file error
0
Cmake search module to split a shared or static library
-one
How to direct CMake to use libraries only in a specific directory

All Articles