Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find which compiler was used to compile R

Tags:

r

Is there an easy way to figure out the compiler used to compile R? Something like

$ R CMD which_compiler_was_used
GCC

Or from inside of R

> Sys.compiler()
[1] "GCC"

I know R CMD SHLIB somehow does the magic...

like image 564
Ott Toomet Avatar asked Nov 03 '15 22:11

Ott Toomet


People also ask

Which compiler is used in R?

4.1) helps you to Edit, Run and Share your Rscript Code directly from your browser. This development environment provides you version R v3.

How do I know what compiler I have?

Open command prompt (Type “cmd” in search box). 8. Type “gcc –version” in command prompt to check whether C compiler is installed in your machine. Type “g++ –version” in command prompt to check whether C++ compiler is installed in your machine.

How do I know what version of GCC is binary?

comment section from the binary to find the version string. Use objdump and add --section to specify section name. For example, if your compiled a program named foo in the source dir, you can run the following commands to get GCC's version info: $ objdump -s --section .

How do I find my GCC version in Makefile?

I wouldn't say its easy, but you can use the shell function of GNU make to execute a shell command like gcc --version and then use the ifeq conditional expression to check the version number and set your CFLAGS variable appropriately. Save this answer. Show activity on this post. Save this answer.


1 Answers

Try this:

R CMD config CC

When I try it I get this:

gcc -m64

Note: Issue the R CMD config command without CC to find out about other information that it can provide.

like image 63
G. Grothendieck Avatar answered Nov 01 '22 10:11

G. Grothendieck