probml / pmtk3

Probabilistic Modeling Toolkit for Matlab/Octave.
MIT License
1.55k stars 797 forks source link

glmnet does not run on mac os X 64 bit #17

Open ido opened 10 years ago

ido commented 10 years ago

From murphyk2 on February 28, 2011 14:51:15

What steps will reproduce the problem? x=randn(100,20); y=randn(100,1); fit=glmnet(x,y); What is the expected output? What do you see instead? it shoudl return a struct. Instead it returns

x=randn(100,20); y=randn(100,1); fit=glmnet(x,y); ??? Invalid MEX-file '/Users/kpmurphy/pmtksupport/glmnet-matlab/glmnetMex.mexmaci64': dlopen(/Users/kpmurphy/pmtksupport/glmnet-matlab/glmnetMex.mexmaci64, 1): Library not loaded: /usr/local/lib/libgfortran.2.dylib Referenced from: /Users/kpmurphy/pmtksupport/glmnet-matlab/glmnetMex.mexmaci64 Reason: image not found.

Error in ==> glmnet at 254 [a0,ca,ia,nin,rsq,alm,nlp,jerr] = glmnetMex(parm,x,y,jd,vp,ne,nx,nlam,flmin,ulam,thresh,isd,weights,ka);

254 [a0,ca,ia,nin,rsq,alm,nlp,jerr] = glmnetMex(parm,x,y,jd,vp,ne,nx,nlam,flmin,ulam,thresh,isd,weights,ka); Please use labels and text to provide additional information. it cannot find this fortran library:

/usr/local/lib/libgfortran.2.dylib

Original issue: http://code.google.com/p/pmtk3/issues/detail?id=17

ido commented 10 years ago

From olivier....@gmail.com on June 13, 2011 17:21:23

I have the same issue, has anyone found a solution?

ido commented 10 years ago

From olivier....@gmail.com on June 13, 2011 17:34:12

Apparently this library /usr/local/lib/libgfortran.2.dylib is misplaced. Creating a symbolic link to the file in /usr/local/lib/ solved this issue for me. In my case, this library was available through an R install: /Library/Frameworks/R.framework/Versions/Current/Resources/lib/libgfortran.2.dylib

ido commented 10 years ago

From e...@synful.com on November 27, 2012 16:00:56

I am running 64 bit Mac OSX 10.7.5 and Matlab 2012a. initPmtk3 is crashing on me at the glmnetMex line 254. No message is provided, Matlab just dissappears. I added a symbolic link as instructed to the same R.framework library described above so I now have an entry for libgfortran.2.dylib in /usr/local/lib. However I still get the same crash. Any ideas.

ido commented 10 years ago

From nsa...@gmail.com on May 18, 2013 14:07:14

It took me installing a symlink to /Library/Frameworks/R.framework/Versions/3.0/Resources/lib/libgfortran.2.dylib in the matlab directory that contains the libgfortran.3.dylib, i.e., /Applications/MATLAB_R2012b.app/sys/os/maci64/ . Finally glmnet runs. Haven't done extensive testing of features though.

ido commented 10 years ago

From murphyk2 on May 19, 2013 20:35:30

Getting glmnet to run on mac os X 64 bit

ido commented 10 years ago

From oma...@gmail.com on September 17, 2013 10:35:03

4 solved the problem! Thanks!