Can't find record-gcc-switches? What to do?

Hello!

This occurs when I try to update R packages. The packages that need to be compiled like Rcpp etc. fail with an apparent gcc error:

g++: error: record-gcc-switches: No such file or directory

I don’t know what has gone wrong. If you need some additional info to help me out of this, I’ll submit that gladly.

Here’s full log of the update attempt and sessioInfo():

Rcpp :
Version 0.11.2 installed in /home/antti/R/x86_64-suse-linux-gnu-library/3.1
Version 0.11.3 available at http://ftp.eenet.ee/pub/cran
Update (y/N/c)? y
RcppArmadillo :
Version 0.4.320.0 installed in /home/antti/R/x86_64-suse-linux-gnu-library/3.1
Version 0.4.450.1.0 available at http://ftp.eenet.ee/pub/cran
Update (y/N/c)? y
RcppEigen :
Version 0.3.2.1.2 installed in /home/antti/R/x86_64-suse-linux-gnu-library/3.1
Version 0.3.2.2.0 available at http://ftp.eenet.ee/pub/cran
Update (y/N/c)? y
trying URL ‘http://ftp.eenet.ee/pub/cran/src/contrib/Rcpp_0.11.3.tar.gz
Content type ‘application/x-tar’ length 2169583 bytes (2.1 Mb)
opened URL

downloaded 2.1 Mb

trying URL ‘http://ftp.eenet.ee/pub/cran/src/contrib/RcppArmadillo_0.4.450.1.0.tar.gz
Content type ‘application/x-tar’ length 931597 bytes (909 Kb)
opened URL

downloaded 909 Kb

trying URL ‘http://ftp.eenet.ee/pub/cran/src/contrib/RcppEigen_0.3.2.2.0.tar.gz
Content type ‘application/x-tar’ length 1216536 bytes (1.2 Mb)
opened URL

downloaded 1.2 Mb

  • installing source package ‘Rcpp’ …
    ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -I/usr/lib64/R/include -I…/inst/include/ -I/usr/local/include -fpic -fmessage-length=0 record-gcc-switches -fstack-protector -O3 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c Date.cpp -o Date.o
    g++: error: record-gcc-switches: No such file or directory
    make: *** [Date.o] Error 1
    ERROR: compilation failed for package ‘Rcpp’
  • removing ‘/home/antti/R/x86_64-suse-linux-gnu-library/3.1/Rcpp’
  • restoring previous ‘/home/antti/R/x86_64-suse-linux-gnu-library/3.1/Rcpp’
  • installing source package ‘RcppArmadillo’ …
    ** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
  • checking LAPACK_LIBS: divide-and-conquer complex SVD available via R-supplied LAPACK
    ** libs
    g++ -I/usr/lib64/R/include -I/usr/local/include -I"/home/antti/R/x86_64-suse-linux-gnu-library/3.1/Rcpp/include" -I…/inst/include -fpic -fmessage-length=0 record-gcc-switches -fstack-protector -O3 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c RcppArmadillo.cpp -o RcppArmadillo.o
    g++: error: record-gcc-switches: No such file or directory
    make: *** [RcppArmadillo.o] Error 1
    ERROR: compilation failed for package ‘RcppArmadillo’
  • removing ‘/home/antti/R/x86_64-suse-linux-gnu-library/3.1/RcppArmadillo’
  • restoring previous ‘/home/antti/R/x86_64-suse-linux-gnu-library/3.1/RcppArmadillo’
  • installing source package ‘RcppEigen’ …
    ** package ‘RcppEigen’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -I/usr/lib64/R/include -I/usr/local/include -I"/home/antti/R/x86_64-suse-linux-gnu-library/3.1/Rcpp/include" -I…/inst/include -fpic -fmessage-length=0 record-gcc-switches -fstack-protector -O3 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c RcppEigen.cpp -o RcppEigen.o
    g++: error: record-gcc-switches: No such file or directory
    make: *** [RcppEigen.o] Error 1
    ERROR: compilation failed for package ‘RcppEigen’
  • removing ‘/home/antti/R/x86_64-suse-linux-gnu-library/3.1/RcppEigen’
  • restoring previous ‘/home/antti/R/x86_64-suse-linux-gnu-library/3.1/RcppEigen’

The downloaded source packages are in
‘/tmp/Rtmpnx5dfE/downloaded_packages’
Warning messages:
1: In install.packages(update[instlib == l, “Package”], l, contriburl = contriburl, :
installation of package ‘Rcpp’ had non-zero exit status
2: In install.packages(update[instlib == l, “Package”], l, contriburl = contriburl, :
installation of package ‘RcppArmadillo’ had non-zero exit status
3: In install.packages(update[instlib == l, “Package”], l, contriburl = contriburl, :
installation of package ‘RcppEigen’ had non-zero exit status
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-suse-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

loaded via a namespace (and not attached):
[1] compiler_3.1.1 tcltk_3.1.1 tools_3.1.1

Cheers,

Antti

It should be given to the compiler as an option, perhaps the Makefile is missing -f in front of it, it should look like this; *-frecord-gcc-switches
*
In a nutshell; it’s a compiler option, not an application.

Thanks for help!

So how can I fix this? Should I suspect some broken package which I need to reinstall? Are you also suggesting to post this some other forum then?

Cheers!

When you say trying to compile. How? Using make?? if so something is wrong in the make file it is missing a -f in the compile line. .Without know exactly what youare doing and how you are trying to do it is is hard to give exact instructions

I let R do compiling. I just run update.packages() and let it do its job. Based on error message in log I was able to say that error happened during compiling. I’m complete novice in such matters and need help to interpret the message. However, I included the error message and told exactly what I did, so gogalthorp’s critique is dumb.

I guess I need to find someone who understands both R and openSUSE to help me with this. The problem persists.

You are compiling the R language I guess but it is written in c++ thus you must use c++ compilation and there is something wrong in the calls ie a -f is missing or there is an extra space. So what ever script you are using it is broken and must be repaired.

R-base is in the repos so you can install via yast just search for R-base

The problem persists even after 13.2 upgrade. So where to look next for a possible broken script?

In the package you are trying to install.

I finally solved it. A non-CRAN package rstan modified compiling instructions for Rcpp and apparently the version I had had an error. Reinstalling rstan solved the problem. Thanks all for help!