Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: mex, gfortran, R14a and OS X 10.9
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Gideon Simpson

Posts: 35
Registered: 2/20/10
mex, gfortran, R14a and OS X 10.9
Posted: Jun 26, 2014 4:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'm trying to use mex to build matlab interfaces to some fortran code. This is on an OS X 10.9 machine with gfortran provided by macports. While I've had no problem with combining mex and C, I can't seem to get things working properly with fortran. If I just try the standard yprimef file, I get the following errors:

mex -v yprimef.F
Verbose mode is on.
Neither -compatibleArrayDims nor -largeArrayDims is selected.
Using -compatibleArrayDims. In the future, MATLAB will require the use of
-largeArrayDims and remove the -compatibleArrayDims option.
For more information:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
... Looking for compiler 'gfortran' ...
... Executing command 'which gfortran' ...Yes ('/opt/local/bin/gfortran').
... Looking for folder '/opt/local/bin' ...Yes.
... Executing command 'which gfortran' ...Yes ('/opt/local/bin/gfortran').
... Executing command 'gfortran -print-file-name=libgfortran.dylib' ...Yes ('/opt/local/lib/gcc48/libgfortran.dylib').
... Looking for folder '/opt/local/lib/gcc48' ...Yes.
... Executing command 'which gfortran' ...Yes ('/opt/local/bin/gfortran').
... Executing command 'gfortran -print-file-name=libgfortranbegin.a' ...Yes ('/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2/libgfortranbegin.a').
... Looking for folder '/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2' ...Yes.
... Executing command 'xcode-select -print-path' ...Yes ('/Applications/Xcode.app/Contents/Developer').
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk' ...No.
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' ...Yes.
... Executing command 'xcode-select -print-path' ...Yes ('/Applications/Xcode.app/Contents/Developer').
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk' ...No.
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' ...Yes.
... Executing command 'echo /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk | rev | cut -c1-10 | rev | egrep -oh '[0-9]+\.[0-9]+'' ...Yes ('10.8').
Found installed compiler 'gfortran'.
Options file details
-------------------------------------------------------------------
Compiler location: /opt/local/bin
Options file: /Users/gideonsimpson/.matlab/R2014a/mex_FORTRAN_maci64.xml
CMDLINE1 : /opt/local/bin/gfortran -c -DMX_COMPAT_32 -I"/Applications/MATLAB_R2014a.app/extern/include" -I"/Applications/MATLAB_R2014a.app/simulink/include" -fexceptions -m64 -fbackslash -O /Users/gideonsimpson/code/mex_fort/yprimef.F -o /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o
CMDLINE2 : xcrun -sdk macosx10.8 clang -Wl,-twolevel_namespace -undefined error -mmacosx-version-min=10.8 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -bundle -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014a.app/extern/lib/maci64/fexport.map" -O /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o -L"/Applications/MATLAB_R2014a.app/bin/maci64" -lmx -lmex -lmat -L"/opt/local/lib/gcc48" -lgfortran -L"/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2" -lgfortranbegin -o yprimef.mexmaci64
CMDLINE3 : rm -f /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o
FC : /opt/local/bin/gfortran
FDEFINES : -DMX_COMPAT_32
FFLAGS : -fexceptions -m64 -fbackslash
INCLUDE : -I"/Applications/MATLAB_R2014a.app/extern/include" -I"/Applications/MATLAB_R2014a.app/simulink/include"
FOPTIMFLAGS : -O
FDEBUGFLAGS : -g
LDF : xcrun -sdk macosx10.8 clang
LDFLAGS : -Wl,-twolevel_namespace -undefined error -mmacosx-version-min=10.8 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -bundle -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014a.app/extern/lib/maci64/fexport.map"
LINKEXPORT : -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014a.app/extern/lib/maci64/fexport.map"
LINKLIBS : -L"/Applications/MATLAB_R2014a.app/bin/maci64" -lmx -lmex -lmat -L"/opt/local/lib/gcc48" -lgfortran -L"/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2" -lgfortranbegin
LDOPTIMFLAGS : -O
LDDEBUGFLAGS : -g
OBJEXT : .o
LDEXT : .mexmaci64
GFORTRAN_INSTALLDIR : /opt/local/bin
GFORTRAN_LIBDIR : /opt/local/lib/gcc48
GFORTRANBEGIN_LIBDIR : /opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2
ISYSROOT : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
SDKVER : 10.8
MATLABROOT : /Applications/MATLAB_R2014a.app
ARCH : maci64
SRC : /Users/gideonsimpson/code/mex_fort/yprimef.F
OBJ : /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o
OBJS : /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o
SRCROOT : /Users/gideonsimpson/code/mex_fort/yprimef
DEF : /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.def
EXP : yprimef.exp
LIB : yprimef.lib
EXE : yprimef.mexmaci64
ILK : yprimef.ilk
MANIFEST : yprimef.mexmaci64.manifest
TEMPNAME : yprimef
EXEDIR :
EXENAME : yprimef
OPTIM : -O
LINKOPTIM : -O
-------------------------------------------------------------------
Building with 'gfortran'.
/opt/local/bin/gfortran -c -DMX_COMPAT_32 -I"/Applications/MATLAB_R2014a.app/extern/include" -I"/Applications/MATLAB_R2014a.app/simulink/include" -fexceptions -m64 -fbackslash -O /Users/gideonsimpson/code/mex_fort/yprimef.F -o /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o
Warning: Nonexistent include directory "/Applications/MATLAB_R2014a.app/simulink/include"

xcrun -sdk macosx10.8 clang -Wl,-twolevel_namespace -undefined error -mmacosx-version-min=10.8 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -bundle -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014a.app/extern/lib/maci64/fexport.map" -O /var/folders/mt/d41ws0y93tx_n1g6z_xdfw340000gn/T//mex_36655018335544_2379/yprimef.o -L"/Applications/MATLAB_R2014a.app/bin/maci64" -lmx -lmex -lmat -L"/opt/local/lib/gcc48" -lgfortran -L"/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2" -lgfortranbegin -o yprimef.mexmaci64
Undefined symbols for architecture x86_64:
"_mexfunction_", referenced from:
-exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.