Re: MEX error message



Randy Poe wrote:
Michael Wild wrote:
Randy Poe wrote:
I'm trying to do some MEX programming. I haven't done this in a long
time and can no longer remember what sort of configuration steps I
have to go through, if any.

I compiled fine, no error messages.

When I try to invoke my code, I get this:

??? Invalid MEX-file '/proj/algorithms/merawan/matlab/(my
filename).mexglx':
/opt/matlab/R14/Linux/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1:
version `GCC_3.3' not found (required by /usr/lib/libstdc++.so.6).

We're running Redhat Linux here, and 'gcc -v' tells me it is
version 3.4.4

GNU C version 3.4.4 20050721 (Red Hat 3.4.4-2) (i386-redhat-linux)
compiled by GNU C version 3.4.4 20050721 (Red Hat 3.4.4-2).

- Randy

matlab comes with its own c-libraries (version 3.3) and your compiler
compiles the stuff with 3.4 which causes some incompatibilities. either
install a 3.3 compiler, or follow the steps in

http://www.mathworks.com/support/solutions/data/1-QBCS1.html?solution=1-QBCS1


and move the old libraries out of the way, so matlab uses the new,
system wide ones.

Thanks for the rapid response.

Are those runtime libraries just relevant to MEX, or are they used
during ordinary Matlab sessions? I've passed this info on to
the sysadmins, but I'm not sure whether this is really the right
solution for a shared installation or whether it is going to cause
problems for other users.

- Randy



moving the libs out of scope caused me some problems with some exotic matlab functions, which were compiled against the old libraries. either recompile them (you have the sources), or live with it.

another solution which comes to my mind: the matlab start script (in linux the "matlab" command is actually a script) sets up the LD_LIBRARY_PATH. what you could do: create another directory, make in there symlinks to all the non-critical libraries, and leave out the critical ones. then make a local copy of the matlab script to e.g. ~/bin, add that directory to your PATH variable (perhaps it's already set up to be in it...) and then edit your own version of the script to reflect the change you made in the LD_LIBRARY_PATH.

hope this works (never tried it) :-)

michael
.



Relevant Pages

  • Problems running compiled matlab in the background
    ... I have a simple but persistent problem. ... solaris from within Matlab. ... It compiles fine and ... It does such even if started by nohup, within a script, crontab, ...
    (comp.soft-sys.matlab)
  • Re: problem with libstdc++.so.6
    ... On Mar 13, 8:22 am, Michael Wild ... I am using matlab R2006a to build an standalone executable under ... it compiles fine, but when I run the execultable I get this nasty ... libraries, which, of course, usually do not correspond to the ones ...
    (comp.soft-sys.matlab)
  • Re: Calling External DLL functions in Perl using Inline
    ... >> and the code compiles and runs the same. ... > I think that script builds ok when you remove the LIBS directive because ... > be different under Cygwin. ... >> How do are you able to include your own header files? ...
    (comp.lang.perl.modules)
  • Re: analog input and accelerator mode
    ... watcom 1.8 with matlab r2010b compiles my winsound model successfully. ... you need correct watcom version for your matlab. ...
    (comp.soft-sys.matlab)
  • Re: MatLab Compiler
    ... compiled excutable draw on the functions in the Matlab Component ... Runtime environment, than to have to code all those functions ... the executables in what you propose -- which would needlessly ... compiled Matlab applications on the same system Mathworks compiles ...
    (comp.soft-sys.matlab)