Problems trying to use the igraph package

Everything related to the development of modules in jamovi

by Fhas » Fri Dec 07, 2018 9:39 pm

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?
Fhas
 
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

by jonathon » Fri Dec 07, 2018 10:55 pm

remind me where your repo is. i'll take a look.
User avatar
jonathon
 
Posts: 965
Joined: Fri Jan 27, 2017 10:04 am

by Fhas » Fri Dec 07, 2018 11:44 pm

Thanks,

Here it is (changed the name): https://github.com/FredHasselman/casnet-jmvMAC
Fhas
 
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

by jonathon » Sat Dec 08, 2018 2:13 am

in the mean time, you can just unzip this into your casnet-jmvMAC/build/R folder

igraph.zip
(1.88 MiB) Downloaded 102 times


are you able to build igraph from source in an R session? i.e.

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

cheers

jonathon
User avatar
jonathon
 
Posts: 965
Joined: Fri Jan 27, 2017 10:04 am

by Fhas » Sat Dec 08, 2018 2:33 am

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
Fhas
 
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

by jonathon » Sat Dec 08, 2018 2:48 am

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
User avatar
jonathon
 
Posts: 965
Joined: Fri Jan 27, 2017 10:04 am

by Fhas » Sun Dec 09, 2018 8:06 pm

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 2185 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)
Fhas
 
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

by jonathon » Sun Dec 09, 2018 9:47 pm

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
User avatar
jonathon
 
Posts: 965
Joined: Fri Jan 27, 2017 10:04 am

by Fhas » Sun Dec 09, 2018 10:04 pm

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

by Fhas » Fri Dec 14, 2018 9:21 pm

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 2126 times
Fhas
 
Posts: 27
Joined: Wed Sep 12, 2018 2:55 pm

Next

Return to Module development