Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Conflict with mcc... libstdc++.so.6
Date: Wed, 23 Jul 2008 14:11:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 137
Message-ID: <g67e5p$g5d$1@fred.mathworks.com>
References: <431d112e-2cfc-4e5e-8b68-e2dcac8b7008@w5g2000prd.googlegroups.com>  <9f4032f6-4871-4bae-b649-e78b2b4fa1bc@z24g2000prf.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216822265 16557 172.30.248.35 (23 Jul 2008 14:11:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Jul 2008 14:11:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1447726
Xref: news.mathworks.com comp.soft-sys.matlab:481241



Hello,
I think I have a similar, if not the same, problem.  The
version of Matlab I am using is: 7.0.0.19901 (R14).  And the
problem is when I use mcc -m to compile a certain function,
I get the following warning message:

/usr/bin/ld: warning: libstdc++.so.5, needed by
/usr/local/matlab/bin/glnx86/libmwmclmcrrt.so, may conflict
with libstdc++.so.6
Warning: Objects of uiundo.FunctionCommand class exist - not
clearing this class
or any of its super-classes.
Warning: Objects of uiundo.CommandManager class exist - not
clearing this class
or any of its super-classes.
Warning: Objects of uitools.FigureToolManager class exist -
not clearing this class
or any of its super-classes.

So, I tried to solve it by changing my mbuildopts.sh as follows:

# CLIBS = "$RPATH $MLIBS -lm -lstdc++"
  CLIBS = "$RPATH  $MLIBS -lm 
$TMW_ROOT/sys/os/$Arch/libstdc++.so.5""

where I've commented out the old CLIBS and inserted what I
think I should according to this discussion.  But now, I get
an error:

Warning: an error occurred while parsing class
dspopts.abstractspectrum:
Undefined function or variable 'check_integer'.
Warning: an error occurred while parsing class
dspopts.pseudospectrum:
Invalid superclass handle.
??? Unable to create a class array for class
dspopts.pseudospectrum

Warning: Objects of uiundo.FunctionCommand class exist - not
clearing this class
or any of its super-classes.
Warning: Objects of uiundo.CommandManager class exist - not
clearing this class
or any of its super-classes.
Warning: Objects of uitools.FigureToolManager class exist -
not clearing this class
or any of its super-classes.
??? Depfun error: 'Unable to create a class array for class
dspopts.pseudospectrum
'

Does anyone know how I can make this work?  Any help or
hints would be very much appreciated.

cheers,

Jack


spasmous <spasmous@gmail.com> wrote in message
<9f4032f6-4871-4bae-b649-e78b2b4fa1bc@z24g2000prf.googlegroups.com>...
> On Jun 2, 11:16=A0am, "Sebastiaan "
> <s.breedv...@erasmusmc.REMOVE.BOO.BOO.nl> wrote:
> > > Sebastian - by responding you are saving my life :)
Thank you!
> > > The result of ldd hello is:
> >
> > > =A0 =A0 =A0 =A0 linux-gate.so.1 =3D3D> =A0(0xffffe000)
> > > =A0 =A0 =A0 =A0 libmwmclmcrrt.so =3D3D>
/usr/local/matlab/bin/glnx86/
> > > libmwmclmcrrt.so (0x40001000)
> > > =A0 =A0 =A0 =A0 libm.so.6 =3D3D> /lib/tls/libm.so.6
(0x42e08000)
> > > =A0 =A0 =A0 =A0 libstdc++.so.5 =3D3D>
/usr/lib/libstdc++.so.5
> > (0x439b9000)
> > > =A0 =A0 =A0 =A0 libpthread.so.0 =3D3D>
/lib/tls/libpthread.so.0
> > (0x42f20000)
> > > =A0 =A0 =A0 =A0 libc.so.6 =3D3D> /lib/tls/libc.so.6
(0x42cea000)
> > > =A0 =A0 =A0 =A0 libdl.so.2 =3D3D> /lib/libdl.so.2
(0x42e2d000)
> > > =A0 =A0 =A0 =A0 libstdc++.so.6 =3D3D>
> >
> > /usr/local/matlab/bin/glnx86/../../sys/os/>
glnx86/libstdc++.so.6 (0x40069=
> 000)
> > > =A0 =A0 =A0 =A0 libgcc_s.so.1 =3D3D>
> >
> > /usr/local/matlab/bin/glnx86/../../sys/os/
> >
> > > glnx86/libgcc_s.so.1 (0x40146000)
> > > =A0 =A0 =A0 =A0 /lib/ld-linux.so.2 =3D3D>
/lib/ld-linux.so.2
> > (0x42cd1000)
> >
> > > So it looks like my platform uses libstdc++.so.5. Is
there any
> > > solution where I can tell MATLAB to use .so.6?
> >
> > > I'm not sure I understand what you meant by compiling with
> > -L/opt/
> > > matlab/2007b/sys/os/glnxa64/-lstdc++. There is not -L flag
> > with mcc
> > > that I can see.
> >
> > Funny, it is actually linked to .so.5 and .so.6. Seems
> > strange, but I am not an expert on this.
> >
> > I also have no experience with mcc, only with mex files.
> >
> >
Fromhttp://www.gravity.psu.edu/~s4/software/MATLAB-R2006a/Compiling_MATLA.=
> ..
> > it seems that you have to edit bin/mbuildopts.sh (or better:
> > ~/.matlab/R2007b/mbuildopts.sh which is the one you can and
> > should edit) and change:
> > CLIBS=3D"$RPATH $MLIBS -lm
$TMW_ROOT/sys/os/$Arch/libstdc++.so.6""
> >
> > in the section belonging to your architecture (seems
glnx86).
> >
> > Does it work?
> 
> 
> Interesting. I changed my mbuildopts.sh file as you
suggested and it
> does work. But only calling from the MATLAB prompt via
system('./
> hello'). Calling from the bash shell gives the error
> 
> =2E/hello: error while loading shared libraries:
libmwmclmcrrt.so:
> cannot open shared object file: No such file or directory