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

About this list Date view Thread view Subject view Author view Attachment view

From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Mon 19 Nov 2001 - 19:23:38 EST


Message-id: <Pine.LNX.4.31.0111190818540.22669-100000@gannet.stats>

Do you have enough tmp space?

double.f is large, and compiling with -g -O2 takes up a lot of space in
whereever you compiler is set to use (/tmp?, /var/tmp?). My experience is
that gcc does segfault if it runs out of space. I've even seen it
compiling double.c.

The current gcc is 3.0.2, but 3.0.1 used to build R for me on RH Linux.

On Sun, 18 Nov 2001 mikalzet@libero.it wrote:

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

R won't use those: there's a bug in the lapack source,s so we need our own
patched version.

>
> 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 ?
>
> --
> Dr. Michele Alzetta
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 17 Jan 2002 - 11:10:09 EST