Problems trying to use the igraph package

Everything related to the development of modules in jamovi
Fhas
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Problems trying to use the igraph package

Post by Fhas »

Hi!

I am trying to use the igraph package, my functions run just fine under R, but when I add igraph to Jamovi, after many lines of successful build commands, is see this error:

Code: Select all

ld: warning: directory not found for option '-L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.5'

ld: warning: directory not found for option '-L/opt/local/lib/gcc48'

ld: library not found for -lgfortran

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [igraph.so] Error 1

ERROR: compilation failed for package ‘igraph’

* removing '.../casnet-jmvMAC/build/R/igraph’
Any ideas on how to resolve this?
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Problems trying to use the igraph package

Post by jonathon »

remind me where your repo is. i'll take a look.
Fhas
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Re: Problems trying to use the igraph package

Post by Fhas »

Thanks,

Here it is (changed the name): https://github.com/FredHasselman/casnet-jmvMAC
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Problems trying to use the igraph package

Post by jonathon »

in the mean time, you can just unzip this into your casnet-jmvMAC/build/R folder
igraph.zip
(1.88 MiB) Downloaded 635 times
are you able to build igraph from source in an R session? i.e.

install.packages('igraph', type='source')

cheers

jonathon
Fhas
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Re: Problems trying to use the igraph package

Post by Fhas »

Thanks!

It appears to install from source, with these warnings:

Code: Select all

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'

ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. 

Falling back to library file for linking. installing to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/igraph/libs
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Problems trying to use the igraph package

Post by jonathon »

oh yup. at the moment we're maintain compatibility with macOS mavericks ... (but probably not for too much longer). so you'll need a version of gfortran compatible with mavericks. i'm using 4.8.2

cheers

jonathon
Fhas
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Re: Problems trying to use the igraph package

Post by Fhas »

Ok that worked!
Screenshot 2018-12-09 at 17.38.17.png
Screenshot 2018-12-09 at 17.38.17.png (219.05 KiB) Viewed 9944 times
Is this versioning limit perhaps also related to the error I get when I try to install package proxy:

Code: Select all

Warning message:
package ‘proxy’ is not available (for R version 3.3.0)
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Problems trying to use the igraph package

Post by jonathon »

so the R we ship with the macOS version of jamovi is 3.3, where as proxy requires R >= 3.4

in these situations, it's easiest to modify proxy, remove the >= 3.4, install it locally using a matching version of R (3.3.0 for mavericks), then copy the built package to build/R

i appreciate this is a bit of a pain. we will update the R version with ship with macOS at some point, but you wouldn't believe how painful it is to modify R (on macOS) so it can be bundled with an application!

(won't be an issue on windows, we ship 3.4 for that, and 3.5 for linux.)

jonathon
Fhas
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Re: Problems trying to use the igraph package

Post by Fhas »

Ok thanks that's very useful info!

I found an alternative for proxy so it is not urgent, though at some point I'll want to use it again.

Then the easiest solution will be to install R as if it were the good old Mavericks days :upside_down_face: , with gfortran 4.8.2

Could be useful to have an 'R setup recommendation' for developers , and if such a thing already exists & I missed it, I will go hide in shame and stop asking for help (for a while :grinning: )
Fhas
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Re: Problems trying to use the igraph package

Post by Fhas »

Hi!
That was a huge update, excellent.
However, is there anything I can do to prevent this from happening each time?
Screenshot 2018-12-14 at 22.12.14.png
Screenshot 2018-12-14 at 22.12.14.png (146.23 KiB) Viewed 9885 times
Post Reply