We need more information, at the minimum the line which compiled CHMfactor.o. Can you make the install log (you may need to run this again) and your etc/Makeconf available on-line?

At first sight your C++ compiler is missing -m64: the R-admin manual says

'For a 64-bit target add -m64 to the compiler macros and use something like LDFLAGS=-L/opt/csw/lib/sparcv9 or LDFLAGS=-L/usr/local/lib/amd64 as appropriate.'

I see I used

CC="cc -xc99 -m64"
CFLAGS="-O -xlibmieee"
F77="f95 -m64"
FFLAGS=-O4
CXX="CC -m64 -library=stlport4"
CXXFLAGS=-O
FC=$F77
FCFLAGS=$FFLAGS
LDFLAGS=-L/usr/local/lib/sparcv9
FCLIBS="-lfai -lfsu -lfai2"

in config.site. And BTW, it is always worth checking the manuals of current R-patched: your compiler postdates the pre-release period for R 2.12.0.

On Wed, 1 Dec 2010, Zhang,Jun wrote:

64-bit R-2.12.0 was installed on Sun SPARC Solaris 10. Compiler used is 
solstudio12.2. Attached is the configure script.
I then tried to install a recommended package called Matrix. The compilation 
failed with the following messages,
.......

CC -library=stlport4 -G -L/opt/csw/lib/sparcv9 -L/opt/solstudio12.2/prod/lib/v9 -o Matrix.so CHMfactor.o Csparse.o TMatrix_as.o Tsparse.o init.o Mutils.o chm_common.o cs.o cs_utils.o dense.o dgCMatrix.o dgTMatrix.o dgeMatrix.o dpoMatrix.o dppMatrix.o dsCMatrix.o dsyMatrix.o dspMatrix.o dtCMatrix.o dtTMatrix.o dtrMatrix.o dtpMatrix.o factorizations.o ldense.o lgCMatrix.o sparseQR.o abIndex.o CHOLMOD.a COLAMD.a AMD.a -L/apps/sparcv9/R-2.12.0/lib/R/lib -lRlapack -L/apps/sparcv9/R-2.12.0/lib/R/lib -lRblas -lifai -lsunimath -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfui -lfsu -lsunmath -lmtsk -lm

ld: fatal: file CHMfactor.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to Matrix.so
make: *** [Matrix.so] Error 2
ERROR: compilation failed for package 'Matrix'
* removing '/apps/sparcv9/R-2.12.0/lib/R/library/Matrix'

Some article suggests theorectically that ld or compiler driver

You need to give references for what you are quoting here (there is much misinformation on the Internet). I suspect it is simply that you didn't specify the C++ compiler correctly.

first sees a component .o file which is 32-bit (don't know which one here), and decides that other components should be 32-bit, too, hence the error message, since CHMfactor.o must be a 64-bit object. I just don't know what is the practical way to avoid this situation. I guess I'm posting in the right list, can somebody help?

Maybe, but really your local IT support is there to help your use of your OS: this is a Solaris issue, not an R one.

--
Brian D. Ripley,                  rip...@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

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to