Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
MEX on linux: Which compiler am I using?

Subject: MEX on linux: Which compiler am I using?

From: P-GPS

Date: 14 Feb, 2011 20:13:14

Message: 1 of 7

Hi,

On Windows/Matlab when I issue "mex -setup", I get a list of compilers
available along with their version numbers.

On Linux/Matlab, when I issue "mex -setup", the only thing related to
compilers I see is asbelow:

---
The options files available for mex are:

  1: /usr/local/MATLAB/R2010a1/bin/gccopts.sh :
      Template Options file for building gcc MEX-files

  2: /usr/local/MATLAB/R2010a1/bin/mexopts.sh :
      Template Options file for building MEX-files via the system ANSI
compiler
 -----

I am using GCC. But how to know which version of GCC?

Thanks.

Subject: MEX on linux: Which compiler am I using?

From: Aurelien Queffurust

Date: 15 Feb, 2011 13:23:03

Message: 2 of 7

P-GPS <premgrps@gmail.com> wrote in message <77fe2cd1-43c8-4e3e-bb8e-a6d2e6ffe33f@o14g2000prb.googlegroups.com>...
> Hi,
>
> On Windows/Matlab when I issue "mex -setup", I get a list of compilers
> available along with their version numbers.
>
> On Linux/Matlab, when I issue "mex -setup", the only thing related to
> compilers I see is asbelow:
>
> ---
> The options files available for mex are:
>
> 1: /usr/local/MATLAB/R2010a1/bin/gccopts.sh :
> Template Options file for building gcc MEX-files
>
> 2: /usr/local/MATLAB/R2010a1/bin/mexopts.sh :
> Template Options file for building MEX-files via the system ANSI
> compiler
> -----
>
> I am using GCC. But how to know which version of GCC?
>
> Thanks.


Just type gcc -v in a terminal
or in MATLAB , type:
>>!gcc -v

To determine the version of your compiler, see solution:
How can I determine the platform and compiler version that I am using?
http://www.mathworks.com/support/solutions/en/data/1-1880F/?solution=1-1880F

Aurélien,
http://blog.developpez.com/matlab4geek/

Subject: MEX on linux: Which compiler am I using?

From: P-GPS

Date: 15 Feb, 2011 16:42:35

Message: 3 of 7

Thanks. That worked. gcc -v shows that I have 4.2.4, but MEX works
with only 4.2.3 (according to this: http://www.mathworks.com/support/compilers/R2010a/glnxa64.html#matlab
.When I went into Synaptic package manager (on Ubuntu) to uninstall
gcc 4.2.4, it selected 4.2.3 and other packages.

Am I to assume that 4.2.3=4.2.4?

Thanks.
On Feb 15, 8:23 am, "Aurelien Queffurust" <tu...@yahoo.fr> wrote:
> P-GPS <premg...@gmail.com> wrote in message <77fe2cd1-43c8-4e3e-bb8e-a6d2e6ffe...@o14g2000prb.googlegroups.com>...
> > Hi,
>
> > On Windows/Matlab when I issue "mex -setup", I get a list of compilers
> > available along with their version numbers.
>
> > On Linux/Matlab, when I issue "mex -setup", the only thing related to
> > compilers I see is asbelow:
>
> > ---
> > The options files available for mex are:
>
> >   1: /usr/local/MATLAB/R2010a1/bin/gccopts.sh :
> >       Template Options file for building gcc MEX-files
>
> >   2: /usr/local/MATLAB/R2010a1/bin/mexopts.sh :
> >       Template Options file for building MEX-files via the system ANSI
> > compiler
> >  -----
>
> > I am using GCC. But how to know which version of GCC?
>
> > Thanks.
>
> Just type gcc -v in a terminal
> or in MATLAB , type:
>
> >>!gcc -v
>
> To determine the version of your compiler, see solution:
> How can I determine the platform and compiler version that I am using?http://www.mathworks.com/support/solutions/en/data/1-1880F/?solution=...
>
> Aurélien,http://blog.developpez.com/matlab4geek/

Subject: MEX on linux: Which compiler am I using?

From: Aurelien Queffurust

Date: 16 Feb, 2011 13:38:03

Message: 4 of 7

P-GPS <premgrps@gmail.com> wrote in message <09b11612-b43a-4584-a3f5-fbc9f981983f@o32g2000prb.googlegroups.com>...
> Thanks. That worked. gcc -v shows that I have 4.2.4, but MEX works
> with only 4.2.3 (according to this: http://www.mathworks.com/support/compilers/R2010a/glnxa64.html#matlab
> .When I went into Synaptic package manager (on Ubuntu) to uninstall
> gcc 4.2.4, it selected 4.2.3 and other packages.
>
> Am I to assume that 4.2.3=4.2.4?
>



I have gcc 4.4.5 on my Linux 64-bits under R2010a and I never had any problem to create mex-files. The TMW link is just to tell you which gcc version has been used to officially support and qualify R2010a.
So You may get the following warning when mexing or compiling:

Warning: You are using gcc version "4.4.5-8)". The version
         currently supported with MATLAB Compiler is "4.2.3".
         For a list of currently supported compilers see:
         http://www.mathworks.com/support/compilers/current_release/

but you can safely ignore it ;)


Aurélien

Subject: MEX on linux: Which compiler am I using?

From: Jan

Date: 16 Jun, 2011 13:06:05

Message: 5 of 7

"Aurelien Queffurust" wrote in message <ijgjvr$kq3$1@fred.mathworks.com>...
> P-GPS <premgrps@gmail.com> wrote in message <09b11612-b43a-4584-a3f5-fbc9f981983f@o32g2000prb.googlegroups.com>...
> > Thanks. That worked. gcc -v shows that I have 4.2.4, but MEX works
> > with only 4.2.3 (according to this: http://www.mathworks.com/support/compilers/R2010a/glnxa64.html#matlab
> > .When I went into Synaptic package manager (on Ubuntu) to uninstall
> > gcc 4.2.4, it selected 4.2.3 and other packages.
> >
> > Am I to assume that 4.2.3=4.2.4?
> >
>
>
>
> I have gcc 4.4.5 on my Linux 64-bits under R2010a and I never had any problem to create mex-files. The TMW link is just to tell you which gcc version has been used to officially support and qualify R2010a.
> So You may get the following warning when mexing or compiling:
>
> Warning: You are using gcc version "4.4.5-8)". The version
> currently supported with MATLAB Compiler is "4.2.3".
> For a list of currently supported compilers see:
> http://www.mathworks.com/support/compilers/current_release/
>
> but you can safely ignore it ;)
>
>
> Aurélien
Hi,

I just came across this post as i get the same warning message. Is there any action required to force Matlab to ignore the warning? Or does it mean that the code will compile anyway, regardless of gcc-version and warning message?
Thanks for any comments on this, I would hate to compile gcc-4.3 from source...

Jan

Subject: MEX on linux: Which compiler am I using?

From: Ariel Balter

Date: 3 Aug, 2011 17:36:10

Message: 6 of 7

> > I have gcc 4.4.5 on my Linux 64-bits under R2010a and I never had any problem to create mex-files. The TMW link is just to tell you which gcc version has been used to officially support and qualify R2010a.
> > So You may get the following warning when mexing or compiling:
> >
> > Warning: You are using gcc version "4.4.5-8)". The version
> > currently supported with MATLAB Compiler is "4.2.3".
> > For a list of currently supported compilers see:
> > http://www.mathworks.com/support/compilers/current_release/
> >
> > but you can safely ignore it ;)
> >
> >
> > Aurélien
> Hi,
>
> I just came across this post as i get the same warning message. Is there any action required to force Matlab to ignore the warning? Or does it mean that the code will compile anyway, regardless of gcc-version and warning message?
> Thanks for any comments on this, I would hate to compile gcc-4.3 from source...
>
> Jan

But I get
>> mex helloworld.cpp


Warning: You are using gcc version "4.5.2-8ubuntu4)". The version
         currently supported with MEX is "4.3.4".
         For a list of currently supported compilers see:
         http://www.mathworks.com/support/compilers/current_release/

/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.2)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.7)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.7)
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)

    mex: compile of ' "helloworld.cpp"' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

The clincher being that it says the compilation failed.

Subject: MEX on linux: Which compiler am I using?

From: abukaf

Date: 20 Jul, 2013 07:11:11

Message: 7 of 7

"Ariel Balter" <ariel@arielbalter.com> wrote in message <j1c0ua$b10$1@newscl01ah.mathworks.com>...
> > > I have gcc 4.4.5 on my Linux 64-bits under R2010a and I never had any problem to create mex-files. The TMW link is just to tell you which gcc version has been used to officially support and qualify R2010a.
> > > So You may get the following warning when mexing or compiling:
> > >
> > > Warning: You are using gcc version "4.4.5-8)". The version
> > > currently supported with MATLAB Compiler is "4.2.3".
> > > For a list of currently supported compilers see:
> > > http://www.mathworks.com/support/compilers/current_release/
> > >
> > > but you can safely ignore it ;)
> > >
> > >
> > > Aurélien
> > Hi,
> >
> > I just came across this post as i get the same warning message. Is there any action required to force Matlab to ignore the warning? Or does it mean that the code will compile anyway, regardless of gcc-version and warning message?
> > Thanks for any comments on this, I would hate to compile gcc-4.3 from source...
> >
> > Jan
>
> But I get
> >> mex helloworld.cpp
>
>
> Warning: You are using gcc version "4.5.2-8ubuntu4)". The version
> currently supported with MEX is "4.3.4".
> For a list of currently supported compilers see:
> http://www.mathworks.com/support/compilers/current_release/
>
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl_c.so.2)
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl.so.7)
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libppl.so.7)
> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libgmpxx.so.4)
>
> mex: compile of ' "helloworld.cpp"' failed.
>
> ??? Error using ==> mex at 208
> Unable to complete successfully.
>
> The clincher being that it says the compilation failed.


I have also the same prblm when i m compiling CPP file using mex compiler............

any here to resolve my problem.........

thanks

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us