You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.oracle.truffle.r.native/run/fastr_tools/configure_fastr
+245-4Lines changed: 245 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#!/usr/bin/env bash
2
2
#
3
-
# Copyright (c) 2019, 2019, Oracle and/or its affiliates. All rights reserved.
3
+
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
4
4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
5
#
6
6
# This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,247 @@
22
22
# questions.
23
23
#
24
24
25
-
echo"This script has been deprecated."
26
-
echo"Issues with FastR configuration for building R packages and suggestions how to fix them should now be displayed during package installation process."
27
-
echo"See https://www.graalvm.org/docs/reference-manual/languages/r/ for more details."
25
+
# This script is deployed as <FASTR>/bin/configure_fastr.sh
26
+
27
+
source="${BASH_SOURCE[0]}"
28
+
# "un-link" the source path
29
+
while [ -h"$source" ] ;do
30
+
prev_source="$source"
31
+
source="$(readlink "$source")";
32
+
if [[ "$source"!= /* ]];then
33
+
# if the link was relative, it was relative to where it came from
34
+
dir="$(cd -P "$( dirname "$prev_source")"&&pwd)"
35
+
source="$dir/$source"
36
+
fi
37
+
done
38
+
39
+
functionprintHelp {
40
+
if [[ "$OSTYPE"=="darwin"* ]];then
41
+
echo"Checks presence of FastR dependencies and configures the paths in dynamic libraries accordingly."
echo"Error: could not find OpenMP runtime library: libgomp.so.1"
100
+
echo"Please install the OpenMP runtime library runtime libraries:"
101
+
echo" On Debian based systems: apt-get install libgomp1"
102
+
echo" On Oracle Linux 7 and 8: yum install libgomp"
103
+
echo" Note: Oracle Linux 8 should contain libgomp by default"
104
+
res=1
105
+
fi
106
+
if which gfortran > /dev/null 2> /dev/null;then
107
+
echo"Note: if you intend to install R packages you may need additional packages."
108
+
echo"The following packages should cover the most commonly used R packages:"
109
+
echo" On Debian based systems: apt-get install build-essential gfortran libxml2 libc++-dev"
110
+
echo" On Oracle Linux 7 and 8: yum groupinstall 'Development Tools'"
111
+
if [[ $res!= 0 ]];then
112
+
echo"Caution: you still need to install gfortran3 runtime libraries on all systems where this version is not the default (Ubuntu 18 or higher, Oracle Linux 8 or higher)."
echo"If the GFortran 3 runtime libraries are installed in a non-standard location, you can specify that location using the '--gcc-lib-path' parameter."
235
+
exit 1
236
+
else
237
+
echo"Succesfully updated FastR installation to use the GFortran 3 system libraries."
238
+
FASTR_HOME=$(cd ..;pwd -P )
239
+
echo"The fortran compiler flags in $FASTR_HOME/etc/Makeconf (variable FLIBS) were not updated and must be adjusted manually!"
240
+
fi
241
+
fi# which brew
242
+
else
243
+
echo"Unknown operating system."
244
+
echo"FastR may still work."
245
+
echo"Make sure that GCC including gfortran and OpenMP is installed on your system."
0 commit comments