Back to the main page.

Bug 1139 - Library not loaded: /usr/local/lib/libgfortran.2.dylib

Status CLOSED FIXED
Reported 2011-11-10 23:25:00 +0100
Modified 2011-11-23 12:00:17 +0100
Product: FieldTrip
Component: multivariate
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P3 normal
Assigned to: marcel van gerven
URL:
Tags:
Depends on:
Blocks:
See also:

Matt Mollison - 2011-11-10 23:25:20 +0100

I'm using fieldtrip-20111101 on a MacBook Pro running OS X 10.7.2 and Matlab R2011a. Problem: I was going through the multivariateanalysis tutorial [I first had to addpath(genpath(fieldtrip-20111101/multivariate)) because it's not included in ft_defaults]. I got to the line about using ft_mv_glmnet in the dimensionality reduction, but it threw an error because it couldn't find /usr/local/lib/libgfortran.2.dylib. Matlab error: Warning: Invalid MEX-file '/Users/matt/Documents/MATLAB/fieldtrip-20111101/multivariate/external/glmnet/glmnetMex.mexmaci64': dlopen(/Users/matt/Documents/MATLAB/fieldtrip-20111101/multivariate/external/glmnet/glmnetMex.mexmaci64, 1): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Users/matt/Documents/MATLAB/fieldtrip-20111101/multivariate/external/glmnet/glmnetMex.mexmaci64 Reason: image not found > In ft_mv_glmnet>ft_mv_glmnet.train at 406 In ft_mv_analysis>ft_mv_analysis.train at 74 In ft_mv_crossvalidator>ft_mv_crossvalidator.train/train_sequential at 206 In ft_mv_crossvalidator>ft_mv_crossvalidator.train at 158 In statistics_crossvalidate at 107 In ft_freqstatistics at 269 A solution: I used the instructions from here <http://www.cs.ubc.ca/~hoffmanm/matlab.html> to download the libgfortran 4.2 tarball from here <http://r.research.att.com/tools/> listed under OS X 10.6 and copied the libgfortran* files to /usr/local/lib. It worked after that. I don't know whether I also need the x86_64 directory in that tarball (which only contains more symlinks), but I didn't copy it.


marcel van gerven - 2011-11-20 18:58:19 +0100

added solution to absence of libgfortran to ft_mv_glmnet documentation


Boris Reuderink - 2011-11-23 12:00:17 +0100

Great. Marcel's fix is introduced in SVN revision r4778.