JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

Installation error during the make process #100

Open abhi18av opened 5 years ago

abhi18av commented 5 years ago

Hi @Non-Contradiction , I am really looking forward to integrating this package in my workflow however when I tried installing this, I receive the following error.

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin13.4.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: /anaconda3/lib/R/lib/libRblas.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] Rcpp_0.12.18      compiler_3.5.1    base64enc_0.1-3   prettyunits_1.0.2
 [5] remotes_2.0.2     tools_3.5.1       testthat_2.0.1    digest_0.6.15    
 [9] pkgbuild_1.0.3    pkgload_1.0.2     jsonlite_1.5      memoise_1.1.0    
[13] evaluate_0.13     lattice_0.20-35   rlang_0.3.3       Matrix_1.2-17    
[17] cli_1.0.0         rstudioapi_0.7    yaml_2.2.0        curl_3.2         
[21] xfun_0.6          stringr_1.3.1     withr_2.1.2       knitr_1.22       
[25] desc_1.2.0        fs_1.2.7          devtools_2.0.1    rprojroot_1.3-2  
[29] grid_3.5.1        reticulate_1.11.1 glue_1.3.0        R6_2.2.2         
[33] processx_3.3.0    rmarkdown_1.12    sessioninfo_1.1.1 callr_3.2.0      
[37] magrittr_1.5      htmltools_0.3.6   backports_1.1.2   ps_1.3.0         
[41] usethis_1.4.0     rsconnect_0.8.8   assertthat_0.2.0  stringi_1.2.4    
[45] crayon_1.3.4     
> install.packages("JuliaCall")
trying URL 'https://cran.rstudio.com/src/contrib/JuliaCall_0.16.5.tar.gz'
Content type 'application/x-gzip' length 1380369 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

* installing *source* package ‘JuliaCall’ ...
** package ‘JuliaCall’ successfully unpacked and MD5 sums checked
** libs
x86_64-apple-darwin13.4.0-clang++  -I"/anaconda3/lib/R/include" -DNDEBUG  -I"/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/anaconda3/include   -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix  -c JuliaCall.cpp -o JuliaCall.o
/bin/sh: x86_64-apple-darwin13.4.0-clang++: command not found
make: *** [JuliaCall.o] Error 127
ERROR: compilation failed for package ‘JuliaCall’
* removing ‘/anaconda3/lib/R/library/JuliaCall’
Warning in install.packages :
  installation of package ‘JuliaCall’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/gz/sdxvfmgd0_38g225sldvm7j00000gn/T/RtmpyUE56d/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Could you please help me resolve this?

P.S. Thanks for working on this awesome package man!

Non-Contradiction commented 5 years ago

Thank you for providing feedback. It seems that the compiler is missing or R is unable to find the compiler, so the error message "x86_64-apple-darwin13.4.0-clang++: command not found." There are two ways to deal with this. The first one is to get the compiler, and Xcode probably is enough. The second way is to install the JuliaCall binary package, and CRAN should provide this. By the way, Installation from the binary package is the default on Mac, and I have no idea why R tries to install from source in this case. Hope it solves your problem.