Skip to content

Commit 4bb65dc

Browse files
committed
[GR-24735] Tool configure_fastr: check availability of ldconfig command.
PullRequest: fastr/2492
2 parents e3e5cc7 + 4ac80dd commit 4bb65dc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

com.oracle.truffle.r.native/run/fastr_tools/configure_fastr

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ done
6464
>&2 echo "Tool 'ldconfig' is not available. Maybe you need to run this as a root?"
6565
exit 2
6666
fi
67+
ldconfig -p > /dev/null 2>&1
68+
ldconfig_res=$?
69+
if [[ $ldconfig_res -ne 0 ]]; then
70+
echo "Cannot run ldconfig to check the availability of some libraries on your system."
71+
echo "The only requirement of FastR on most Linux distributions is libgomp.so.1. You can ensure manually that this library is not missing on your system."
72+
echo "Note: FastR may work."
73+
exit 3
74+
fi
6775
res=0
6876
if ! ldconfig -p | grep --quiet "libgomp.so.1"; then
6977
echo "Error: could not find OpenMP runtime library: libgomp.so.1"
@@ -76,7 +84,7 @@ done
7684
if [[ $res != 0 ]]; then
7785
echo "The basic configuration of FastR failed."
7886
echo "To learn more visit https://www.graalvm.org/docs/reference-manual/languages/r"
79-
exit 1
87+
exit 4
8088
else
8189
echo "The basic configuration of FastR was successfull."
8290
echo ""

0 commit comments

Comments
 (0)