tidyverse / modelr

Helper functions for modelling
https://modelr.tidyverse.org
GNU General Public License v3.0
401 stars 65 forks source link

modelr install fails with gcc 8.1.0 on homebrew #67

Closed willbowditch closed 6 years ago

willbowditch commented 6 years ago

After updating gcc from 7.3 -> 8.1 with homebrew on OS X broom and modelr will not install.

Not sure if this is an issue for the packages or home-brew, but I not that install the old version ( brew install gcc@7) does not fix this.

brew update
gcc 7.3.0_1 -> 8.1.0
* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error : .onLoad failed in loadNamespace() for 'mnormt', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/usr/local/lib/R/3.5/site-library/mnormt/libs/mnormt.so':
  dlopen(/usr/local/lib/R/3.5/site-library/mnormt/libs/mnormt.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib
  Referenced from: /usr/local/lib/R/3.5/site-library/mnormt/libs/mnormt.so
  Reason: image not found
ERROR: lazy loading failed for package ‘tidyverse’
* removing ‘/usr/local/lib/R/3.5/site-library/tidyverse’
* restoring previous ‘/usr/local/lib/R/3.5/site-library/tidyverse’

The downloaded source packages are in
    ‘/private/var/folders/_m/7bgd5md10sv94wppmxckxw8h0000gn/T/RtmpqmFPHW/downloaded_packages’
Warning message:
In install.packages("tidyverse") :
  installation of package ‘tidyverse’ had non-zero exit status

Installing mnormt seems to fix this:

> install.packages('mnormt')
Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/mnormt_1.5-5.tar.gz'
Content type 'application/x-gzip' length 37169 bytes (36 KB)
==================================================
downloaded 36 KB

* installing *source* package ‘mnormt’ ...
** package ‘mnormt’ successfully unpacked and MD5 sums checked
** libs
gfortran   -fPIC  -g -O2  -c biv-nt.f -o biv-nt.o
gfortran   -fPIC  -g -O2  -c sadmvnt.f -o sadmvnt.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/3.5.0_1/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o mnormt.so biv-nt.o sadmvnt.o -L/usr/local/opt/gcc/lib/gcc/8/gcc/x86_64-apple-darwin17.5.0/8.1.0 -L/usr/local/opt/gcc/lib/gcc/8 -lgfortran -lquadmath -lm -L/usr/local/Cellar/r/3.5.0_1/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.5/site-library/mnormt/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (mnormt)

The downloaded source packages are in
    ‘/private/var/folders/_m/7bgd5md10sv94wppmxckxw8h0000gn/T/RtmpHNwTpi/downloaded_packages’
> install.packages('tidyverse')
Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'application/x-gzip' length 61647 bytes (60 KB)
==================================================
downloaded 60 KB

* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (tidyverse)

The downloaded source packages are in
    ‘/private/var/folders/_m/7bgd5md10sv94wppmxckxw8h0000gn/T/RtmpHNwTpi/downloaded_packages’
Session info:
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin17.5.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0
willbowditch commented 6 years ago

Crossposting from https://github.com/tidyverse/tidyverse/issues/130#issuecomment-386425695

hadley commented 6 years ago

modelr doesn't contain any C code, so it seems unlikely to be the source of the problem. I think you just got a bad install.