Re: [Rd] Does R use "computed gotos" - a gcc extension of C?

From: <luke-tierney_at_uiowa.edu>
Date: Fri, 04 Mar 2011 17:40:48 -0600

On Fri, 4 Mar 2011, Dr. David Kirkby wrote:

> The R manual says R will not build with gcc on 64-bit Solaris x86 with gcc
>
> http://cran.r-project.org/doc/manuals/R-admin.html#Solaris
>
> "Tests with gcc32 on ‘x86’ and ‘amd64’ have been less successful: ‘x86’
> builds have failed on tests using complex arithmetic33, whereas on ‘amd64’
> the builds have failed to complete in several different ways, most recently
> with relocation errors for libRblas.so. "
>
> I know what the "relocation errors" problem is. That library (and in fact two
> other R libraries) all have non-PIC code in them, despite the fact the source
> is compiled with the -fPIC option.
>
> http://blogs.sun.com/rie/entry/my_relocations_don_t_fit
>
> shows how to prove this. If one runs this command on Solaris:
>
> $ elfdump -d libRblas.so | fgrep TEXTREL
>
> there is some output showing that theres non-PIC code present in the R
> library.
>
> R is compiled with -fPIC on Solaris, but certain things can cause non-PIC
> code to be generated even with that option. One is by the use of "computed
> gotos" which is a gcc extension. I'm wondering if R uses any of these.

Yes -- in the byte code interpreter in eval.c

luke

>
> I'd love to track down this problem, so R can build with gcc. R is used in
> the Sage maths project
>
> http://www.sagemath.org/
>
> and R is the only component of Sage which will not build with gcc on 64-bit
> Solaris x86. Many components will not build with Sun Studio, but this R issue
> means we need to have two compilers, not just one.
>
>

-- 
Luke Tierney
Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke_at_stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu


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

Received on Fri 04 Mar 2011 - 23:45:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 05 Mar 2011 - 21:40:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive