[Rd] package gsl assumes incorrect gcc version during install (PR#10451)

Dirk Eddelbuettel edd at debian.org
Fri Nov 23 19:28:34 CET 2007


On 22 November 2007 at 20:00, leviwaldron at gmail.com wrote:
| Full_Name: Levi Waldron
| Version: 2.5.1
| OS: Ubuntu Gutsy
| Submission from: (NULL) (206.248.157.88)
| 
| 
| I installed libgsl0-dev then tried to install the gsl cran package,
| unsuccessfully (see output below).  As a workaround I created a symbolic link to
| /usr/bin/gcc-4.2, ie:
| 
| sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc-4.2

I would strongly advise not to do that. 

| The correct behavior of the gsl package should be to use the executable
| '/usr/bin/gcc' which is already linked to the current gcc version.

No. You misunderstand. It has nothing to do with the package. 

When R is built, it 'stores' its compiler version etc in the file
Makeconf. The Debian (and hence Ubuntu) packages store that file for you as
/etc/R/Makeconf via a link; the file is as always in $RHOME/etc/Makeconf.

This file defines a variable CC for the compiler. All you need to do is to
set it back to 'gcc' from its value 'gcc-4.2'.  

This really is a local admin issue (ie you need to fix it) and not a problem 
with R, or gsl.

If you got R from Ubuntu, file a bug report _with Ubuntu_ as they seem to
have forgotten to switch from gcc-4.2 (which we use in Debian as default) to
gcc-4.1 (which is Ubuntu's default).
  
| > install.packages("gsl",dependencies=T) 
| Warning in install.packages("gsl", dependencies = T) : 
|          argument 'lib' is missing: using '/usr/local/lib/R/site-library'
| --- Please select a CRAN mirror for use in this session ---
| Loading Tcl/Tk interface ... done
| trying URL 'http://probability.ca/cran/src/contrib/gsl_1.8-8.tar.gz'
| Content type 'application/x-tar' length 59084 bytes
| opened URL
| ==================================================
| downloaded 57Kb
| 
| * Installing *source* package 'gsl' ...
| checking for gcc... gcc
| checking for C compiler default output... a.out
| checking whether the C compiler works... yes
| checking whether we are cross compiling... no
| checking for suffix of executables... 
| checking for suffix of object files... o
| checking whether we are using the GNU C compiler... yes
| checking whether gcc accepts -g... yes
| checking for gcc option to accept ANSI C... none needed
| checking for gsl_sf_airy_Ai_e in -lgsl... yes
| checking how to run the C preprocessor... gcc -E
| checking for egrep... grep -E
| checking for ANSI C header files... yes
| checking for sys/types.h... yes
| checking for sys/stat.h... yes
| checking for stdlib.h... yes
| checking for string.h... yes
| checking for memory.h... yes
| checking for strings.h... yes
| checking for inttypes.h... yes
| checking for stdint.h... yes
| checking for unistd.h... yes
| checking gsl/gsl_version.h usability... yes
| checking gsl/gsl_version.h presence... yes
| checking for gsl/gsl_version.h... yes
| checking if GSL version >= 1.8... yes
| configure: creating ./config.status
| ** libs
| gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include      -fpic  -g
| -O2 -c airy.c -o airy.o
| /bin/bash: gcc-4.2: command not found
| make: *** [airy.o] Error 127
| chmod: cannot access `/usr/local/lib/R/site-library/gsl/libs/*': No such file or
| directory
| ERROR: compilation failed for package 'gsl'
| ** Removing '/usr/local/lib/R/site-library/gsl'
| 
| The downloaded packages are in
|         /tmp/RtmpW60zFl/downloaded_packages
| Warning message:
| installation of package 'gsl' had non-zero exit status in:
| install.packages("gsl", dependencies = T) 
| 
| > version
|                _                           
| platform       i486-pc-linux-gnu           
| arch           i486                        
| os             linux-gnu                   
| system         i486, linux-gnu             
| status                                     
| major          2                           
| minor          5.1                         
| year           2007                        
| month          06                          
| day            27                          
| svn rev        42083                       
| language       R                           
| version.string R version 2.5.1 (2007-06-27)

Also note that CRAN has prebuilt versions of the current R release, ie 2.6.0,
for Ubuntu Gutsy, see $CRAN/bin/linux/ubuntu

The CRAN version of R for Ubuntu is quite possibly of better quality than the
distro's version.

Dirk

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

-- 
Three out of two people have difficulties with fractions.



More information about the R-devel mailing list