2013-02-14 152 views
0

我下载了bioconductor,并试图安装成功安装的软件包(“limma”),但是当我尝试更新bioconductor时,我总是收到与无效编译器选项有关的错误。它似乎是特定于gcc,gfortran软件包安装没有问题。R软件包无法与gcc编译

这里是输出:

[xxx]$ su -c 'R' 
Password: 

R version 2.15.2 (2012-10-26) -- "Trick or Treat" 
Copyright (C) 2012 The R Foundation for Statistical Computing 
ISBN 3-900051-07-0 
Platform: x86_64-redhat-linux-gnu (64-bit) 

R is free software and comes with ABSOLUTELY NO WARRANTY. 
You are welcome to redistribute it under certain conditions. 
Type 'license()' or 'licence()' for distribution details. 

    Natural language support but running in an English locale 

R is a collaborative project with many contributors. 
Type 'contributors()' for more information and 
'citation()' on how to cite R or R packages in publications. 

Type 'demo()' for some demos, 'help()' for on-line help, or 
'help.start()' for an HTML browser interface to help. 
Type 'q()' to quit R. 

> source("http://bioconductor.org/biocLite.R") 
Bioconductor version 2.11 (BiocInstaller 1.8.3), ?biocLite for help 
> biocLite("BiocUpgrade") 
BioC_mirror: http://bioconductor.org 
Using Bioconductor version 2.11 (BiocInstaller 1.8.3), R version 2.15. 
Old packages: 'Biobase', 'foreign', 'IRanges', 'lattice', 'MASS', 'Matrix', 
    'mvtnorm', 'nlme', 'rpart', 'survival', 'waveslim', 'wavethresh' 
Update all/some/none? [a/s/n]: a 
trying URL 'http://bioconductor.org/packages/2.11/bioc/src/contrib/Biobase_2.18.0.tar.gz' 
Content type 'application/x-gzip' length 1913386 bytes (1.8 Mb) 
opened URL 
================================================== 
downloaded 1.8 Mb 

trying URL 'http://cran.fhcrc.org/src/contrib/foreign_0.8-52.tar.gz' 
Content type 'application/x-gzip' length 318387 bytes (310 Kb) 
opened URL 
================================================== 
downloaded 310 Kb 

trying URL 'http://bioconductor.org/packages/2.11/bioc/src/contrib/IRanges_1.16.5.tar.gz' 
Content type 'application/x-gzip' length 699291 bytes (682 Kb) 
opened URL 
================================================== 
downloaded 682 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/lattice_0.20-13.tar.gz' 
Content type 'application/x-gzip' length 367715 bytes (359 Kb) 
opened URL 
================================================== 
downloaded 359 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/MASS_7.3-23.tar.gz' 
Content type 'application/x-gzip' length 472005 bytes (460 Kb) 
opened URL 
================================================== 
downloaded 460 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/Matrix_1.0-11.tar.gz' 
Content type 'application/x-gzip' length 1676392 bytes (1.6 Mb) 
opened URL 
================================================== 
downloaded 1.6 Mb 

trying URL 'http://cran.fhcrc.org/src/contrib/mvtnorm_0.9-9994.tar.gz' 
Content type 'application/x-gzip' length 322279 bytes (314 Kb) 
opened URL 
================================================== 
downloaded 314 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/nlme_3.1-108.tar.gz' 
Content type 'application/x-gzip' length 694594 bytes (678 Kb) 
opened URL 
================================================== 
downloaded 678 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/rpart_4.1-0.tar.gz' 
Content type 'application/x-gzip' length 808365 bytes (789 Kb) 
opened URL 
================================================== 
downloaded 789 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/survival_2.37-2.tar.gz' 
Content type 'application/x-gzip' length 1714302 bytes (1.6 Mb) 
opened URL 
================================================== 
downloaded 1.6 Mb 

trying URL 'http://cran.fhcrc.org/src/contrib/waveslim_1.7.1.tar.gz' 
Content type 'application/x-gzip' length 703759 bytes (687 Kb) 
opened URL 
================================================== 
downloaded 687 Kb 

trying URL 'http://cran.fhcrc.org/src/contrib/wavethresh_4.6.1.tar.gz' 
Content type 'application/x-gzip' length 525390 bytes (513 Kb) 
opened URL 
================================================== 
downloaded 513 Kb 

* installing *source* package ‘Biobase’ ... 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c Rinit.c -o Rinit.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
Rinit.c:1: error: bad value (generic) for -mtune= switch 
make: *** [Rinit.o] Error 1 
ERROR: compilation failed for package ‘Biobase’ 
* removing ‘/usr/lib64/R/library/Biobase’ 
* restoring previous ‘/usr/lib64/R/library/Biobase’ 
* installing *source* package ‘foreign’ ... 
** package ‘foreign’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c R_systat.c -o R_systat.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
R_systat.c:1: error: bad value (generic) for -mtune= switch 
make: *** [R_systat.o] Error 1 
ERROR: compilation failed for package ‘foreign’ 
* removing ‘/usr/lib64/R/library/foreign’ 
* restoring previous ‘/usr/lib64/R/library/foreign’ 
* installing *source* package ‘IRanges’ ... 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c AEbufs.c -o AEbufs.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
AEbufs.c:1: error: bad value (generic) for -mtune= switch 
make: *** [AEbufs.o] Error 1 
ERROR: compilation failed for package ‘IRanges’ 
* removing ‘/usr/lib64/R/library/IRanges’ 
* restoring previous ‘/usr/lib64/R/library/IRanges’ 
* installing *source* package ‘lattice’ ... 
** package ‘lattice’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c init.c -o init.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
init.c:1: error: bad value (generic) for -mtune= switch 
make: *** [init.o] Error 1 
ERROR: compilation failed for package ‘lattice’ 
* removing ‘/usr/lib64/R/library/lattice’ 
* restoring previous ‘/usr/lib64/R/library/lattice’ 
* installing *source* package ‘MASS’ ... 
** package ‘MASS’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c MASS.c -o MASS.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
MASS.c:1: error: bad value (generic) for -mtune= switch 
make: *** [MASS.o] Error 1 
ERROR: compilation failed for package ‘MASS’ 
* removing ‘/usr/lib64/R/library/MASS’ 
* restoring previous ‘/usr/lib64/R/library/MASS’ 
* installing *source* package ‘mvtnorm’ ... 
** package ‘mvtnorm’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c miwa.c -o miwa.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
miwa.c:1: error: bad value (generic) for -mtune= switch 
make: *** [miwa.o] Error 1 
ERROR: compilation failed for package ‘mvtnorm’ 
* removing ‘/usr/lib64/R/library/mvtnorm’ 
* restoring previous ‘/usr/lib64/R/library/mvtnorm’ 
* installing *source* package ‘rpart’ ... 
** package ‘rpart’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c anova.c -o anova.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
anova.c:1: error: bad value (generic) for -mtune= switch 
make: *** [anova.o] Error 1 
ERROR: compilation failed for package ‘rpart’ 
* removing ‘/usr/lib64/R/library/rpart’ 
* restoring previous ‘/usr/lib64/R/library/rpart’ 
* installing *source* package ‘survival’ ... 
** package ‘survival’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c agexact.c -o agexact.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
agexact.c:1: error: bad value (generic) for -mtune= switch 
make: *** [agexact.o] Error 1 
ERROR: compilation failed for package ‘survival’ 
* removing ‘/usr/lib64/R/library/survival’ 
* restoring previous ‘/usr/lib64/R/library/survival’ 
* installing *source* package ‘waveslim’ ... 
** package ‘waveslim’ successfully unpacked and MD5 sums checked 
** libs 
gfortran -m64 -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack- protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules -c  bell-p-w.f -o bell-p-w.o 
bell-p-w.f:131.15: 

     MAXIT=(K+3)*ROOTN            
       1 
Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1) 
bell-p-w.f:344.18: 

     INTEGER N, I, L, K, IFAULT           
        1 
Warning: Unused variable 'i' declared at (1) 
bell-p-w.f:345.36: 

     DOUBLE PRECISION V(N), RN, STD, DSUM, DWSUM, ZERO, ONE,   
            1 
Warning: Unused variable 'std' declared at (1) 
bell-p-w.f:346.18: 

    * TWO, ZFLOAT              
        1 
Warning: Unused variable 'zfloat' declared at (1) 
bell-p-w.f: In function ‘dpss’: 
bell-p-w.f:203:0: warning: ‘sum’ may be used uninitialized in this function [-Wmaybe- uninitialized] 
bell-p-w.f:207:0: warning: ‘ssnorm’ may be used uninitialized in this function [-Wmaybe- uninitialized] 
bell-p-w.f:203:0: warning: ‘diff’ may be used uninitialized in this function  [-Wmaybe- uninitialized] 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c dwt.c -o dwt.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
dwt.c:1: error: bad value (generic) for -mtune= switch 
make: *** [dwt.o] Error 1 
ERROR: compilation failed for package ‘waveslim’ 
* removing ‘/usr/lib64/R/library/waveslim’ 
* restoring previous ‘/usr/lib64/R/library/waveslim’ 
* installing *source* package ‘Matrix’ ... 
** package ‘Matrix’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -DNTIMER -I./SuiteSparse_config -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack- protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c CHMfactor.c -o CHMfactor.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
CHMfactor.c:1: error: bad value (generic) for -mtune= switch 
make: *** [CHMfactor.o] Error 1 
ERROR: compilation failed for package ‘Matrix’ 
* removing ‘/usr/lib64/R/library/Matrix’ 
* restoring previous ‘/usr/lib64/R/library/Matrix’ 
* installing *source* package ‘nlme’ ... 
** package ‘nlme’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fvisibility=hidden -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector  --param=ssp-buffer-size=4 -m64 -mtune=generic -c corStruct.c -o corStruct.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
corStruct.c:1: error: bad value (generic) for -mtune= switch 
make: *** [corStruct.o] Error 1 
ERROR: compilation failed for package ‘nlme’ 
* removing ‘/usr/lib64/R/library/nlme’ 
* restoring previous ‘/usr/lib64/R/library/nlme’ 
* installing *source* package ‘wavethresh’ ... 
** package ‘wavethresh’ successfully unpacked and MD5 sums checked 
** libs 
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic -c WAVDE.c -o WAVDE.o 
cc1: error: unrecognized command line option "-fstack-protector" 
cc1: error: invalid parameter `ssp-buffer-size' 
WAVDE.c:1: error: bad value (generic) for -mtune= switch 
make: *** [WAVDE.o] Error 1 
ERROR: compilation failed for package ‘wavethresh’ 
* removing ‘/usr/lib64/R/library/wavethresh’ 
* restoring previous ‘/usr/lib64/R/library/wavethresh’ 

The downloaded source packages are in 
     ‘/tmp/RtmpKXUsRY/downloaded_packages’ 
Updating HTML index of packages in '.Library' 

Making packages.html ... done 
There were 13 warnings (use warnings() to see them) 

我运行: 的Linux Fedora的3.6.8-2.fc17.x86_64 GCC-4.7.2-2.fc17.x86_64 [R 2.15.2 然而,我在/ usr/bin中看到的所有内容都是gcc34,所以我不完全确定。我必须用sudo启动R,因为除了包data.tables以外,它都无法安装在目录中。

+0

你能告诉我'su -c gcc -v --version'的输出吗? – fons 2013-02-14 00:48:27

+0

这里是输出,它看起来像是3.4: gcc(GCC)3.4.6 20060404(Red Hat 3.4.6-24.fc17) Copyright(C)2006 Free Software Foundation,Inc. 这是免费的软件;请参阅复制条件的来源。有没有 保修;甚至不适用于适销性或针对特定用途的适用性。“我记得在安装3.4版本时我正在安装cuda,但是我认为在完成之后我已经正确地恢复了该链接。有什么建议么? – Joe 2013-02-14 01:02:24

+0

如果R在编译软件包时调用旧版本的gcc,那可能是问题所在。我认为R 2.15.2需要gcc> 4.2。你可以更新gcc,还是重新安排路径,以便首先找到更新版本的gcc? – 2013-02-14 01:03:59

回答

2

修改PATH以确保找到比gcc 3.2更新的gcc编译器。

如有必要,创建一个链接到最近的一个(假设你想依旧保持GCC 3.2左右):

mkdir $HOME/bin 
ln -s /usr/bin/gcc-VERSION $HOME/bin/gcc 
export PATH=$HOME/bin:$PATH 
# proceed to your normal installation 

版本指示编译器的gcc版本通常在你的系统中使用

+0

我删除了我添加到我的.bash rc中的nvidia路径,并运行'su -c“ln -s/usr/bin/x86_64-redhat-linux-gcc/usr/bin/gcc”'。我打开了一个新的终端窗口并运行'gcc -v',它现在读取4.7。这似乎是行得通的,我在看到你的帖子之前这样做了,我应该改变它吗? – Joe 2013-02-14 01:24:16

+0

改变什么? :) – fons 2013-02-14 01:25:41

+0

有链接在家中与/ usr/bin中。 – Joe 2013-02-14 01:46:03

0

我有一个类似的问题,试图在Ubuntu上安装mvtnorm。我得到的错误:

gcc: error: unrecognized command line option "-fstack-protector-strong" 

我看着它正在使用默认

which gcc 
/home/ralien/anaconda3/bin/gcc 

事实证明,出于某种原因,蟒蛇使用GCC,g ++以及gfortran的gcc版本编译器真的很旧:版本4.8.5。这个版本似乎不支持-fstack-protector-strong的论点。

我在/ usr/bin中检查了gcc,g ++和gfortran版本,发现我的系统编译器比5.4更新一些。关键是要力R通过创建

~/.R/Makevars 

和改变路径所有的编译器的系统版本使用新的编译器。所以Makevars文件将包含的条目:

CC=/usr/bin/gcc 
CXX=/usr/bin/g++ 
FC=/usr/bin/gfortran 
F77=/usr/bin/gfortran 

您可以使用r CMD INSTALL随着新版本的gcc,g ++以及gfortran编译包。

或者至少这对我有效。

相关问题