From cca8f5775c3ecf5cd1f2fc7514d5ac02c160829c Mon Sep 17 00:00:00 2001
From: stepan <stepan.sindelar@oracle.com>
Date: Mon, 23 Apr 2018 11:33:34 +0200
Subject: [PATCH] Improve error message on libR.so loading failure.

---
 .../src/com/oracle/truffle/r/runtime/ffi/DLL.java          | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java
index 1369f5fffc..fcc1b4d1f3 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java
@@ -481,9 +481,10 @@ public class DLL {
             handle = DLLRFFI.DLOpenRootNode.create(context).call(path, false, false);
         } catch (UnsatisfiedLinkError ex) {
             throw RSuicide.rSuicide(context, "error loading libR from: " + path + ".\n" +
-                            "If running on NFI backend, did you provide location of libtrufflenfi.so as value of system " +
-                            "property 'truffle.nfi.library'?\nThe current value is '" +
-                            System.getProperty("truffle.nfi.library") + "'. \nDetails: " + ex.getMessage());
+                            "If running on the NFI backend, did you provide the location of libtrufflenfi.so as the value of the system " +
+                            "property 'truffle.nfi.library'?\nThe current value is '" + System.getProperty("truffle.nfi.library") + "'.\n" +
+                            "Is the OpenMP runtime library (libgomp.so) present on your system? This library is, e.g., typically part of the GCC package.\n" +
+                            "Details: " + ex.getMessage());
         } catch (Throwable ex) {
             throw RSuicide.rSuicide(context, "error loading libR from: " + path + ". Details: " + ex.getMessage());
         }
-- 
GitLab