Skip to content

Commit 89ee861

Browse files
author
Damian Rouson
authored
Merge pull request #593 from sourceryinstitute/fix-additional-compiler-check
Fix 2nd place where installer checks compiler ver.
2 parents 380dc01 + d5480bc commit 89ee861

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

prerequisites/install-functions/find_or_install.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ find_or_install()
173173

174174
else
175175

176-
info "$this_script: Checking whether $executable in PATH wraps gfortran version >= $(./build.sh -V gcc)... "
176+
info "$this_script: Checking whether $executable in PATH wraps gfortran version >= $minimum_version... "
177177
$executable acceptable_compiler.f90 -o acceptable_compiler || true;
178178
$executable print_true.f90 -o print_true || true;
179179
if [[ -f ./acceptable_compiler && -f ./print_true ]]; then
180-
acceptable=$(./acceptable_compiler)
180+
acceptable=$(./acceptable_compiler $minimum_version)
181181
is_true=$(./print_true)
182182
rm acceptable_compiler print_true
183183
else
@@ -273,13 +273,14 @@ find_or_install()
273273
stack_push dependency_path "none"
274274

275275
elif [[ "$package_in_path" == "true" ]]; then
276-
export minimum_acceptable_version=$(./build.sh -V gcc)
277-
info "$this_script: Checking whether $executable in PATH is version $minimum_acceptable_version or later..."
276+
info "$this_script: Checking whether $executable in PATH is version $minimum_version or later..."
278277
$executable -o acceptable_compiler acceptable_compiler.f90 || true;
279278
$executable -o print_true print_true.f90 || true;
280279
if [[ -f ./acceptable_compiler && -f ./print_true ]]; then
281280
is_true=$(./print_true)
282-
acceptable=$(./acceptable_compiler $minimum_acceptable_version)
281+
emergency "Executing `./acceptable_compiler $minimum_version`"
282+
./acceptable_compiler $minimum_version
283+
acceptable=$(./acceptable_compiler $minimum_version)
283284
rm acceptable_compiler print_true
284285
else
285286
acceptable=false
@@ -675,6 +676,6 @@ find_or_install()
675676
else
676677
export PATH="$package_install_prefix/bin:$PATH"
677678
fi
678-
fi
679+
fi
679680
fi # End 'if [[ ! -x "$package_install_prefix/bin/$executable" ]]; then'
680681
}

0 commit comments

Comments
 (0)