[R] can't install R with *local* gcc

Oliver Kullmann O.Kullmann at swansea.ac.uk
Sun Dec 26 17:50:13 CET 2010


we re-distribute R with our open-source platform http://www.ok-sat-library.org/
where we use R mainly for evaluation of computational experiments.
Due to the various platforms, we build everything from source, and that works fine.
Until now, that is: there are circumstances (for example in computer-science computer labs)
where no Fortran-compiler is provided, and the users (students) can't change that.
Thus we now try to build gfortran as part of the GCC version 4.2.4 suite, and building
R using that local gcc.
We already use the local C and C++ compiler of the suite extensively, and that
all works. But we don't have any experience with using gfortran.
The gcc-build works fine, everything seems alright --- only R (version 2.11.0) won't build with it:

We use the configuration

LDFLAGS="-L /home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/lib" 
./configure --prefix=/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/R/2.11.0

(the same problems with "lib64" instead of "lib", by the way)

which yields

checking for Fortran 77 libraries of /home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/bin/gfortran...  -L/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/lib -L/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/lib/gcc/x86_64-unknown-linux-gnu/4.2.4 -L/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/lib/gcc/x86_64-unknown-linux-gnu/4.2.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/lib/gcc/x86_64-unknown-linux-gnu/4.2.4/../../.. -lgfortranbegin -lgfortran -lm /home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/lib/libgfortran.a

which looks alright to me (but I don't know Fortran), but then we get

checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking whether /home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/bin/gfortran appends underscores to external names... yes
checking whether /home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Gcc/4.2.4/bin/gfortran appends extra underscores to external names... no
checking whether mixed C/Fortran code can be run... configure: WARNING: cannot run mixed C/Fortran code
configure: error: Maybe check LDFLAGS for paths to Fortran libraries?
make: *** [R_base] Error 1

The R installation-documentation doesn't say much on using local compilers (more or less nothing), and everything we could
get from it are the above settings of environment variables.

Internet search reveals old stuff on "libg2c" which appears not to exist anymore, some recommendations
not to build from sources (which is not an option for us), an open Sage ticket (apparently without any
further work on it), and a request to the R-list with apparently no reply.

Since we are working in a well-defined setting (gcc is fully under our control), and apparently
all the libraries needed are build by gcc (though this is nowhere said or (dream) specified),
it should be possible to solve that problem.

I very hope to get some hints (we can't get R running (for our system!) otherwise).
The error is exactly the same on various systems (all 64-bit machines, Intel and AMD).
If we use the system-gcc (4.5.0 or 4.1.2) then the installation of R works without problems;
here (for one of the machines) some data

> version
platform       x86_64-unknown-linux-gnu     
arch           x86_64                       
os             linux-gnu                    
system         x86_64, linux-gnu            
major          2                            
minor          11.0                         
year           2010                         
month          04                           
day            22                           
svn rev        51801                        
language       R                            
version.string R version 2.11.0 (2010-04-22)

Thanks for you help in any case!


More information about the R-help mailing list