GLEON / GLMr

R package for basic GLM model running
8 stars 16 forks source link

macglm library load issue (GLMr v3.1.10) #103

Open colin-a-smith opened 8 years ago

colin-a-smith commented 8 years ago

I'm attempting to use GLMr (v 3.1.10) on OS X El Capitan (v 10.11.1) and receive the following error when evaluating run_glm(...):

dyld: Library not loaded: libifcore.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/GLMr/exec/macglm Reason: image not found [1] 5

I've tried pointing 'DYLD_LIBRARY_PATH' and 'DYLD_FALLBACK_LIBRARY_PATH' to the .dylib files in */extbin/macGLM/bin/ via the terminal to no avail. Any help on this front is greatly appreciated.

Thanks!

lawinslow commented 8 years ago

Interesting. Internet says the libraries are being found, but they "can't be used". Vague.

@jread-usgs what OS X version are you on? We may need to figure out how to bundle libraries on OS X differently for v10.11.

jordansread commented 8 years ago

I am still on Yosemite, and won't upgrade for a bit now. I think some others are on El C in the office that we can test on.

lawinslow commented 8 years ago

hmm, @hdugan, what OS X version you running these days?

hdugan commented 8 years ago

Tested it out with Colin yesterday. Mine's running fine on Yosemite.

On Wed, Feb 3, 2016 at 8:33 PM, Luke Winslow notifications@github.com wrote:

hmm, @hdugan https://github.com/hdugan, what OS X version you running these days?

— Reply to this email directly or view it on GitHub https://github.com/GLEON/GLMr/issues/103#issuecomment-179565558.

cayelan commented 8 years ago

Did anyone figure this issue out? I just upgraded to El Capitan (v.10.11.4) and had the same exact problem with GLMr libifcore.dylib libraries as @colin-a-smith did, with the same error messages in R (v.3.3.0). Any help would be super appreciated- thank you!

lawinslow commented 8 years ago

@cayelan Just to check, does the command-line GLM version (from here) work for you?

jordansread commented 8 years ago

We don't have a compiler for El Capitan, so I don't know if we can build GLM for that version of the OS.

cayelan commented 8 years ago

@jread-usgs argh, ok. @lawinslow I've only run GLM on my mac via R. It seems like this DYLD_LIBRARY_PATH problem is not specific to GLMr but also other applications on macs (Matlab, etc.), but there are no easy fixes.

jordansread commented 8 years ago

I am guessing it isn't a simple fix, but we'd love some help from others that might be willing to dig into it.

cayelan commented 8 years ago

Ok- I found a workaround to run GLMr in El Cap: if you disable SIP (System Integrity Protection), I had no problems with GLMr. See: https://github.com/oracle/node-oracledb/issues/231. SIP prevents any of the DYLD_LIBRARY commands from working, explaining both my and @colin-a-smith's issues. I disabled SIP on two El Cap macs in my lab yesterday that previously weren't able to run GLMr and it worked successfully on both of them.

jordansread commented 8 years ago

Nice! 👍

@colin-a-smith does this fix work for you? Sounds like it should

colin-a-smith commented 8 years ago

Yes, that fixed worked for me. Thanks @cayelan !

lawinslow commented 8 years ago

Great, I'm going to close this issue then. If there are future issues, go ahead and reopen this issue

yvesprairie commented 8 years ago

Hi all,

It seems that the issue is not fully resolved. I get the exact same problem with the error: dyld: Library not loaded: libifcore.dylib

I have tried Cayelan's trick of disabling SIP on my El C. computer but I get the same response. I'm using the macglm 2.0.0. Any ideas/suggestions?

Many thanks for any help you can provide. Yves

lawinslow commented 8 years ago

@yvesprairie: could you give us a full record of the command you're trying to run, with the full error output? In addition, it would be great to have the output of the devtools::session_info() command (you will need to install the devtools package). It should look something like this.

> devtools::session_info()
Session info ----------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.1 (2016-06-21)
 system   x86_64, mingw32             
 ui       RStudio (0.99.896)          
 language (EN)                        
 collate  English_United States.1252  
 tz       America/Chicago             
 date     2016-09-23                  

Packages --------------------------------------------------------------------------------------------------------------
 package  * version date       source        
 devtools   1.12.0  2016-06-24 CRAN (R 3.3.1)
 digest     0.6.10  2016-08-02 CRAN (R 3.3.1)
 memoise    1.0.0   2016-01-29 CRAN (R 3.3.1)
 withr      1.0.2   2016-06-20 CRAN (R 3.3.1)
jordansread commented 8 years ago

Also good to know what OS version for mac is being used. Didn't apple release Sierra recently?

yvesprairie commented 8 years ago

Sorry for the delay in replying . First, and perhaps this is part of the problem, I am not using GLMr but macglm on OS 10.11.6 (El Capitan). to make sure the SIP is indeed disabled, I ran the following command in Terminal: MacBook-Pro-de-Yves-Prairie:~ yvesprairie$ csrutil status System Integrity Protection status: disabled.

When I try to run macglm directly I get the following response:

MacBook-Pro-de-Yves-Prairie:~ yvesprairie$ /Users/yvesprairie/Downloads/macglm_2.0.0/macglm ; exit; dyld: Library not loaded: libifcore.dylib Referenced from: /Users/yvesprairie/Downloads/macglm_2.0.0/macglm Reason: image not found Trace/BPT trap: 5 logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.

[Process completed]

I have done, prior to the above, all the steps described in https://github.com/AquaticEcoDynamics/GLM/README.Macintosh

I suppose I could try to make my own build from the source code but that seems excessive. Mind you, I haven't tried the GLMr version, perhaps I should but I generally have an epidermic reaction to anything having to do with R. :)

Cheers and many thanks for any input, Yves

lawinslow commented 8 years ago

My guess is that GLM can't find the linked libraries it needs. Is libifcore.dylib in the same directory as macglm? You can make sure GLM can find them on run by setting the DYLD_FALLBACK_LIBRARY_PATH environment variable to point to the directory where they are stored (if they aren't already on the PATH). GLMr does this automatically for the user (mac code here).

jordansread commented 7 years ago

@lawinslow do you know if the only workable solution for this is to disable csrutil? Seems like a lot of users wouldn't want that turned off.

lawinslow commented 7 years ago

We'd need to have the Mac GLM binary code signed. I'm not sure how much work it would take, but it would need to be done by the person building the mac build. So probably either you or casper.