Closed izaakm closed 9 years ago
I don't think there is a universal way to pull out the version. The code has the fallthrough for two cases ($NF, $3) so you can just add one for your version.
GCC_VERSION=0.0
try:
GCC_VERSION=float(utils.getCommandOutput("gcc --version|grep gcc|awk '{print $NF}' |awk -F \".\" '{print $1\".\"$2}'", False))
except:
try:
GCC_VERSION=float(utils.getCommandOutput("gcc --version|grep gcc|awk '{print $3}' |awk -F \".\" '{print $1\".\"$2}'", False))
except:
try:
GCC_VERSION=float(utils.getCommandOutput("gcc --version|grep gcc|awk '{print $4}' |awk -F \".\" '{print $1\".\"$2}'", False))
except:
print "Warning: cannot determine GCC version"
That should work on your system. I'll update the code as well.
Solved.
During installation, I get this message: "Warning: cannot determine gcc version"
When I search "INSTALL.py", this error message is on line 119.
Running just
gcc --version
:Running
gcc --version|grep gcc|awk '{print $3}'
returns:I'm not sure how to robustly pull the version number out of this line across various installations.