SUMO returns error using "system" command on a Linux machine, while it works properly inside Terminal
3 views (last 30 days)
Show older comments
I have SUMO version 0.19.0 installed on a 64-bit Linux machine. The OS is Ubuntu 12.04.
Also, I have MATLAB R2014b running on it.
To run SUMO (or NETCONVERT) inside MATLAB, I use "system" command. But, I receive error which I do not know the source. Interestingly, when I run SUMO (or NETCONVERT) inside Terminal, it works properly. So, I was wondering if it is because of the way MATLAB opens Shell and passes the arguments or something else.
Does anybody know anything about it?
These are the Error messages when i run SUMO (or NETCONVERT):
>> [bStatus, strResult] = system('netconvert -c mySumo.netc.cfg', '-echo');
netconvert: /usr/local/MATLAB/R2014b/bin/glnxa64/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libpoppler.so.44)
netconvert: /usr/local/MATLAB/R2014b/bin/glnxa64/libcrypto.so.1.0.0: no version information available (required by /usr/lib/libpq.so.5)
netconvert: /usr/local/MATLAB/R2014b/bin/glnxa64/libssl.so.1.0.0: no version information available (required by /usr/lib/libpq.so.5)
netconvert: symbol lookup error: /usr/lib/libgdal.so.1: undefined symbol: _ZN11xercesc_3_111InputSource11setEncodingEPKt
>> [bStatus, strResult] = system('sumo -c mySumo.sumo.cfg', '-echo');
sumo: symbol lookup error: sumo: undefined symbol: _ZN11xercesc_3_114TranscodeToStrC1EPKtPKcPNS_13MemoryManagerE
2 Comments
Matt Roelle
on 24 May 2016
I have a similar error with svn:
>> !svn up
svn: /usr/local/MATLAB/R2015b/bin/glnxa64/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
svn: /usr/local/MATLAB/R2015b/bin/glnxa64/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
It successfully updates, but gives those warnings.
Walter Roberson
on 24 May 2016
Those undefined symbols are mangled names corresponding to
xercesc_3_1::InputSource::setEncoding(unsigned short const*)
and to
xercesc_3_1::TranscodeToStr::TranscodeToStr(unsigned short const*, char const*, xercesc_3_1::MemoryManager*)
Answers (1)
Walter Roberson
on 24 May 2016
Difficulties like this are caused by MATLAB using different library path environment variable values than the program expects. On Linux, LD_LIBRARY_PATH is typically the key variable; on OS-X that can have effect but DYLD_LIBRARY_PATH tends to be used instead.
At the shell prompt, ask your shell to display the LD_LIBRARY_PATH variable. Then inside MATLAB, use system or ! to ask your shell to display the variable, or use
getenv('LD_LIBRARY_PATH')
(For OS-X look at DYLD_LIBRARY_PATH instead)
you will find that either MATLAB has removed something from the path or else that MATLAB has added something earlier on the path that is taking priority when the libraries are being searched for.
1 Comment
Michael Francis
on 17 Jan 2017
I am using ubuntu 14.04 with Matlab R2016B, and have a problem at run time with my C++ mex/sfunction:
Error while obtaining sizes from MEX S-function '..._cpp' in 'sfunc_.../S-Function'.
Invalid MEX-file '..._cpp.mexa64': /usr/lib/libgdal.so.1: undefined symbol: _ZN11xercesc_3_111InputSource11setEncodingEPKt
Component: Simulink | Category: Block error
I compared the LD_LIBRARY_PATH from my command terminal and Matlabs command terminal and saw that Matlabs ld_library_path had other earlier paths in it, compared what I saw on my command terminals ld_library_path output. So I updated Matlabs ld_library_path to have the command terminal ld_library_path output to be earlier like you explain in your answer, but that still did not solve my problem.
I have created a matlab question here(https://www.mathworks.com/matlabcentral/answers/319366-error-while-obtaining-sizes-from-mex-s-function-need-help-please) for more information. Do you think you know why this is happening?
Mike
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!