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

minimum GSL version requirement #17

Closed
bastistician opened this issue Sep 16, 2021 · 4 comments
Closed

minimum GSL version requirement #17

bastistician opened this issue Sep 16, 2021 · 4 comments

Comments

@bastistician
Copy link

Both

SystemRequirements: Gnu Scientific Library version >= 2.1

and

AC_MSG_ERROR([Need GSL version >= 1.16])

seem to be outdated.

Ubuntu 18.04 ships GSL 2.4 but configuration of the newly released gsl 2.1-7 fails with

configure: error: Need GSL version >= 1.16
ERROR: configuration failed for package 'gsl'
@wviechtb
Copy link

Commit 3e826bb updated the requirement to 2.5 (which ships with 20.04) but that error message wasn't updated (in configure and configure.ac).

@RobinHankin
Copy link
Owner

thanks for this, will fix shortly

@bastistician
Copy link
Author

Thanks. The system requirement stated in the DESCRIPTION would also need an update.

crsh added a commit to crsh/papaja that referenced this issue Sep 23, 2021
- Recently, gsl 2.5 has become a requirement (RobinHankin/gsl#17), but I'm not sure how to install it on 18.04
@aitap
Copy link

aitap commented May 19, 2022

Currently, the ./configure test checks for any minor version of 5 and above, not >= 2.5:

$ cat version.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char ** argv) {
	int major, minor;
	if (argc != 2) return -1;
	if (sscanf(argv[1], "%d.%d", &major, &minor) != 2) return -1;
	exit(minor < 5);
	exit(major < 2);
}
$ cc -o version version.c
$ ./version 1.5 && echo test passed
test passed
$ ./version 3.0 || echo test failed
test failed

This happens because the first call to exit terminates the process, ignoring the value of major.
Comparing versions is hard [1, 2]. I think that a correct way to compare versions would be something along the lines of:

if (major < 2) return 1;
if (major > 2) return 0;
if (minor < 5) return 1;
return 0;

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

4 participants