Path: news.mathworks.com!not-for-mail
From: "Ben Abbott" <bpabbott@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Problems with fortran mex on MACOSX Leopard
Date: Thu, 3 Jan 2008 03:47:24 +0000 (UTC)
Organization: Sawtek Inc
Lines: 83
Message-ID: <flhlsc$7v8$1@fred.mathworks.com>
References: <fga3tm$1p6$1@fred.mathworks.com> <fgfp8d$p7a$1@fred.mathworks.com> <fl5etm$fve$1@fred.mathworks.com> <477BD186.1040709@mathworks.com>
Reply-To: "Ben Abbott" <bpabbott@yahoo.com>
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 1199332044 8168 172.30.248.35 (3 Jan 2008 03:47:24 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Jan 2008 03:47:24 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 230244
Xref: news.mathworks.com comp.soft-sys.matlab:444126



Brian,

I'm presently running Leopard (Xcode 3.0) on both PPC and Intel boxes. 
Unfortunately, I don't have a convenient method to run Xcode 2.4.1.

However, as a side note, I was successful with building mex files for PPC and 
Intel on Tiger using g77, g95, and gfortran.

I presently use a make file that optionally builds using g95 and gfortran on 
Tiger. If it may be of some use, I'm happy to post it.

Regarding "a future MATLAB release", I look forward to it.

Some background on my problem: My mex file crashes when with

dyld: Symbol not found: _mxgetnumberofelements_

Checking libraries all I find is "_mxGetNumberOfElements". Since that is in 
CamelCase, there is no way for me to link to it :-(

With this small piece of information, it appears to me that the fortran 
interface for 2008b has a problem, but if Xcode 2.4.1 works then that can't 
be true.

I'd be appreciative if can you give me some more detail as to what the 
problem is with 2007b and Xcode 3.0? Perhaps I can find a work around by 
using g95's f2003 bindings (soon to come for gfortran as well).

TiA
Ben


Brian Arnold <barnold@mathworks.com> wrote in message 
<477BD186.1040709@mathworks.com>...
> Hi Ben,
> 
> We use the same g95 built for Tiger, out-of-box from the original 
> sources, using Xcode 2.4.1.  Make sure you are using Xcode 2.4.1.
> 
> We would prefer to support gfortran, and it is possible to use gfortran 
> instead.  However until very recently, gfortran did not support %val 
> which many customers (including us) use, on multiple platforms, which is 
> why we only support g95 on all Unix platforms.  Now that gfortran 
> supports %val as of gcc 4.2.2, it's our intention to qualify and use 
> gfortran in a future MATLAB release (barring unforeseen disasters).
> 
> HTH,
> 
> - Brian
> 
> Ben Abbott wrote:
> > Brian,
> > 
> > Do I understand correclty, that TMW built g95 on Tiger, and then used it 
> > successfully on Leopard?
> > 
> > In either event, any chance a pure Leopard solution might be forth 
coming 
> > with 2008a?
> > 
> > I'd personally like to be able to use gfortran since this is the direction 
that 
> > gnu is headed with their compilers ... but would be happy with g95 0.90  
> > solution.
> > 
> > TiA
> > 
> > Brian Arnold <barnold@mathworks.com> wrote in message 
> > <fgfp8d$p7a$1@fred.mathworks.com>...
> >> Hi Ibon,
> >>
> >> When we ran our qualification tests, we used g95 (built on Tiger using 
> >> Xcode 2.4.1) with MATLAB and Xcode 3 on Leopard for the MEXing.
> >>
> >> From the looks of the g95 failure below, it could be that g95 isn't 
> >> built right, or that the version of Xcode on Leopard is wrong.  Did you 
> >> install Xcode 3 from the DVD?
> >>
> >> - Brian
> >>
> >