cboettig / prosecutors-fallacy

:notebook: Migrated from the prosecutor branch of my earlywarning repository
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Installing populationdynamics package fails #2

Closed hlapp closed 10 years ago

hlapp commented 10 years ago

Trying to install the populationdynamics package according to install_github("populationdynamics", "cboettig") as in the README fails for me, because somehow the (generated?) Makefile tries to call llvm-gcc-4.2 as the C compiler. That command doesn't exist anymore under OSX Maverick.

I could fix the problem by creating a symlink as follows:

$ ln -s /usr/bin/llvm-gcc /usr/local/bin/llvm-gcc-4.2

I couldn't immediately see where the erroneous configuration is coming from, but it's perhaps worth documenting so that people trying to reproduce this don't fail right at the first step.

cboettig commented 10 years ago

@hlapp Thanks for the bug reports and happy to hear any more general feedback (guessing this was inspired by the NESCent informatics team exercise discussed on twitter). There are deeper challenges with this package and more general issues that I'll try and put in a different issue.

Yes, the Makefile is auto-generated by autoconf, and I've only ever tested it on Linux platforms. No idea where it's getting the 4.2 version; but it should be making a config.log in any case which may give more clues. Last time I ran an installation was choosing gcc 4.6.1 on my ubuntu platform (a year or so ago; now it would be 4.8.1). You might see if you can install the R wrapper package for some GSL functions from CRAN from source: install.packages("gsl", type="source"), since it uses a similar config script.

If I ever got around to putting populationdynamics on CRAN I believe CRAN would be able to provide Mac binaries, making these cross-platform portability issues less severe, but like the prosecutor-fallacy package, I think of these R packages as "Research Compendiums" (a la Gentleman and Temple Lang 2007) and not at all abstracted enough to be functional general purpose software. Of course handling cross-platform issues isn't high on the list for such packages, but you knew all this already. Like you say, probably just worth documenting and moving on.

Partly for this reason, I have avoided building on specific C libraries unless it is necessary, since it creates an extra barrier. In this case that performance was necessary, as the C library runs an individual-based simulation of the population dynamics that I was deploying on the DOE supercomputer Carver. It was fun times getting the appropriate R environment set up with help of the NERSC sys admins and a supercomputing grant; clearly this raises additional barriers to replication ;-). (Actually most of that scale isn't needed to observe the effects, a decent cluster would have sufficient power.)

hlapp commented 10 years ago

@cboettig I think I know now where the invocation of llvm-gcc-4.2 was coming from - it's the R 3.0.2 binary download for Mac that somehow has that built in (presumably because it was compiled with that). Just a gotcha one can run into. Easy to resolve if you know how to, but I imagine fatal if you do all program installation as binary click-install packages (not that that isn't nice).

For reference, here's the R version that does this:

R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)
hlapp commented 10 years ago

BTW I forgot to mention that as far as I could see having to install gsl as a prerequisite also isn't mentioned. I ran into that by getting an obscure error message. brew install gsl took care of it, but again, you have to know what to do.

cboettig commented 10 years ago

Thanks. Yeah, you'll see the GSL dependency appears in the DESCRIPTION file, which is R's way of handling dependencies (and what CRAN uses in place of a readme). Clearly I need to get better at putting relevant information in my READMEs though.

Hadley's devtools is slowly making this much easier, as devtools can now not only install directly from github (no need to tell people to clone or download a zip, etc), but also automatically handles dependencies for R packages hosted on CRAN. Still, it's necessary to handle external R package dependencies and external libraries manually. devtools also recently added support to install specific tags or SHAs, rather than just repos or branches, which has a huge convenience factor.

cboettig commented 10 years ago

Okay, notes appear in README for populationdynamics now