Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: problem with Matlab 2009a on x64 Ubuntu intrepid
Date: Mon, 11 May 2009 20:19:02 +0000 (UTC)
Organization: Albert Einstein College of Medicine
Lines: 9
Message-ID: <gua17m$m72$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1242073142 22754 172.30.248.38 (11 May 2009 20:19:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 11 May 2009 20:19:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1234502
Xref: news.mathworks.com comp.soft-sys.matlab:539086


I have been using the latest version of matlab(2009a) on x64 ubuntu 8.10 for a couple of weeks now.
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.
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 "out of memory" 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.

I tried to install an older version of GCC on intrepid but I either did it wrong or it didn't solve my problem.

I would appreciate if anyone have any idea/experience about solving this problem.

amin