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

~/.R/Makevars ignored during installation #120

Closed
bearloga opened this issue Apr 6, 2018 · 5 comments
Closed

~/.R/Makevars ignored during installation #120

bearloga opened this issue Apr 6, 2018 · 5 comments

Comments

@bearloga
Copy link

bearloga commented Apr 6, 2018

As I mentioned in #119, I was installing the package and noticed that it was using clang++ as the compiler:

* installing *source* package ‘httpuv’ ...
** libs
clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64  -I"/Users/mpopov/Library/R/3.4/library/Rcpp/include" -I"/Users/mpopov/Library/R/3.4/library/BH/include" -I"/Users/mpopov/Library/R/3.4/library/later/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c RcppExports-legacy.cpp -o RcppExports-legacy.o
...
clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64  -I"/Users/mpopov/Library/R/3.4/library/Rcpp/include" -I"/Users/mpopov/Library/R/3.4/library/BH/include" -I"/Users/mpopov/Library/R/3.4/library/later/include" -I/usr/local/include   -fPIC  -Wall -g -O2 -c websockets.cpp -o websockets.o
cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4
(cd libuv \
		&& touch Makefile.in aclocal.m4 configure m4/lt~obsolete.m4 \
		&& CC="gcc-7" CFLAGS="-Wall -g -O2  -fPIC " AR="ar" RANLIB="ranlib" LDFLAGS="-L/usr/local/lib" ./configure )
checking for a BSD-compatible install... /usr/bin/install -c
...

even though my ~/.R/Makevars includes the following:

VER=-7
CC=gcc${VER}
CXX=g++${VER}
CXX1X=g++${VER}
FC=gfortran${VER}
F77=gfortran${VER}
MAKE=make -j4

I'm not sure how problematic or deliberate this actually is, so please feel free to close the issue if this is by design.

Thanks!

@wch
Copy link
Collaborator

wch commented Apr 7, 2018

I think you need to set CXX11.

See the Makeconf file for all the default settings. On a Mac, it's usually at: /Library/Frameworks/R.framework/Resources/etc/Makeconf

@bearloga
Copy link
Author

You were correct and thank you so much for the pointer!

@fjlicht
Copy link

fjlicht commented Apr 21, 2018

@bearloga Anyway you can direct my setting of CXX11? In checking my Makeconf I have this:
kingkong:etc fjlicht$ head Makeconf
#etc/Makeconf. Generated from Makeconf.in by configure.

#${R_HOME}/etc/Makeconf

#R was configured using the following call
#(not including env. vars and site configuration)
#configure 'CC=clang' 'CXX=clang++' 'OBJC=clang' 'CFLAGS=-Wall -g -O2' 'CXXFLAGS=-Wall -g -O2' 'OBJCFLAGS=-Wall -g -O2' 'FCFLAGS=-Wall -g -O2' 'F77FLAGS=-Wall -g -O2' '--enable-memory-profiling' '--x-libraries=/opt/X11/lib' '--enable-R-framework' 'PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig'

##This fails if it contains spaces, or if it is quoted
include $(R_SHARE_DIR)/make/vars.mk

Any help would be appreciated.

@bearloga
Copy link
Author

@fjlicht: did you happen to install R with Homebrew or MacPorts, rather than downloading the binary from https://cran.r-project.org/bin/macosx/

@fjlicht
Copy link

fjlicht commented Apr 10, 2019

@bearloga I believe that I downloaded and installed the binary. I have since transitioned to another comp/system and can not check back to where I was last year. Thank you for investigating, I can try and pull it up if I get a moment later this week, if that would be of help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants