I installed FC 2 X86-64 on an Athlon 64 system. I then installed R 2.0.0. It runs fine except when I try to install or update packages using either "install.packages" or "update.packages". I get the following types of errors: gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c block.c -o block.o cc1: error: CPU you selected does not support x86-64 instruction set cc1: error: CPU you selected does not support x86-64 instruction set make: *** [block.o] Error 1 ERROR: compilation failed for package 'gstat' ** Removing '/usr/lib/R/library/gstat' ** Restoring previous '/usr/lib/R/library/gstat' How can I fix this? Rick B.
rab <rab at nauticom.net> writes:> I installed FC 2 X86-64 on an Athlon 64 system. I then installed R > 2.0.0. It runs fine except when I try to install or update packages > using either "install.packages" or "update.packages". I get the > following types of errors: > > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c block.c -o > block.o> cc1: error: CPU you selected does not support x86-64 instruction set > cc1: error: CPU you selected does not support x86-64 instruction setWell it doesn't. So what is -march=i386 -mcpu=i686 doing in the CFLAGS? Sounds like you are using a 386-compiled R in compatibility mode and are getting bitten by the fact that your gcc is not a cross compiler. Did you use Martyn's RPMs? If so, I'd try a local rebuild (look up the docs for rpmbuild) of R from the SRPM. Another option might be that you need to set up a 32 bit build environment. I don't know FC3 but on SuSE you have the linux32 prefix to configure &c. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
On our SLES8 for amd64 installation, GCC 3.2.x (forgot what x is) is the default, and does not support -mcpu=k8. GCC 3.3.x is installed in /opt/gcc33, and does support that flag. Andy> From: Peter Dalgaard > > rab <rab at nauticom.net> writes: > > > I installed FC 2 X86-64 on an Athlon 64 system. I then installed R > > 2.0.0. It runs fine except when I try to install or update packages > > using either "install.packages" or "update.packages". I get the > > following types of errors: > > > > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c block.c -o > > block.o > > > cc1: error: CPU you selected does not support x86-64 instruction set > > cc1: error: CPU you selected does not support x86-64 instruction set > > Well it doesn't. So what is -march=i386 -mcpu=i686 doing in the > CFLAGS? > > Sounds like you are using a 386-compiled R in compatibility mode and > are getting bitten by the fact that your gcc is not a cross compiler. > Did you use Martyn's RPMs? If so, I'd try a local rebuild (look up the > docs for rpmbuild) of R from the SRPM. > > Another option might be that you need to set up a 32 bit build > environment. I don't know FC3 but on SuSE you have the linux32 prefix > to configure &c. > > -- > O__ ---- Peter Dalgaard Blegdamsvej 3 > c/ /'_ --- Dept. of Biostatistics 2200 Cph. N > (*) \(*) -- University of Copenhagen Denmark Ph: > (+45) 35327918 > ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: > (+45) 35327907 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >
Prof Brian Ripley
2004-Nov-07 07:29 UTC
[R] Installing Packages on an Athlon 64 Linux System
On Sat, 6 Nov 2004, rab wrote:> I installed FC 2 X86-64 on an Athlon 64 system. I then installed R > 2.0.0. It runs fine except when I try to install or update packages > using either "install.packages" or "update.packages". I get the > following types of errors: > > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c block.c -o block.o > cc1: error: CPU you selected does not support x86-64 instruction set > cc1: error: CPU you selected does not support x86-64 instruction set > make: *** [block.o] Error 1 > ERROR: compilation failed for package 'gstat' > ** Removing '/usr/lib/R/library/gstat' > ** Restoring previous '/usr/lib/R/library/gstat' > > How can I fix this?How did you get -pipe -march=i386 -mcpu=i686? That was not put there by R, and is the problem. If you did not build R from the sources on that machine, please do so -- if this was a binary install it is for the wrong architecture. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595