Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.packages('stringi') fails on OSX Yosemite, R 3.2.1 #178

Closed
jucor opened this issue Jun 27, 2015 · 1 comment
Closed

install.packages('stringi') fails on OSX Yosemite, R 3.2.1 #178

jucor opened this issue Jun 27, 2015 · 1 comment
Assignees

Comments

@jucor
Copy link

jucor commented Jun 27, 2015

Hi folks

On my OSX Yosemite with R 3.2.1, install.packages('stringi') fails due to /lib/cpp failing sanity check. Using the pre-compiled Mavericks binary install.packages('stringi', type='mac.binary.mavericks') works, but that's not ideal.

Thanks for any help!

My setup

I have Xcode installed, with clang, and set the variables correctly:

$ cat ~/.R/Makevars 
CC=clang
CXX=clang++

My SessionInfo():

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

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

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

loaded via a namespace (and not attached):
[1] tools_3.2.1
> 

Possible cause?

However, it seems that stringi's configure line 3221 is still falling back on /lib/cpp.

I have no idea how to fix that, sorry.

Other setup I tried

I pointed CC and CXX variables to a homebrew-installed gcc49, but same problem.

Full output of install.packages and SessionInfo

> install.packages('stringi')

  There is a binary version available but the source version is later:
        binary source needs_compilation
stringi  0.4-1  0.5-2             FALSE

installing the source package ‘stringi’

trying URL 'http://cran.ma.imperial.ac.uk/src/contrib/stringi_0.5-2.tar.gz'
Content type 'application/x-gzip' length 3641292 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /Library/Frameworks/R.framework/Resources
checking for R... /Library/Frameworks/R.framework/Resources/bin/R
checking for R >= 3.1.0... yes
checking for cat... /bin/cat
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether   accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/private/var/folders/v6/lzq3hfdx61l8fdh294hktws00000gn/T/Rtmpzp5NrS/R.INSTALL4d612460254c/stringi':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringi’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/v6/lzq3hfdx61l8fdh294hktws00000gn/T/RtmpcSObGV/downloaded_packages’
> 
@gagolews
Copy link
Owner

You have a misconfigured C++11 compiler settings set. Upgrade it or try the latest git version of stringi.
This is a duplicate of #169 .

@gagolews gagolews self-assigned this Jun 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants