2013-02-14 161 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編譯包。

或者至少這對我有效。

相關問題