Closed ryanlong1004 closed 2 years ago
@ryanlong1004 this is using the "sort" command, so it is looking for >9
@rsdunlapiv
The gcc -dumpversion
command returns 9
When I run this test code:
gccver="9.3"
requiredgcc="9"
printf '%s\n' "$requiredgcc" "$gccver" | sort -V | head -n1
It returns 9, so I'm guessing 9 != 9.0.0 as you're using strings.
Can we change to gcc --version
? That would guarantee the full version.
dumpversion might be easier to parse:
rocky@rocky-Latitude-E5570:~/esmfdev/esmf-profiler.ryan$ gcc -dumpversion
10
rocky@rocky-Latitude-E5570:~/esmfdev/esmf-profiler.ryan$ gcc --version
gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What is the issue you are trying to resolve? Do you have a case where there is a valid version of gcc and it is failing to capture it?
@rsdunlapiv Right.
The current version installed is 9.3.0 (default on Ubuntu 20.04).
But I keep getting the error message that I need 9 or higher.
Okay, I understand. Definitely looks like something that needs to be debugged.
@rsdunlapiv
I think the code is looking for an exact match for gnu 9.0.0, but anything above 9 is fine.
https://github.com/esmf-org/esmf-profiler/blob/development/install_dependencies.sh