[R] How to build R-base on Mandrake 8.1 ?

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Nov 19 00:10:35 CET 2001


mikalzet at libero.it writes:

> I have recently done a clean install of Mandrake 8.1 and am trying to
> compile R with an aim to preparing a working RPM.
> If anyone has managed to compile R-base on a Mandrake 8.1 please tell me.
> When I try, R-base build keeps on failing both with gcc-2.96 and
> gcc-3.0.1, no matter what the optimizations. The details vary according to
> the choice of compiler and options, but failure is during build of lapack.
> Installing the liblapack3 and liblapack3-devel rpms present on the
> Mandrake 8.1 distribution hasn't solved the problem.
> 
> Switching between versions of gcc is simple, as /usr/bin/gcc is actually a
> link to /etc/alternatives/gcc which is a link to /usr/bin/gcc-2.96 but can
> be changed to /usr/bin/gcc-3.0.1 (or even /usr/bin/kgcc which immediately
> gives "/usr/include/stdio.h:300 parse error before `__gnuc_va_list' ").
> 
> The following examples were run cleanly, i.e. the entire old build directory
> was cancelled each time. Result: five different errors in double.f, one in
> cmplx.f. I have kept the config.cache and config.log if anyone is
> interested.
> 
> 
> Example 1:
> 		gcc 3.0.1, no optimizations set in R-base.spec
> ....
> gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
> -DHAVE_CONFIG_H -mieee-fp -D__NO_MATH_INLINES -fPIC  -g -O2 -c Lapack.c -o
> Lapack.lo
> g77  -fPIC  -g -O2 -c double.f -o double.lo
> double.f: In subroutine `dgees':
> double.f:2362: Internal error: Segmentation fault.
> 
> 
> Example 2:
> 		gcc 3.0.1, CFLAGS and FFLAGS set to $RPM-OPT-FLAGS but
> 		-ffast-math removed (this flag has always caused R build
> 		to fail in the past)
> ....
> gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
> -DHAVE_CONFIG_H -mieee-fp -D__NO_MATH_INLINES -fPIC  -O3
> -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
> -fno-strength-reduce -c Lapack.c -o Lapack.lo
> g77  -fPIC  -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
> -fno-strength-reduce -c double.f -o double.lo
> double.f: In subroutine `dbdsqr':
> double.f:731: Internal error: Segmentation fault.
> 
> 
> Example 3:
> 		gcc 3.0.1, $RPM-OPT-FLAGS enabled
> ....
> gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
> -DHAVE_CONFIG_H -mieee-fp -D__NO_MATH_INLINES -fPIC  -O3
> -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math
> -fno-strength-reduce -c Lapack.c -o Lapack.lo
> etc.    gives a segmentation fault in yet another subroutine of double.f
> 
> 
> Example 4:
>                 gcc 2.96, no optimizations set in R-base.spec
> ....
> make[4]: Entering directory
> `/home/mike/rpm/BUILD/R-1.3.1/src/modules/lapack'
> gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
> -DHAVE_CONFIG_H -mieee-fp -D__NO_MATH_INLINES -fPIC  -g -O2 -c Lapack.c -o
> Lapack.lo
> g77  -fPIC  -g -O2 -c double.f -o double.lo
> double.f: In subroutine `dtrsyl':
> double.f:27942: Internal error: Segmentation fault.
> 
> 
> Example 5:
>                 gcc 2.96, CFLAGS and FFLAGS set to $RPM-OPT-FLAGS
> 		but -ffast-math removed (this flag has always caused R
> 		build to fail in the past)
> ....
> gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
> -DHAVE_CONFIG_H -mieee-fp -D__NO_MATH_INLINES -fPIC  -O3
> -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
> -fno-strength-reduce -c Lapack.c -o Lapack.lo
> g77  -fPIC  -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
> -fno-strength-reduce -c double.f -o double.lo
> double.f: In subroutine `dgecon':
> double.f:1931: Internal error: Segmentation fault.
> 
> 
> Example 6:
> 		gcc 2.96, $RPM-OPT-FLAGS enabled
> ....
> mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -c Lapack.c
> -o Lapack.lo
> g77  -fPIC  -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
> -ffast-math -fno-strength-reduce -c double.f -o double.lo
> g77  -fPIC  -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586
> -ffast-math -fno-strength-reduce -c cmplx.f -o cmplx.lo
> cmplx.f: In subroutine `zbdsqr':
> cmplx.f:783: Internal error: Segmentation fault.
> 
> Any suggestions ?

First check that your RAM is not defective, and that your CPU cooler is
running.... double.f and cmplx.f are pretty big and normally take long
to compile, so system overloads are likely to happen there.

gcc 2.96 is an ill-defined quantity. The current RedHat versions are
working OK, but have build numbers in the eighties... The earlier
versions had various problems, but I don't think compiler segfaults
were among them. 3.0.1 have been reported to succeed, although we see
at least one problem on Solaris with it, but segfaults have not been
reported.

-- 
   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 mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list