[R-SIG-Mac] checking whether the C compiler works... no

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Mon Sep 6 09:49:21 CEST 2021


On 06/09/2021 08:43, Naresh Gurbuxani wrote:
> When trying to install library reshape2, I get below messages.  But I do have some other packages which depend upon C compiler (e.g., Rcpp).  How can this problem be fixed?

You need to look in the config.log file.  The easiest way to make sure 
that is kept is to download the stringi source tarball, unpack it and 
run R CMD INSTALL stringi .

> 
> Thanks,
> Naresh
> 
> Messages when trying to install reshape2:
>> install.packages("reshape2", repos = "https://cran.r-project.org")
> Installing package into ‘/usr/local/lib/R/4.1/site-library’
> (as ‘lib’ is unspecified)
> also installing the dependencies ‘stringi’, ‘stringr’
> 
> trying URL 'https://cran.r-project.org/src/contrib/stringi_1.7.4.tar.gz'
> Content type 'application/x-gzip' length 7599762 bytes (7.2 MB)
> ==================================================
> downloaded 7.2 MB
> 
> trying URL 'https://cran.r-project.org/src/contrib/stringr_1.4.0.tar.gz'
> Content type 'application/x-gzip' length 135777 bytes (132 KB)
> ==================================================
> downloaded 132 KB
> 
> trying URL 'https://cran.r-project.org/src/contrib/reshape2_1.4.4.tar.gz'
> Content type 'application/x-gzip' length 37307 bytes (36 KB)
> ==================================================
> downloaded 36 KB
> 
> * installing *source* package ‘stringi’ ...
> ** package ‘stringi’ successfully unpacked and MD5 sums checked
> ** using staged installation
> checking for R_HOME... /usr/local/Cellar/r/4.1.1/lib/R
> checking for R... /usr/local/Cellar/r/4.1.1/lib/R/bin/R
> checking for endianness... little
> checking for R >= 3.1.0 for C++11 use... yes
> checking for R < 3.4.0 for CXX1X flag use... no
> checking for cat... /bin/cat
> checking for local ICUDT_DIR... icu69/data
> checking for gcc... /usr/local/opt/llvm/bin/clang -fopenmp
> checking whether the C compiler works... no
> configure: error: in `/private/var/folders/97/5377j5_d207fshvjz_pz7szw0000gn/T/RtmpCOKBRx/R.INSTALL64822d9c75a/stringi':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> ERROR: configuration failed for package ‘stringi’
> * removing ‘/usr/local/lib/R/4.1/site-library/stringi’
> ERROR: dependency ‘stringi’ is not available for package ‘stringr’
> * removing ‘/usr/local/lib/R/4.1/site-library/stringr’
> ERROR: dependency ‘stringr’ is not available for package ‘reshape2’
> * removing ‘/usr/local/lib/R/4.1/site-library/reshape2’
> 
> The downloaded source packages are in
> 	‘/private/var/folders/97/5377j5_d207fshvjz_pz7szw0000gn/T/RtmpDOExfD/downloaded_packages’
> Warning messages:
> 1: In install.packages("reshape2", repos = "https://cran.r-project.org") :
>    installation of package ‘stringi’ had non-zero exit status
> 2: In install.packages("reshape2", repos = "https://cran.r-project.org") :
>    installation of package ‘stringr’ had non-zero exit status
> 3: In install.packages("reshape2", repos = "https://cran.r-project.org") :
>    installation of package ‘reshape2’ had non-zero exit status
> 
> My session info:
>> sessionInfo()
> R version 4.1.1 (2021-08-10)
> Platform: x86_64-apple-darwin20.5.0 (64-bit)
> Running under: macOS Big Sur 11.5.2
> 
> Matrix products: default
> BLAS/LAPACK: /usr/local/Cellar/openblas/0.3.17/lib/libopenblasp-r0.3.17.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_4.1.1 tools_4.1.1
> 
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 


-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



More information about the R-SIG-Mac mailing list