RobinHankin / gsl

an R wrapper for the Gnu Scientific Library
15 stars 9 forks source link

Error at install gsl on rhel7 #11

Closed zathiro closed 1 year ago

zathiro commented 4 years ago

Hi Robin I have detected an issue with the package install for R I have read the documentation of CRAN for install this package for unix/ linux I check the path gsl config libs and cflags

(-L) # gsl-config --libs -lgsl -lgslcblas -lm (-I) # gsl-config --cflags -I/usr/include

I Change Makevars in gsl/src: • Add -L/usr/lib -lgsl -lgslcblas -lm to PKG_LIBS • Add (new) line: PKG_CPPFLAGS=-I/usr/include

Install gsl via LDFLAGS=-L/usr/lib -lgsl -lgslcblas -lm; export LDFLAGS CPPFLAGS=-I/usr/include;export CPPFLAGS R CMD INSTALL gsl

Packages installed [root@ektrh7 src]# rpm -qa |grep -iE "gsl" gsl-1.15-13.el7.x86_64 gsl-devel-1.15-13.el7.x86_64

SO RHEL version [root@ektrh7cdhrtd src]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo)

[root@ektrh7 src]# pwd /rtd/src/gsl/gsl/src [root@ektrh7 src]# ls airy.c clausen.c coupling.c debye.c ellint.c fermi_dirac.c init.c log.c poly.c rng.c vector.c airy.o clausen.o coupling.o debye.o elljac.c gamma.c laguerre.c Makevars pow_int.c synchrotron.c vector.h bessel.c coulomb.c dawson.c dilog.c error.c gegenbauer.c lambert.c Makevars.in psi.c transport.c zeta.c bessel.o coulomb.o dawson.o dilog.o expint.c hyperg.c legendre.c Makevars.win qrng.c trig.c [root@ektrh7cdhrtd src]#

# The Makevars looks like...

Kindly supplied by Dirk Eddelbuettel set by configure GSL_CFLAGS = -I/usr/include GSL_LIBS = -lgsl -lgslcblas -lm

combine to standard arguments for R PKG_CPPFLAGS = $(GSL_CFLAGS) -I. PKG_LIBS = $(GSL_LIBS)

But the error show

[root@ektrh7cdhrtd gsl]# R CMD INSTALL gsl

  • installing to library ‘/usr/lib64/R/library’
  • installing source package ‘gsl’ ... checking for gsl-config... /bin/gsl-config checking if GSL version >= 2.1... checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no 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 yes configure: creating ./config.status config.status: creating src/Makevars libs gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/include -I. -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c ellint.c -o ellint.o ellint.c: In function ‘ellint_D_e’: ellint.c:82:5: warning: passing argument 4 of ‘gsl_sf_ellint_D_e’ makes integer from pointer without a cast [enabled by default] status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[mode], &result) ; ^ In file included from ellint.c:1:0: /usr/include/gsl/gsl_sf_ellint.h:84:5: note: expected ‘gsl_mode_t’ but argument is of type ‘struct gsl_sf_result ’ int gsl_sf_ellint_D_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result result); ^ ellint.c:82:5: error: too few arguments to function ‘gsl_sf_ellint_D_e’ status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[mode], &result) ; ^ In file included from ellint.c:1:0: /usr/include/gsl/gsl_sf_ellint.h:84:5: note: declared here int gsl_sf_ellint_D_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result result); ^ make: [ellint.o] Error 1 ERROR: compilation failed for package ‘gsl’
  • removing ‘/usr/lib64/R/library/gsl’

I have tried install from install package from RStudio Pro but the same error still show. Have any one adittional step for install this gsl package for rhel7?

RobinHankin commented 4 years ago

Hi there, this is a frequently asked question, I should make it more prominent in the docs. You need to upgrade GSL to version 2, it looks like you have version 1.15, which will give the errors you report.

let me know how you get on Robin hankin.robin@gmail.com hankin.robin@gmail.com

hankin.robin@gmail.com

hankin.robin@gmail.com

On Wed, Nov 27, 2019 at 5:17 PM Guillermo Cardenas notifications@github.com wrote:

Hi Robin I have detected an issue with the packae install for R I have read the documentation of CRAN for install this package for unix/ linux

I check the path gsl config libs and cflags (-L) # gsl-config --libs -lgsl -lgslcblas -lm (-I) # gsl-config --cflags -I/usr/include

I Change Makevars in gsl/src: • Add -L/usr/lib -lgsl -lgslcblas -lm to PKG_LIBS • Add (new) line: PKG_CPPFLAGS=-I/usr/include

  1. Install gsl via LDFLAGS=-L/usr/lib -lgsl -lgslcblas -lm; export LDFLAGS CPPFLAGS=-I/usr/include;export CPPFLAGS R CMD INSTALL gsl

Packages installed [root@ektrh7 src]# rpm -qa |grep -iE "gsl" gsl-1.15-13.el7.x86_64 gsl-devel-1.15-13.el7.x86_64

SO RHEL version [root@ektrh7cdhrtd src]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo)

[root@ektrh7 src]# pwd /rtd/src/gsl/gsl/src [root@ektrh7 src]# ls airy.c clausen.c coupling.c debye.c ellint.c fermi_dirac.c init.c log.c poly.c rng.c vector.c airy.o clausen.o coupling.o debye.o elljac.c gamma.c laguerre.c Makevars pow_int.c synchrotron.c vector.h bessel.c coulomb.c dawson.c dilog.c error.c gegenbauer.c lambert.c Makevars.in psi.c transport.c zeta.c bessel.o coulomb.o dawson.o dilog.o expint.c hyperg.c legendre.c Makevars.win qrng.c trig.c [root@ektrh7cdhrtd src]#

The Makevars looks like... Kindly supplied by Dirk Eddelbuettel set by configure

GSL_CFLAGS = -I/usr/include GSL_LIBS = -lgsl -lgslcblas -lm combine to standard arguments for R

PKG_CPPFLAGS = $(GSL_CFLAGS) -I. PKG_LIBS = $(GSL_LIBS)

But the error show

[root@ektrh7cdhrtd gsl]# R CMD INSTALL gsl

  • installing to library ‘/usr/lib64/R/library’
  • installing source package ‘gsl’ ... checking for gsl-config... /bin/gsl-config checking if GSL version >= 2.1... checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no 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 yes configure: creating ./config.status config.status: creating src/Makevars libs gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/include -I. -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c ellint.c -o ellint.o ellint.c: In function ‘ellint_D_e’: ellint.c:82:5: warning: passing argument 4 of ‘gsl_sf_ellint_D_e’ makes integer from pointer without a cast [enabled by default] status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[mode], &result) ; ^ In file included from ellint.c:1:0: /usr/include/gsl/gsl_sf_ellint.h:84:5: note: expected ‘gsl_mode_t’ but argument is of type ‘struct gsl_sf_result ’ int gsl_sf_ellint_D_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result result); ^ ellint.c:82:5: error: too few arguments to function ‘gsl_sf_ellint_D_e’ status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[mode], &result) ; ^ In file included from ellint.c:1:0: /usr/include/gsl/gsl_sf_ellint.h:84:5: note: declared here int gsl_sf_ellint_D_e(double phi, double k, double n, gsl_mode_t mode, gsl_sf_result result); ^ make: [ellint.o] Error 1 ERROR: compilation failed for package ‘gsl’
  • removing ‘/usr/lib64/R/library/gsl’

I have tried install from install package from RStudio Pro but the same error still show. Have any one adittional step for install this gsl package for rhel7?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RobinHankin/gsl/issues/11?email_source=notifications&email_token=ADFFZUXLD6D67LZ7HUG77TLQVXYHHA5CNFSM4JSBECZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H4JP7KQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFFZUXROZIKKXFTHSEYAQ3QVXYHHANCNFSM4JSBECZA .

AliceeDiaz commented 3 years ago

Hi Robin,

I am struggling to follow the documentation to install the package. I realized that my issue is related to this threat but might not be quite the same, as I have never installed gsl. When I install gs from CRAN I get this error:

Installing package into ‘/home/s1775953/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/gsl_2.1-6.tar.gz' Content type 'application/x-gzip' length 189794 bytes (185 KB)

downloaded 185 KB

The downloaded source packages are in ‘/tmp/RtmpAtvTQD/downloaded_packages’

In the documentation, you mentioned something about downloading the code (found the full file at https://www.gnu.org/software/gsl/) and I have located the file "gsl-config.in". However, I am not sure how to proceed

In case it helps, I am using macOS High Sierra version 10.13.6 to get to RStudio Cloud from my Uni server, this is my 'sessionInfo()'

`R version 4.0.2 (2020-06-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so

locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] lme4_1.1-26 Matrix_1.2-18 psych_2.0.12 dplyr_1.0.5 biotools_4.0 MASS_7.3-51.6 careless_1.2.1

loaded via a namespace (and not attached): [1] lavaan_0.6-6 statmod_1.4.35 tidyselect_1.1.0 xfun_0.22 remotes_2.1.1 purrr_0.3.4 splines_4.0.2 lattice_0.20-41 vctrs_0.3.7 generics_0.1.0 testthat_2.3.2 usethis_1.6.1
[13] stats4_4.0.2 utf8_1.2.1 blob_1.2.1 rlang_0.4.10 pkgbuild_1.0.8 nloptr_1.2.2.2 pillar_1.5.1 glue_1.4.2 withr_2.4.1 DBI_1.1.0 sessioninfo_1.1.1 lifecycle_1.0.0
[25] devtools_2.3.0 memoise_1.1.0 knitr_1.31 callr_3.4.3 ps_1.3.3 curl_4.3 parallel_4.0.2 fansi_0.4.2 Rcpp_1.0.6 desc_1.2.0 pkgload_1.1.0 tmvnsim_1.0-2
[37] fs_1.4.1 mnormt_2.0.1 digest_0.6.27 processx_3.4.2 rprojroot_2.0.2 grid_4.0.2 cli_2.3.1 tools_4.0.2 magrittr_2.0.1 tibble_3.1.0 crayon_1.4.1 pbivnorm_0.6.0
[49] pkgconfig_2.0.3 ellipsis_0.3.1 prettyunits_1.1.1 minqa_1.2.4 assertthat_0.2.1 R6_2.5.0 boot_1.3-25 nlme_3.1-148 compiler_4.0.2 `

RobinHankin commented 3 years ago

you need to install the GSL, as the documentation states. @.***>

On Fri, Apr 2, 2021 at 12:12 AM Alice @.***> wrote:

Hi Robin,

I am struggling to follow the documentation to install the package. I realized that my issue is related to this threat but might not be quite the same, as I have never installed gsl. When I install gs from CRAN I get this error: ` Installing package into ‘/home/s1775953/R/x86_64-pc-linux-gnu-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/gsl_2.1-6.tar.gz' Content type 'application/x-gzip' length 189794 bytes (185 KB)

downloaded 185 KB

  • installing source package ‘gsl’ ... package ‘gsl’ successfully unpacked and MD5 sums checked using staged installation checking for gsl-config... no configure: error: gsl-config not found, is GSL installed? ERROR: configuration failed for package ‘gsl’
  • removing ‘/home/s1775953/R/x86_64-pc-linux-gnu-library/4.0/gsl’ Warning in install.packages : installation of package ‘gsl’ had non-zero exit status

The downloaded source packages are in ‘/tmp/RtmpAtvTQD/downloaded_packages’`

In the documentation, you mentioned something about downloading the code (found the full file at https://www.gnu.org/software/gsl/) and I have located the file "gsl-config.in". However, I am not sure how to proceed

In case it helps, I am using macOS High Sierra version 10.13.6 to get to RStudio Cloud from my Uni server, this is my 'sessionInfo()'

`R version 4.0.2 (2020-06-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so

locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] lme4_1.1-26 Matrix_1.2-18 psych_2.0.12 dplyr_1.0.5 biotools_4.0 MASS_7.3-51.6 careless_1.2.1

loaded via a namespace (and not attached): [1] lavaan_0.6-6 statmod_1.4.35 tidyselect_1.1.0 xfun_0.22 remotes_2.1.1 purrr_0.3.4 splines_4.0.2 lattice_0.20-41 vctrs_0.3.7 generics_0.1.0 testthat_2.3.2 usethis_1.6.1 [13] stats4_4.0.2 utf8_1.2.1 blob_1.2.1 rlang_0.4.10 pkgbuild_1.0.8 nloptr_1.2.2.2 pillar_1.5.1 glue_1.4.2 withr_2.4.1 DBI_1.1.0 sessioninfo_1.1.1 lifecycle_1.0.0 [25] devtools_2.3.0 memoise_1.1.0 knitr_1.31 callr_3.4.3 ps_1.3.3 curl_4.3 parallel_4.0.2 fansi_0.4.2 Rcpp_1.0.6 desc_1.2.0 pkgload_1.1.0 tmvnsim_1.0-2 [37] fs_1.4.1 mnormt_2.0.1 digest_0.6.27 processx_3.4.2 rprojroot_2.0.2 grid_4.0.2 cli_2.3.1 tools_4.0.2 magrittr_2.0.1 tibble_3.1.0 crayon_1.4.1 pbivnorm_0.6.0 [49] pkgconfig_2.0.3 ellipsis_0.3.1 prettyunits_1.1.1 minqa_1.2.4 assertthat_0.2.1 R6_2.5.0 boot_1.3-25 nlme_3.1-148 compiler_4.0.2 `

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RobinHankin/gsl/issues/11#issuecomment-811836129, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFFZUUMKOQ5D7ZMZAZRTITTGRILVANCNFSM4JSBECZA .

RobinHankin commented 3 years ago

hi there, I can't really diagnose this remotely. It looks like the newer version of gsl is not installed correctly. @.***>

On Fri, Jul 30, 2021 at 5:18 PM Haotian Lin @.***> wrote:

Hi,

I'm running into the same issue as zathiro, where the error is

ellint.c: In function ‘ellint_D_e’: ellint.c:82:5: warning: passing argument 4 of ‘gsl_sf_ellint_D_e’ makes integer from pointer without a cast [enabled by default] status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[*mode], &result) ;

I check your solution where you say the GSL version is 1.15 and that is true. But the problem is I was installing gsl 2.7 and after installation, I type gsl-config --version, it just came up 1.15. I am quite confused about it. I don't know how to upgrade my gsl to version 2 since I already install it using 2.7.tar.gz.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RobinHankin/gsl/issues/11#issuecomment-889635540, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFFZUU7YCN5NIMHYBKYOR3T2IY3TANCNFSM4JSBECZA .