[R] error when compiling "stats" library in R-2.3.1 on Solaris x86

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jul 19 23:39:09 CEST 2006


How did 'cc -xtarget=generic64' get there?  AFAIK R does not know about 
it, so presumably you specified it for CC.  You need to do the same thing 
for *all* the compilers, that is CC, CXX, F77 and FC.

The INSTALL file asked you to read the R-admin manual: there you will find 
a very similar example for 64-bit Sparc Solaris.  That uses -xarch, which 
seems preferred to -xtarget (or at least to generic targets).

On Wed, 19 Jul 2006, Dongseok Choi wrote:

> Hello,
>  
>   I tried to compile v2.3.1 on Solaris x86 with SUN Pro compilers.
>   I had an error while stats libarary was being compiled and I notice that  "-xtarget=generic64" was not passed to f95 while cc used it.
>   Could you tell me how to fix this problem?
>  
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c sgram.f -o sgram.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c sinerp.f -o sinerp.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c sslvrg.f -o sslvrg.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c stxwx.f -o stxwx.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c hclust.f -o hclust.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c kmns.f -o kmns.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c eureka.f -o eureka.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c stl.f -o stl.o
> f95   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c portsrc.f -o portsrc.o
> cc -xtarget=generic64 -G -L/mounts/devel/SUNWspro/lib/amd64 -L/usr/sfw/lib/amd64 -L/mounts/devel/GNU/repoz/readline43/lib/amd64 -o stats.so init.o kmeans.o  ansari.o bandwidths.o chisqsim.o d2x2xk.o fexact.o kendall.o ks.o  line.o smooth.o  prho.o swilk.o  ksmooth.o loessc.o isoreg.o Srunmed.o Trunmed.o  dblcen.o distance.o hclust-utils.o  nls.o  HoltWinters.o PPsum.o arima.o burg.o filter.o  mAR.o pacf.o starma.o port.o family.o bsplvd.o bvalue.o bvalus.o loessf.o ppr.o qsbart.o sbart.o  sgram.o sinerp.o sslvrg.o stxwx.o  hclust.o kmns.o  eureka.o stl.o portsrc.o -xlic_lib=sunperf -lsunmath -Rreg -R/mounts/devel/SUNWspro/lib/amd64:/opt/SUNWspro/lib/amd64 -L/mounts/devel/SUNWspro/prod/lib/amd64 -L/lib/amd64 -L/usr/lib/amd64 -lfui -lfai -lfsu -lsunmath -lmtsk -lm
> ld: fatal: file bsplvd.o: wrong ELF class: ELFCLASS32
> ld: fatal: File processing errors. No output written to stats.so
> *** Error code 1
> make: Fatal error: Command failed for target `stats.so'
> 
>   I did not have any problem when I compiled v2.2.1 as below:
>  
> cc -xtarget=generic64 -I../../../../include  -I/mounts/devel/SUNWspro/prod/include -I/mounts/devel/GNU/repoz/readline43/include -D__NO_MATH_INLINES  -KPIC  -O -I/mounts/devel/SUNWspro/prod/include -c family.c -o family.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c bsplvd.f -o bsplvd.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c bvalue.f -o bvalue.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c bvalus.f -o bvalus.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c loessf.f -o loessf.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c ppr.f -o ppr.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c qsbart.f -o qsbart.o
> cc -xtarget=generic64 -I../../../../include  -I/mounts/devel/SUNWspro/prod/include -I/mounts/devel/GNU/repoz/readline43/include -D__NO_MATH_INLINES  -KPIC  -O -I/mounts/devel/SUNWspro/prod/include -c sbart.c -o sbart.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c sgram.f -o sgram.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c sinerp.f -o sinerp.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c sslvrg.f -o sslvrg.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c stxwx.f -o stxwx.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c hclust.f -o hclust.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c kmns.f -o kmns.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c eureka.f -o eureka.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c stl.f -o stl.o
> f95 -xtarget=generic64   -PIC  -O -I/mounts/devel/SUNWspro/prod/include -c portsrc.f -o portsrc.o
> cc -xtarget=generic64 -G -L/mounts/devel/SUNWspro/lib/amd64 -L/usr/sfw/lib/amd64 -L/mounts/devel/GNU/repoz/readline43/lib/amd64 -o stats.so init.o kmeans.o  ansari.o bandwidths.o chisqsim.o d2x2xk.o fexact.o kendall.o ks.o  line.o smooth.o  prho.o swilk.o  ksmooth.o loessc.o isoreg.o Srunmed.o Trunmed.o  dblcen.o distance.o hclust-utils.o  nls.o  HoltWinters.o PPsum.o arima.o burg.o carray.o filter.o  mburg.o myw.o pacf.o qr.o starma.o port.o family.o bsplvd.o bvalue.o bvalus.o loessf.o ppr.o qsbart.o sbart.o  sgram.o sinerp.o sslvrg.o stxwx.o  hclust.o kmns.o  eureka.o stl.o portsrc.o -xlic_lib=sunperf -lsunmath  -Rreg -R/mounts/devel/SUNWspro/lib/amd64:/opt/SUNWspro/lib/amd64 -L/mounts/devel/SUNWspro/prod/lib/amd64 -L/lib/amd64 -L/usr/lib/amd64 -lfui -lfai -lfsu -lsunmath -lmtsk -lm
> mkdir ../../../../library/stats/libs
> 
>  
> Thank you very much!!
>  
>  
>  
>  
> Dongseok Choi, Ph.D.
> Assistant Professor
> Division of Biostatistics
> Department of Public Health & Preventive Medicine
> Oregon Health & Science University
> 3181 SW Sam Jackson Park Road, CB-669
> Portland, OR 97239-3098
> TEL) 503-494-5336
> FAX) 503-494-4981
> choid at ohsu.edu
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
> 

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



More information about the R-help mailing list