Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsl wants libgsl >= 1.16 but I have 2.4 #18

Closed
nzok opened this issue Nov 23, 2021 · 4 comments
Closed

gsl wants libgsl >= 1.16 but I have 2.4 #18

nzok opened this issue Nov 23, 2021 · 4 comments

Comments

@nzok
Copy link

nzok commented Nov 23, 2021

Script started on 2021-11-23 15:26:59+1300
% R

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

install.packages("gsl")
Installing package into ‘/home/ok/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/gsl_2.1-7.1.tar.gz'
Content type 'application/x-gzip' length 222357 bytes (217 KB)
==================================================
downloaded 217 KB

  • installing source package ‘gsl’ ...
    ** package ‘gsl’ successfully unpacked and MD5 sums checked
    checking for gsl-config... /usr/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 the compiler supports GNU C... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to enable C11 features... none needed
    configure: error: Need GSL version >= 1.16
    ERROR: configuration failed for package ‘gsl’
  • removing ‘/home/ok/R/x86_64-pc-linux-gnu-library/3.4/gsl’

The downloaded source packages are in
‘/tmp/RtmpRIIADX/downloaded_packages’
Warning message:
In install.packages("gsl") :
installation of package ‘gsl’ had non-zero exit status

quit()
Save workspace image? [y/n/c]: n
$ gsl-config --version
2.4
$ uname -a
Linux tarski 5.4.0-90-generic #101~18.04.1-Ubuntu SMP Fri Oct 22 09:25:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
exit
Script done on 2021-11-23 15:27:42+1300

This was the most recent version of libgsl-dev available for Ubuntu 18.04

@markgalassi
Copy link

markgalassi commented Nov 23, 2021 via email

@sherbert
Copy link

Just ran into this and spent some time debugging. The requirement actually being checked for in configure is libgsl-dev >= 2.5:

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <string.h>
#include <gsl/gsl_version.h>
#include <stdio.h>
#include <stdlib.h>
int main() {
#ifdef GSL_VERSION
   int major, minor;
   char *gslv = GSL_VERSION;
   if ((sscanf(gslv, "%d.%d", &major, &minor)) != 2) {
     exit (1);
   }
   exit (minor < 5);
   exit (major < 2);
#else
  exit(1);
#endif
}

The error message when this check fails needs to be updated to reference the version actually being checked for rather than 1.16:

  as_fn_error $? "Need GSL version >= 1.16" "$LINENO" 5

@Japrin
Copy link

Japrin commented Mar 9, 2022

The same problem. I have to use an older version of gsl (gsl_2.1-6.tar.gz )

@mmaechler
Copy link

This was partly addressed in #17 but indeed, not fully. There, you have a hint on how to test correctly for 2.5 {but the hint is not directly usable: you need exit(.) codes, not return}.

BTW: It is configure.ac which must be changed manually, then (typically you rebuild configure from configure.ac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants