Trouble with Installing R Package gsl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trouble with Installing R Package gsl

zhucai4
Dear R users:

I have a problem when installing the R package *gsl*. The procedure is as
follows:

(1) Since it needs a GSL vesion >=1.12, and the GSL library on the serve I
use is too old, I download GSL 1.15 and install it in my own account, such
as $HOME/local/gsl.  Because I do not have root access, so it cannot be
installed in standard folder.

(2) Then I download the source code of R pakage gsl, since I cannot use the
command *export*, the solution in the package manual *PAGE 29-30* does not
work for me. I use command as follows to install the package:

R CMD INSTALL
--configure-args="LDFLAGS=-L/data1/zhucai/local/gsl/lib;PKG_LIBS=-L/data1/zhucai/local/gsl/lib;PKG_CPPFLAGS=-I/data1/zhucai/local/gsl/include"
'gsl_1.9-9.tar.gz'

Then I can bypass the version check and  compile the package, however, the
error message is as follows

** package ‘gsl’ successfully unpacked and MD5 sums checked
checking for gsl-config... /usr/local/bin/gsl-config
checking if GSL version >= 1.12... checking for gcc... gcc
checking for C compiler default output file name... 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 ISO C89... none needed
configure: error: Need GSL version >= 1.12
** libs
.....compile
installing to /data1/zhucai/local/R-2.15.1/library/gsl/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   ‘gslpaper.Rnw’
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/data1/zhucai/local/R-2.15.1/library/gsl/libs/gsl.so':
  libgsl.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/data1/zhucai/local/R-2.15.1/library/gsl’

I know it may be because LB_LIBRARY_PATH, but I cannot contract with
administer easily and no right to modify it, so how can I do about it? BTW,
the R I used is also installed locally in my own account, which is 2.15.1.
Any help is appreciated. Thank you very much.

Regards
                   ZHU Cai

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble with Installing R Package gsl

Uwe Ligges-3
Looking at the gsl code suggest you can set environmant variables that
are used by configure, hence setting

GSL_CFLAGS = -I/data1/zhucai/local/gsl/include
GSL_LIBS   = -L/data1/zhucai/local/gsl/lib -lgsl -lgslcblas

before  R CMD INSTALL  should do the trick (untested).

Uwe Ligges



On 24.07.2012 11:36, cai zhu wrote:

> Dear R users:
>
> I have a problem when installing the R package *gsl*. The procedure is as
> follows:
>
> (1) Since it needs a GSL vesion >=1.12, and the GSL library on the serve I
> use is too old, I download GSL 1.15 and install it in my own account, such
> as $HOME/local/gsl.  Because I do not have root access, so it cannot be
> installed in standard folder.
>
> (2) Then I download the source code of R pakage gsl, since I cannot use the
> command *export*, the solution in the package manual *PAGE 29-30* does not
> work for me. I use command as follows to install the package:
>
> R CMD INSTALL
> --configure-args="LDFLAGS=-L/data1/zhucai/local/gsl/lib;PKG_LIBS=-L/data1/zhucai/local/gsl/lib;PKG_CPPFLAGS=-I/data1/zhucai/local/gsl/include"
> 'gsl_1.9-9.tar.gz'
>
> Then I can bypass the version check and  compile the package, however, the
> error message is as follows
>
> ** package ‘gsl’ successfully unpacked and MD5 sums checked
> checking for gsl-config... /usr/local/bin/gsl-config
> checking if GSL version >= 1.12... checking for gcc... gcc
> checking for C compiler default output file name... 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 ISO C89... none needed
> configure: error: Need GSL version >= 1.12
> ** libs
> .....compile
> installing to /data1/zhucai/local/R-2.15.1/library/gsl/libs
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** installing vignettes
>     ‘gslpaper.Rnw’
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>    unable to load shared object
> '/data1/zhucai/local/R-2.15.1/library/gsl/libs/gsl.so':
>    libgsl.so.0: cannot open shared object file: No such file or directory
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing ‘/data1/zhucai/local/R-2.15.1/library/gsl’
>
> I know it may be because LB_LIBRARY_PATH, but I cannot contract with
> administer easily and no right to modify it, so how can I do about it? BTW,
> the R I used is also installed locally in my own account, which is 2.15.1.
> Any help is appreciated. Thank you very much.
>
> Regards
>                     ZHU Cai
>
> [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble with Installing R Package gsl

zhucai4
Thanks very much for your help, Uwe. I can compile the package, but when
load the package, it cannot find the share lib, as the error message:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object
'/data1/zhucai/local/R-2.15.1/
library/gsl/libs/gsl.so':
   libgsl.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/data1/zhucai/local/R-2.15.1/library/gsl’

I think it may because the environment LD_LIBRARY_PATH, but I do not know
how to configure R to find the share lib under my path for that package, so
I am trying to write a configure document for my own account on serve,
hoping this can solve the problem.

2012/7/25 Uwe Ligges <[hidden email]>

> Looking at the gsl code suggest you can set environmant variables that are
> used by configure, hence setting
>
> GSL_CFLAGS = -I/data1/zhucai/local/gsl/**include
> GSL_LIBS   = -L/data1/zhucai/local/gsl/lib -lgsl -lgslcblas
>
> before  R CMD INSTALL  should do the trick (untested).
>
> Uwe Ligges
>
>
>
>
> On 24.07.2012 11:36, cai zhu wrote:
>
>> Dear R users:
>>
>> I have a problem when installing the R package *gsl*. The procedure is as
>>
>> follows:
>>
>> (1) Since it needs a GSL vesion >=1.12, and the GSL library on the serve I
>> use is too old, I download GSL 1.15 and install it in my own account, such
>> as $HOME/local/gsl.  Because I do not have root access, so it cannot be
>> installed in standard folder.
>>
>> (2) Then I download the source code of R pakage gsl, since I cannot use
>> the
>> command *export*, the solution in the package manual *PAGE 29-30* does not
>>
>> work for me. I use command as follows to install the package:
>>
>> R CMD INSTALL
>> --configure-args="LDFLAGS=-L/**data1/zhucai/local/gsl/lib;**
>> PKG_LIBS=-L/data1/zhucai/**local/gsl/lib;PKG_CPPFLAGS=-I/**
>> data1/zhucai/local/gsl/**include"
>> 'gsl_1.9-9.tar.gz'
>>
>> Then I can bypass the version check and  compile the package, however, the
>> error message is as follows
>>
>> ** package ‘gsl’ successfully unpacked and MD5 sums checked
>> checking for gsl-config... /usr/local/bin/gsl-config
>> checking if GSL version >= 1.12... checking for gcc... gcc
>> checking for C compiler default output file name... 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 ISO C89... none needed
>> configure: error: Need GSL version >= 1.12
>> ** libs
>> .....compile
>> installing to /data1/zhucai/local/R-2.15.1/**library/gsl/libs
>> ** R
>> ** inst
>> ** preparing package for lazy loading
>> ** help
>> *** installing help indices
>> ** building package indices
>> ** installing vignettes
>>     ‘gslpaper.Rnw’
>> ** testing if installed package can be loaded
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>    unable to load shared object
>> '/data1/zhucai/local/R-2.15.1/**library/gsl/libs/gsl.so':
>>    libgsl.so.0: cannot open shared object file: No such file or directory
>> Error: loading failed
>> Execution halted
>> ERROR: loading failed
>> * removing ‘/data1/zhucai/local/R-2.15.1/**library/gsl’
>>
>> I know it may be because LB_LIBRARY_PATH, but I cannot contract with
>> administer easily and no right to modify it, so how can I do about it?
>> BTW,
>> the R I used is also installed locally in my own account, which is 2.15.1.
>> Any help is appreciated. Thank you very much.
>>
>> Regards
>>                     ZHU Cai
>>
>>         [[alternative HTML version deleted]]
>>
>>
>>
>> ______________________________**________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Trouble with Installing R Package gsl

qmuser
This post has NOT been accepted by the mailing list yet.
In reply to this post by zhucai4
The environment variable used for the test for correct GSL version is CPPFLAGS.
We got this to install using the following (substituting your own system paths of course)

setenv GSL_CFLAGS "-I/opt/asn/apps/gsl_1.16/include"
setenv GSL_LIBS "-L/opt/asn/apps/gsl_1.16/lib -lgsl -lgslcblas"
setenv CPPFLAGS "-I/opt/asn/apps/gsl_1.16/include -L/opt/asn/apps/gsl_1.16/lib -lgsl -lgslcblas"

Loading...