From JHZhang at mdanderson.org  Thu Dec  2 00:28:39 2010
From: JHZhang at mdanderson.org (Zhang,Jun)
Date: Wed, 1 Dec 2010 17:28:39 -0600
Subject: [Rd] Install package 'Matrix' problem
Message-ID: <5685E4FBA752A441B1975A77A77CD64824E371F8D9@DCPWVMBXC1VS2.mdanderson.edu>

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 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?

Jun


[Rd] Install package 'Matrix' problem
Zhang,Jun