make: llvm-gcc-4.2: No such file or directory

1,167 views
Skip to first unread message

Timothy Bates

unread,
Jan 28, 2014, 5:33:33 AM1/28/14
to rdev...@googlegroups.com
Hi, helping people with devtools and they get stumped with this error

> devtools::install_github("devtools")
...
make: llvm-gcc-4.2: No such file or directory


It would be great for this and other functions (i.e., devtools::has_devel()) to have some help for users inside that error along the lines provided by Rcpp:
e.g.:
Rcpp::evalCpp("1+1")
...
WARNING: The tools required to build C++ code for R were not found.

Please install Command Line Tools for XCode (or equivalent).


PS: Is the answer to this issue ever re-writing the make file manually?  as this post states

Or is it always an issue of not having xcode installed?

PPS: Is it a bug for a mac user to be seeing "arguments 'minimized' and 'invisible' are for Windows only"?

Timothy Bates

unread,
Jan 28, 2014, 7:14:24 AM1/28/14
to rdev...@googlegroups.com
Some more info on installing cmd line tools, and CC=clang vs CC=llvm-gcc

1. With XCode 5.0.1+/Mavericks, cmd tools are no longer installed. You can do this from the terminal, however:
 
xcode-select --install
softwareupdate -l
sudo softwareupdate -i -a


After that, I still don't have an llvm-gcc-4.2. These are the "llvm-g*" applications I see:

llvm-g++  llvm-gcc 

FYI "llvm-gcc --version" says

Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)

Target: x86_64-apple-darwin13.1.0

Thread model: posix


2. This Hadley endorsed item on Stackoverflow suggests modifying  

    /Library/Frameworks/R.framework/Resources/etc/Makeconf

changing

CC = llvm-gcc-4.2 -arch x86_64 -std=gnu99
CXX = llvm-g++-4.2 -arch x86_64

to 
CC=clang 

CXX=clang++

Is that because XCode installs clang by default and llvm is not needed? If so, why is devtools failing on not finding llvm-gcc (and why does it specify 4.2 when Mavericks installs 3.2 by the look of it? 


Timothy Bates

unread,
Jan 28, 2014, 7:20:32 AM1/28/14
to rdev...@googlegroups.com
OK: If you have installed XCode 5.0.1 or higher on Mavericks, it looks like all you need to do to get devtools working is edit

/Library/Frameworks/R.framework/Resources/etc/Makeconf

changing the CC and CXX lines to read:

CC=clang 

CXX=clang++

then devtools::install_github("devtools") runs fine.
 

Ahmad Mohammad

unread,
Oct 20, 2016, 2:33:59 PM10/20/16
to devtools
Thank you very Much . you save my day . 
Reply all
Reply to author
Forward
0 new messages