<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094</link>
    <title>MATLAB Central Newsreader - problem with Matlab 2009a on x64 Ubuntu intrepid</title>
    <description>Feed for thread: problem with Matlab 2009a on x64 Ubuntu intrepid</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 11 May 2009 20:19:02 -0400</pubDate>
      <title>problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#649024</link>
      <author>Amin </author>
      <description>I have been using the latest version of matlab(2009a) on x64 ubuntu 8.10 for a couple of weeks now.&lt;br&gt;
Every thing works fine but I can't make the matlab compile my C files into Matlab mex(using mex function). Intrepid is shipped with gcc 4.3.2 while the latest version that matlab supports is still gcc 4.2.3 so I think this should be the source of the problem.&lt;br&gt;
When I mex a script, matlab warns me about the wrong version of the GCC and then the mex-ed file does not work properly. I get odd errors like &quot;out of memory&quot; or the mex ed function returns an incorrect value. The script works fine when I mex it on another computer with an older version of Linux(opensuse 10.3) which has a compatible GCC.&lt;br&gt;
&lt;br&gt;
I tried to install an older version of GCC on intrepid but I either did it wrong or it didn't solve my problem.&lt;br&gt;
&lt;br&gt;
I would appreciate if anyone have any idea/experience about solving this problem.&lt;br&gt;
&lt;br&gt;
amin</description>
    </item>
    <item>
      <pubDate>Tue, 30 Jun 2009 00:36:03 -0400</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#661388</link>
      <author>Timothy </author>
      <description>Hi Amin,&lt;br&gt;
&lt;br&gt;
I have a similar problem too. I run R2009a on a Mac Intel machine and mex-ing my C code with mex wrappers seem to work fine. I also discovered MATLAB supports up to gcc 4.2. Apple's OS X still ships with gcc-4.1 so it worked fine. I tried compiling with mex on another x86 PC running Ubuntu 9.04 Jaunty (having install and changed the symbolic link of gcc to gcc-4.1 and also gcc-4.2 in two separate tests) and this is the verbose error message I get:&lt;br&gt;
&lt;br&gt;
# mex -v vech.c                                                                          &lt;br&gt;
-&amp;gt; mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)         &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;FILE = /root/.matlab/R2009a/mexopts.sh                                       &lt;br&gt;
----------------------------------------------------------------                &lt;br&gt;
-&amp;gt;    MATLAB                = /usr/local/matlab/R2009a                          &lt;br&gt;
-&amp;gt;    CC                    = gcc                                               &lt;br&gt;
-&amp;gt;    CC flags:                                                                 &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CFLAGS             = -ansi -D_GNU_SOURCE -fPIC -pthread -m32  -fexceptions -D_FILE_OFFSET_BITS=64                                                      &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CDEBUGFLAGS        = -g                                                &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;COPTIMFLAGS        = -O -DNDEBUG                                       &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CLIBS              = -Wl,-rpath-link,/usr/local/matlab/R2009a/bin/glnx86 -L/usr/local/matlab/R2009a/bin/glnx86 -lmx -lmex -lmat -lm -lstdc++           &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arguments          =  -DMX_COMPAT_32                                   &lt;br&gt;
-&amp;gt;    CXX                   = g++                                               &lt;br&gt;
-&amp;gt;    CXX flags:                                                                &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CXXFLAGS           = -ansi -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pthread                                                                         &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CXXDEBUGFLAGS      = -g                                                &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CXXOPTIMFLAGS      = -O -DNDEBUG                                       &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CXXLIBS            = -Wl,-rpath-link,/usr/local/matlab/R2009a/bin/glnx86 -L/usr/local/matlab/R2009a/bin/glnx86 -lmx -lmex -lmat -lm                    &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arguments          =  -DMX_COMPAT_32                                   &lt;br&gt;
-&amp;gt;    FC                    = g95                                               &lt;br&gt;
-&amp;gt;    FC flags:                                                                 &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FFLAGS             = -fexceptions -fPIC                                &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FDEBUGFLAGS        = -g                                                &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FOPTIMFLAGS        = -O                                                &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FLIBS              = -Wl,-rpath-link,/usr/local/matlab/R2009a/bin/glnx86 -L/usr/local/matlab/R2009a/bin/glnx86 -lmx -lmex -lmat -lm                    &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arguments          =  -DMX_COMPAT_32                                   &lt;br&gt;
-&amp;gt;    LD                    = gcc&lt;br&gt;
-&amp;gt;    Link flags:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDFLAGS            = -pthread -shared -m32 -Wl,--version-script,/usr/local/matlab/R2009a/extern/lib/glnx86/mexFunction.map -Wl,--no-undefined&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDDEBUGFLAGS       = -g&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDOPTIMFLAGS       = -O&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDEXTENSION        = .mexglx&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arguments          =&lt;br&gt;
-&amp;gt;    LDCXX                 =&lt;br&gt;
-&amp;gt;    Link flags:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDCXXFLAGS         =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDCXXDEBUGFLAGS    =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDCXXOPTIMFLAGS    =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDCXXEXTENSION     =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arguments          =&lt;br&gt;
----------------------------------------------------------------&lt;br&gt;
&lt;br&gt;
-&amp;gt; gcc -c  -I/usr/local/matlab/R2009a/extern/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC -pthread -m32  -fexceptions -D_FILE_OFFSET_BITS=64  -DMX_COMPAT_32 -O -DNDEBUG  &quot;vech.c&quot;&lt;br&gt;
&lt;br&gt;
vech.c:77:2: warning: no newline at end of file&lt;br&gt;
-&amp;gt; gcc -O -pthread -shared -m32 -Wl,--version-script,/usr/local/matlab/R2009a/extern/lib/glnx86/mexFunction.map -Wl,--no-undefined -o  &quot;vech.mexglx&quot;  vech.o  -Wl,-rpath-link,/usr/local/matlab/R2009a/bin/glnx86 -L/usr/local/matlab/R2009a/bin/glnx86 -lmx -lmex -lmat -lm -lstdc++&lt;br&gt;
&lt;br&gt;
/usr/bin/ld: cannot find -lstdc++&lt;br&gt;
collect2: ld returned 1 exit status&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mex: link of ' &quot;vech.mexglx&quot;' failed.&lt;br&gt;
&lt;br&gt;
Any luck with advice?&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
Tim&lt;br&gt;
&lt;br&gt;
&quot;Amin &quot; &amp;lt;azandvak@aecom.yu.edu&amp;gt; wrote in message &amp;lt;gua17m$m72$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have been using the latest version of matlab(2009a) on x64 ubuntu 8.10 for a couple of weeks now.&lt;br&gt;
&amp;gt; Every thing works fine but I can't make the matlab compile my C files into Matlab mex(using mex function). Intrepid is shipped with gcc 4.3.2 while the latest version that matlab supports is still gcc 4.2.3 so I think this should be the source of the problem.&lt;br&gt;
&amp;gt; When I mex a script, matlab warns me about the wrong version of the GCC and then the mex-ed file does not work properly. I get odd errors like &quot;out of memory&quot; or the mex ed function returns an incorrect value. The script works fine when I mex it on another computer with an older version of Linux(opensuse 10.3) which has a compatible GCC.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I tried to install an older version of GCC on intrepid but I either did it wrong or it didn't solve my problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I would appreciate if anyone have any idea/experience about solving this problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; amin</description>
    </item>
    <item>
      <pubDate>Thu, 05 Nov 2009 16:51:02 -0500</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#692464</link>
      <author>Christopher Hummersone</author>
      <description>Hey,&lt;br&gt;
&lt;br&gt;
I am having a similar problem. I'm running R2009a on Ubuntu 9.1 (karmic koala). Did you ever fix it? I also tried creating symbolic links, which stopped Matlab moaning about the GCC version, but they would compile and I got strange errors, that I didn't get using R2007a on a Mac running OS X 10.5 and Xcode.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Thu, 05 Nov 2009 16:58:03 -0500</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#692468</link>
      <author>Christopher Hummersone</author>
      <description>Hey,&lt;br&gt;
&lt;br&gt;
I am having a similar problem. I'm running R2009a on Ubuntu 9.1 (karmic koala). Did you ever fix it? I also tried creating symbolic links, which stopped Matlab moaning about the GCC version, but they would compile and I got strange errors, that I didn't get using R2007a on a Mac running OS X 10.5 and Xcode.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Mon, 09 Nov 2009 11:29:02 -0500</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#693179</link>
      <author>Christopher Hummersone</author>
      <description>Well I've got pretty close: I installed gcc-4.2 etc and changed the symlinks in /usr/bin to point to them (as opposed to gcc-4.4 etc) and created a symlinks named 'glnxa64' pointing to 'glnx86' in the following directories:&lt;br&gt;
$matlabroot/extern/lib&lt;br&gt;
$matlabroot/bin&lt;br&gt;
&lt;br&gt;
My main problem now seems to revolve around the 'ld' library in /usr/bin. Specifically I get the following error:&lt;br&gt;
&lt;br&gt;
/usr/bin/ld: skipping incompatible $matlabroot/bin/glnxa64/libmx.so when searching for -lmx&lt;br&gt;
&lt;br&gt;
which, due to the aforementioned symlink, is actually in &lt;br&gt;
$matlabroot/bin/glnx86/libmx.so&lt;br&gt;
&lt;br&gt;
So now I'm stumped! I guess it's some 32/64 bit incompatibility but I have no idea where to begin trying to fix it!&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Mon, 09 Nov 2009 11:39:02 -0500</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#693182</link>
      <author>Christopher Hummersone</author>
      <description>Oh and I also edited:&lt;br&gt;
&lt;br&gt;
~/.matlab/R2009a/mexopts.sh&lt;br&gt;
&lt;br&gt;
and commented out the line &lt;br&gt;
&lt;br&gt;
CFLAGS='-ansi -D_GNU_SOURCE'&lt;br&gt;
&lt;br&gt;
in the 'glnxa64' section, per this post:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://forums.opensuse.org/programming-scripting/396126-gcc-matlab-opensuse-11-a.html#post1875821&quot;&gt;http://forums.opensuse.org/programming-scripting/396126-gcc-matlab-opensuse-11-a.html#post1875821&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Chris</description>
    </item>
    <item>
      <pubDate>Sat, 05 Dec 2009 17:38:03 -0500</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#700112</link>
      <author>Aman P.V. P.V</author>
      <description>Hi,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I also faced the same problem with matlab 2009a on x32 ubuntu 9.04. I resolved it installing gcc 4.2. you may need 4.3 also for other purposes. So you can use gcc alternatives and choose gcc 4.2 as the default version. &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I hope the following link will help you in doing that. &lt;br&gt;
&amp;lt;&lt;a href=&quot;http://www.infohit.net/blog/post/alternative-gcc-compilers-on-ubuntu-intrepid-and-jaunty.html&quot;&gt;http://www.infohit.net/blog/post/alternative-gcc-compilers-on-ubuntu-intrepid-and-jaunty.html&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Amin &quot; &amp;lt;azandvak@aecom.yu.edu&amp;gt; wrote in message &amp;lt;gua17m$m72$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have been using the latest version of matlab(2009a) on x64 ubuntu 8.10 for a couple of weeks now.&lt;br&gt;
&amp;gt; Every thing works fine but I can't make the matlab compile my C files into Matlab mex(using mex function). Intrepid is shipped with gcc 4.3.2 while the latest version that matlab supports is still gcc 4.2.3 so I think this should be the source of the problem.&lt;br&gt;
&amp;gt; When I mex a script, matlab warns me about the wrong version of the GCC and then the mex-ed file does not work properly. I get odd errors like &quot;out of memory&quot; or the mex ed function returns an incorrect value. The script works fine when I mex it on another computer with an older version of Linux(opensuse 10.3) which has a compatible GCC.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I tried to install an older version of GCC on intrepid but I either did it wrong or it didn't solve my problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I would appreciate if anyone have any idea/experience about solving this problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; amin</description>
    </item>
    <item>
      <pubDate>Mon, 25 Jan 2010 07:22:04 -0500</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#711048</link>
      <author>Max </author>
      <description>I faced the same problem with gcc compiler and here is the solution I found (neither of the above worked for me (at least, for c programs)).&lt;br&gt;
I'm working on Mandriva 2010 - 64 bit, which comes with gcc4.4.1 and Matlab 2009b (64 bit), which requires gcc4.1 - 4.2. gcc-c++ is not installed.&lt;br&gt;
&lt;br&gt;
First of all, back up the files you are going to change.&lt;br&gt;
&lt;br&gt;
open  mexopts.sh  in   ~/.matlab/R2009a/   and comment &quot; CLIBS=&quot;$CLIBS -lstdc++&quot; &quot; in the section corresponding to your machine architecture (mine was glnxa64) )  (if gcc-c++ is installed on your machine, it might be not necessary, but other problems might arise)&lt;br&gt;
&lt;br&gt;
At some point, I also changed CC variable (C compiler) to    CC='gcc4.2'  from CC='gcc', and it did work after that (or so it seems now), but it kept giving me a warning line: &quot;UpperTriag.c:27:2: warning: no newline at end of file&quot; (UpperTriag.c is the file I'm compiling) and I preferred another solution to the problem: &lt;br&gt;
&lt;br&gt;
in the file &quot;/matlab/bin/mex&quot; (/matlab is the root directory for Matlab) I inserted LD=&quot;gcc4.2&quot; right after  LD=&quot;`eval echo $LD`&quot;  (which, of course, can be commented after that). Now Matlab gives it's standard warning:&lt;br&gt;
&quot;Warning: You are using gcc version &quot;4.4.1&quot;.  The earliest gcc version supported&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with mex is &quot;4.1&quot;.  The latest version tested for use with mex is &quot;4.2&quot;.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;To download a different version of gcc, visit &lt;a href=&quot;http://gcc.gnu.org&quot;&gt;http://gcc.gnu.org&lt;/a&gt; &quot;&lt;br&gt;
but it doesn't reflect the reality anymore.&lt;br&gt;
&lt;br&gt;
I tried to reconstruct all the steps I've done, and hope it works. Some changes I've made following the advices on this page could have stay, but it's highly unlikely.</description>
    </item>
    <item>
      <pubDate>Thu, 13 May 2010 18:35:21 -0400</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#745080</link>
      <author>ubuntu21 T</author>
      <description>The following solution works well on my Ubuntu 10.04 x86 (32bit), tested on both Matlab R2010a and R2008b (the linux versions) + gcc-4.1&lt;br&gt;
&lt;br&gt;
After installation, MATLAB worked out-of-the-box for me, except Simuink/&quot;Embedded MATLAB Function&quot;, which I use a lot to run my simulations. I got all sort of errors and eventually came up with the following simple solution.&lt;br&gt;
&lt;br&gt;
The problem, as mentioned throughout all this topic is that gcc-4.4 coming with Ubuntu 10.04 is unsupported by latest matlab version (R2010a). Ok, so let us simply install a version of gcc that is supported and make the proper link towards it: &lt;br&gt;
&lt;br&gt;
Step1) one has to uncomment &quot;multiverse&quot; and &quot;universe&quot; repositories in /etc/apt/sources.list by removing the # sign before each repo, so that we may gain acces to some needed software (like gcc4.1):&lt;br&gt;
$sudo vi /etc/apt/sources.list           &amp;lt;- and there remove # before all &quot;multiverse&quot; and &quot;universe&quot; repos&lt;br&gt;
$sudo apt-get update&lt;br&gt;
&lt;br&gt;
Step2) Since apparently gcc4.2 is not offered by default (or at least at this date), no problem, just go for gcc4.1 which is highly robust to do the job:&lt;br&gt;
$sudo apt-get install gcc-4.1 gcc-4.1-multilib libstdc++6-4.1-dev&lt;br&gt;
&lt;br&gt;
Step3) The trick is that by actually installing gcc-4.1, the install procedure will not also change the default symbolic link from  /usr/bin/gcc -&amp;gt; /usr/bin/gcc-4.4 , so we will have to do it manually:&lt;br&gt;
$sudo cd /usr/bin/&lt;br&gt;
$sudo ln -s gcc-4.1 gcc&lt;br&gt;
And now just verify the link was properly done:&lt;br&gt;
$sudo ls -la|grep gcc&lt;br&gt;
And one should get something like this (copy-pasted from my console)&lt;br&gt;
lrwxrwxrwx  1 root   root           7 2010-05-09 14:59 gcc -&amp;gt; gcc-4.1&lt;br&gt;
&lt;br&gt;
That's all. For me it works all very well. &lt;br&gt;
Good luck.</description>
    </item>
    <item>
      <pubDate>Wed, 20 Oct 2010 13:09:04 -0400</pubDate>
      <title>Re: problem with Matlab 2009a on x64 Ubuntu intrepid</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251094#789178</link>
      <author>Michael Thanou</author>
      <description>&quot;ubuntu21 T&quot; &amp;lt;tcstefanro@gmail.com&amp;gt; wrote in message &amp;lt;hshgp9$kf3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; The following solution works well on my Ubuntu 10.04 x86 (32bit), tested on both Matlab R2010a and R2008b (the linux versions) + gcc-4.1&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; After installation, MATLAB worked out-of-the-box for me, except Simuink/&quot;Embedded MATLAB Function&quot;, which I use a lot to run my simulations. I got all sort of errors and eventually came up with the following simple solution.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The problem, as mentioned throughout all this topic is that gcc-4.4 coming with Ubuntu 10.04 is unsupported by latest matlab version (R2010a). Ok, so let us simply install a version of gcc that is supported and make the proper link towards it: &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Step1) one has to uncomment &quot;multiverse&quot; and &quot;universe&quot; repositories in /etc/apt/sources.list by removing the # sign before each repo, so that we may gain acces to some needed software (like gcc4.1):&lt;br&gt;
&amp;gt; $sudo vi /etc/apt/sources.list           &amp;lt;- and there remove # before all &quot;multiverse&quot; and &quot;universe&quot; repos&lt;br&gt;
&amp;gt; $sudo apt-get update&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Step2) Since apparently gcc4.2 is not offered by default (or at least at this date), no problem, just go for gcc4.1 which is highly robust to do the job:&lt;br&gt;
&amp;gt; $sudo apt-get install gcc-4.1 gcc-4.1-multilib libstdc++6-4.1-dev&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Step3) The trick is that by actually installing gcc-4.1, the install procedure will not also change the default symbolic link from  /usr/bin/gcc -&amp;gt; /usr/bin/gcc-4.4 , so we will have to do it manually:&lt;br&gt;
&amp;gt; $sudo cd /usr/bin/&lt;br&gt;
&amp;gt; $sudo ln -s gcc-4.1 gcc&lt;br&gt;
&amp;gt; And now just verify the link was properly done:&lt;br&gt;
&amp;gt; $sudo ls -la|grep gcc&lt;br&gt;
&amp;gt; And one should get something like this (copy-pasted from my console)&lt;br&gt;
&amp;gt; lrwxrwxrwx  1 root   root           7 2010-05-09 14:59 gcc -&amp;gt; gcc-4.1&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; That's all. For me it works all very well. &lt;br&gt;
&amp;gt; Good luck.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Since you have installed gcc4.1 with '$sudo apt-get install gcc-4.1 gcc-4.1-multilib libstdc++6-4.1-dev' I think it is better not to create the symbolic link for gcc-4.1 as that will make linux use gcc-4.1 instead of gcc-4.4. For example if you compile a file with gcc using the command 'gcc file.c' you will use gcc version 4.1 instead of 4.4.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;All we need to do is to configure Matlab to use gcc-4.1 instead of gcc (which is version 4.4). This can be done by editing the file &amp;lt;matlab_root&amp;gt;\bin\mexopts.sh. In this file you have to change the lines  CC='gcc' to CC='gcc-4.1'. After that you will be able to compile mex-functions using gcc 4.1. These lines are also located in the files matopts.sh and mbuildopts.sh.  You may also change these files in order to use other matlab commands like mcc. &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
    </item>
  </channel>
</rss>

