From: Md. Shahriar Karim on
josef cullhed <josefcullhed(a)gmail.com> wrote in message <c0b44e0f-2814-4381-88d5-dc148e0157f5(a)e21g2000yqb.googlegroups.com>...
> On 29 Maj, 16:44, "Jifeng Hu" <j...(a)math.umn.edu> wrote:
> > Hey all,
> >
> > Recently I was running a make file in Matlab, which is to create a matlab MEX file from several C subroutines.  It works fine with Matlab 2007b, but fails with both matlab2008a,b and 2009a. Can anyone here can help me out?
> >
> > The make file reads as:
> > ---------------------------------------------------------------------------------------------------------------------
> > function make(propensity_file)
> > %MAKE Makefile for MEXRDME.
> > %   MAKE(P) Makes URDME with propensity source file P.
> >
> > % J. Cullhed 2008-06-18
> >
> > % Find path.
> > path=[pwd '/'];
> > define=[];
> >
> > % Set propensity file. This defaults to propensities.h.
> > if nargin>0
> >   if strcmp(propensity_file,'test')
> >     propensity_source=[path '../test/spin_propensities.c '];
> >   else
> >     propensity_source=[path propensity_file ' '];
> >   end
> > else
> >    error('No target to make.');
> > end
> >
> > % Include and source directories.
> > include = ['-I' path '../include'];
> > link= ['-L' path '../src'];
> >
> > % Mex extension.
> > mx = mexext;
> >
> > % Amd 64.
> > if strcmp(mx,'mexa64')
> >   define=[define '-DMALLOC\(n\)=mxMalloc\(n\) -DFREE\(p\)=mxFree\(p\)'];
> >   cc='CC=gcc';
> >   cflags='CFLAGS=-O3 -ftree-vectorize -Wall -pedantic -fPIC -std=gnu99 ';
> >   cflags=[cflags define];
> >   ldflags='LFLAGS=-pthread';
> >   source=[path '../src/mexrdme.c ' propensity_source  path ...
> >           '../src/rdme.c ' path '../src/binheap.c ' path '../src/report.c'];
> >
> >   mex(cc, cflags, include, ldflags, '-largeArrayDims', link, source)
> >
> > % Intel Mac gcc.
> > elseif strcmp(mx,'mexmaci')
> >   define=[define '-DMALLOC\(n\)=mxMalloc\(n\) -DFREE\(p\)=mxFree\(p\)'];
> >   cc='CC=gcc';  
> >   cflags='CFLAGS=-O3 -ftree-vectorize -Wall -fPIC -std=gnu99 ';
> >   cflags=[cflags define];
> >   ldflags='LFLAGS=-bundle -flat_namespace --no-undefined';
> >   source=[path '../src/mexrdme.c ' propensity_source  path ...
> >           '../src/rdme.c ' path '../src/binheap.c ' path '../src/report.c'];
> >
> >   mex(cc, cflags, include,ldflags, '-largeArrayDims', link, source)
> > else
> >   error(['Platform not yet supported. Your mex extension is ' mx ...
> >          '. Please edit make.m to allow for this extension.']);
> > end
> > ---------------------------------------------------------------------------------------------------------------------
> >
> > All the matlab versions I tried has: mexext=mexa64.
> >
> > When I ran the make file in Matlab 2008a,b or 2009a, A error message pops up as
> > ---------------------------------------------------------------------------------------------------------------------
> > make ../examples/bistab/bistab.c;
> >
> >     mex:  /home/msib/hujifeng/urdme/msrc/../src/mexrdme.c /home/msib/hujifeng/urdme/msrc/../examples/bistab/bistab.c /home/msib/hujifeng/urdme/msrc/../src/rdme.c /home/msib/hujifeng/urdme/msrc/../src/binheap.c /home/msib/hujifeng/urdme/msrc/../src/report.c  not a normal file or does not exist.
> >
> > ??? Error using ==> mex at 213
> > Unable to complete successfully.
> >
> > Error in ==> make at 39
> >   mex(cc, cflags, include, ldflags, '-largeArrayDims', link, source)
> > ---------------------------------------------------------------------------------------------------------------------
> >
> > Why the make file works well in matlab2007b, but not in matlab 2008 and 2009?
> >
> > Thank you in advance.
>
> On what platform are you trying to compile urdme on? Check your mex
> extension in matlab by typing mexext in the command prompt.
>
> // Josef Cullhed



Hi,

I also face almost a similar problem:
***************************************************************************
make ../urdme/examples/bistab.c

Warning: You are using gcc version "4.4.3-4ubuntu5)". The version
currently supported with MEX is "4.2.3".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/


mex: /home/umulislab/Documents/urdme/msrc/../src/mexrdme.c /home/umulislab/Documents/urdme/msrc/../urdme/examples/bistab.c /home/umulislab/Documents/urdme/msrc/../src/rdme.c /home/umulislab/Documents/urdme/msrc/../src/binheap.c /home/umulislab/Documents/urdme/msrc/../src/report.c not a normal file or does not exist.

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

Error in ==> make at 39
mex(cc, cflags, include, ldflags, '-largeArrayDims', link, source)

***********************************************************************************
Mex extension is

>> mexext

mexa64