diff --git a/.gitignore b/.gitignore index 6e831ad5..ad0eea33 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ ### C ### .cache .gdb_history +compile_commands.json ### IntelliJ IDEA ### /.idea/uiDesigner.xml diff --git a/client/rsh/Makefile b/client/rsh/Makefile index 8b156a63..1f19e7f5 100644 --- a/client/rsh/Makefile +++ b/client/rsh/Makefile @@ -28,7 +28,7 @@ install: $(R) CMD INSTALL . setup: - $(BEAR) -- $(MAKE) clean install + $(BEAR) -- $(MAKE) install test: LD_PRELOAD=$(LLVM_LIB) ../../external/R/bin/R -f test5.R diff --git a/client/rsh/compile_commands.json b/client/rsh/compile_commands.json deleted file mode 100644 index 2a0976e6..00000000 --- a/client/rsh/compile_commands.json +++ /dev/null @@ -1,299 +0,0 @@ -[ - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "bc2c_runtime.o", - "bc2c_runtime.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/bc2c_runtime.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/bc2c_runtime.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "client.o", - "client.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/client.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/client.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "compiler.o", - "compiler.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/compiler.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/compiler.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "init.o", - "init.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/init.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/init.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "jit.o", - "jit.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/jit.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/jit.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "lib.o", - "lib.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/lib.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/lib.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "protocol.pb.o", - "protocol.pb.cc" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/protocol.pb.cc", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/protocol.pb.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "serialize.o", - "serialize.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/serialize.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/serialize.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-std=gnu++17", - "-I/home/krikava/r-compile-server/code/external/R/include", - "-DNDEBUG", - "-I/usr/lib/llvm-17/include", - "-std=c++17", - "-fno-exceptions", - "-funwind-tables", - "-D_GNU_SOURCE", - "-D__STDC_CONSTANT_MACROS", - "-D__STDC_FORMAT_MACROS", - "-D__STDC_LIMIT_MACROS", - "-pthread", - "-fexceptions", - "-I../inst", - "-DR_NO_REMAP", - "-DSTRICT_R_HEADERS", - "-DUSE_RINTERNALS", - "-I/usr/local/include", - "-fpic", - "-g", - "-O2", - "-c", - "-o", - "util.o", - "util.cpp" - ], - "directory": "/home/krikava/r-compile-server/code/client/rsh/src", - "file": "/home/krikava/r-compile-server/code/client/rsh/src/util.cpp", - "output": "/home/krikava/r-compile-server/code/client/rsh/src/util.o" - } -] diff --git a/client/rsh/src/Makevars b/client/rsh/src/Makevars index 9287e8cb..b14baa02 100644 --- a/client/rsh/src/Makevars +++ b/client/rsh/src/Makevars @@ -6,6 +6,8 @@ LLVM_LIBS != $(LLVM_CONFIG) --libs PB_CPPFLAGS != pkg-config --cflags protobuf PB_LIBS != pkg-config --libs protobuf -PKG_CPPFLAGS := $(LLVM_CPPFLAGS) $(PB_CPPFLAGS) -fexceptions -I../inst -DR_NO_REMAP -DSTRICT_R_HEADERS -DUSE_RINTERNALS +PKG_CPPFLAGS := -DR_NO_REMAP -DSTRICT_R_HEADERS -DUSE_RINTERNALS +PKG_CXXFLAGS := $(LLVM_CPPFLAGS) $(PB_CPPFLAGS) -fexceptions -I../inst -DR_NO_REMAP -DSTRICT_R_HEADERS -DUSE_RINTERNALS +PKG_CFLAGS := PKG_LIBS := $(LLVM_LIBS) $(PB_LIBS) -lzmq diff --git a/client/rsh/src/bc2c/runtime.h b/client/rsh/src/bc2c/runtime.h index c973b55d..2ac9eff3 100644 --- a/client/rsh/src/bc2c/runtime.h +++ b/client/rsh/src/bc2c/runtime.h @@ -15,11 +15,22 @@ return R_NilValue; \ } -// a flag to be set when running this code from tests, i.e., without the JIT +// The code linking to this header can run in two modes: +// 1. as a standalone executable (shared library) that uses just the R runtime +// which is used in tests +// 2. as a part of the Rsh package, loaded by the ORC JIT +// +// In the first case all the runtime functions are part of one translation unit. +// All of them should be static and depending on the NDEBUG state also inline. +// +// In the second case, only the Rsh instructions should be inlined and the rest +// should be linked to. #ifdef RSH_TESTS -#define JIT_EXTERN static INLINE +#define JIT_DECL +#define JIT_DEF INLINE #else -#define JIT_EXTERN static INLINE +#define JIT_DECL extern +#define JIT_DEF #endif #define X_MATH1_OPS \ @@ -57,6 +68,8 @@ typedef enum { X_UNARY_OPS } RshUnaryOp; typedef enum { X_LOGIC2_OPS } RshLogic2Op; #undef X +// while a little cumbersome, it allows us to keep everything just +// in the header file, simplifying the standalone (test) mode. #ifdef RSH_TESTS #define X(a, b) NULL, SEXP R_ARITH_OPS[] = {X_ARITH_OPS}; @@ -193,11 +206,13 @@ static INLINE Value sexp_as_val(SEXP s) { } } -// FIXME: should be in the test runtime or extern -static Value Rsh_NilValue; -static SEXP NOT_OP; -static SEXP DOTEXTERNAL2_SYM; -static SEXP RSH_CALL_TRAMPOLINE_SXP; +// CONSTANTS +// ------------------------------------ + +JIT_DECL Value Rsh_NilValue; +JIT_DECL SEXP NOT_OP; +JIT_DECL SEXP DOTEXTERNAL2_SYM; +JIT_DECL SEXP RSH_CALL_TRAMPOLINE_SXP; // BINDING CELLS (bcell) implementation // ------------------------------------ @@ -405,83 +420,17 @@ static INLINE Rboolean bcell_set_value(BCell cell, SEXP value) { typedef SEXP (*Rsh_closure)(SEXP, SEXP); -// RUNTIME INITIALIZATION -// ---------------------- - -// TODO: add this to the package -#define LOAD_R_BUILTIN(target, name) \ - do { \ - target = PROTECT(R_Primitive(name)); \ - R_PreserveObject(target); \ - UNPROTECT(1); \ - } while (0) - -JIT_EXTERN SEXP Rsh_initialize_runtime(void) { -#define X(a, b) LOAD_R_BUILTIN(R_ARITH_OPS[b], #a); - X_ARITH_OPS -#undef X -#define X(a, b) LOAD_R_BUILTIN(R_REL_OPS[b], #a); - X_REL_OPS -#undef X -#define X(a, b) LOAD_R_BUILTIN(R_MATH1_OPS[b], #a); - X_MATH1_OPS -#undef X -#define X(a, b) LOAD_R_BUILTIN(R_UNARY_OPS[b], #a); - X_UNARY_OPS -#undef X -#define X(a, b) LOAD_R_BUILTIN(R_LOGIC2_OPS[b], #a); - X_LOGIC2_OPS -#undef X - -#define X(a, b) R_ARITH_OP_SYMS[b] = Rf_install(#a); - X_ARITH_OPS -#undef X -#define X(a, b) R_REL_OP_SYMS[b] = Rf_install(#a); - X_REL_OPS -#undef X -#define X(a, b) R_UNARY_OP_SYMS[b] = Rf_install(#a); - X_UNARY_OPS -#undef X - - Rsh_NilValue = SXP_TO_VAL(R_NilValue); - LOAD_R_BUILTIN(NOT_OP, "!"); - DOTEXTERNAL2_SYM = Rf_install(".External2"); - - RSH_CALL_TRAMPOLINE_SXP = Rf_mkString("Rsh_call_trampoline"); - R_PreserveObject(RSH_CALL_TRAMPOLINE_SXP); - - return R_NilValue; -} - -SEXP INLINE Rsh_call_trampoline(SEXP call, SEXP op, SEXP args, SEXP rho) { - SEXP closure = CADR(args); - if (TYPEOF(closure) != CLOSXP) { - Rf_error("Expected a closure"); - } - - SEXP body = BODY(closure); - if (TYPEOF(body) != BCODESXP) { - Rf_error("Expected a compiled closure"); - } - - SEXP cp = BCODE_CONSTS(body); - if (XLENGTH(cp) != 6) { - Rf_error("Expected a constant pool with 6 elements"); - } - - SEXP c_cp = VECTOR_ELT(cp, LENGTH(cp) - 2); - // cf. https://stackoverflow.com/a/19487645 - Rsh_closure fun; - *(void **)(&fun) = R_ExternalPtrAddr(VECTOR_ELT(c_cp, 0)); - SEXP res = fun(rho, VECTOR_ELT(c_cp, 1)); - - return res; -} +#ifdef RSH_TESTS +#include "runtime_impl.h" +#else +JIT_DECL SEXP Rsh_initialize_runtime(void); +JIT_DECL SEXP Rsh_call_trampoline(SEXP call, SEXP op, SEXP args, SEXP rho); +#endif // INSTRUCTIONS // ------------ -// TODO: move to internal +// FIXME: move to internal ++ all the ones in get_var static INLINE SEXP FORCE_PROMISE(SEXP value, SEXP symbol, SEXP rho, Rboolean keepmiss) { if (PRVALUE(value) == R_UnboundValue) { diff --git a/client/rsh/src/bc2c/runtime_impl.h b/client/rsh/src/bc2c/runtime_impl.h new file mode 100644 index 00000000..cc8ee725 --- /dev/null +++ b/client/rsh/src/bc2c/runtime_impl.h @@ -0,0 +1,70 @@ +#include "runtime.h" + +#define LOAD_R_BUILTIN(target, name) \ + do { \ + target = PROTECT(R_Primitive(name)); \ + R_PreserveObject(target); \ + UNPROTECT(1); \ + } while (0) + +JIT_DEF SEXP Rsh_initialize_runtime(void) { +#define X(a, b) LOAD_R_BUILTIN(R_ARITH_OPS[b], #a); + X_ARITH_OPS +#undef X +#define X(a, b) LOAD_R_BUILTIN(R_REL_OPS[b], #a); + X_REL_OPS +#undef X +#define X(a, b) LOAD_R_BUILTIN(R_MATH1_OPS[b], #a); + X_MATH1_OPS +#undef X +#define X(a, b) LOAD_R_BUILTIN(R_UNARY_OPS[b], #a); + X_UNARY_OPS +#undef X +#define X(a, b) LOAD_R_BUILTIN(R_LOGIC2_OPS[b], #a); + X_LOGIC2_OPS +#undef X + +#define X(a, b) R_ARITH_OP_SYMS[b] = Rf_install(#a); + X_ARITH_OPS +#undef X +#define X(a, b) R_REL_OP_SYMS[b] = Rf_install(#a); + X_REL_OPS +#undef X +#define X(a, b) R_UNARY_OP_SYMS[b] = Rf_install(#a); + X_UNARY_OPS +#undef X + + Rsh_NilValue = SXP_TO_VAL(R_NilValue); + LOAD_R_BUILTIN(NOT_OP, "!"); + DOTEXTERNAL2_SYM = Rf_install(".External2"); + + RSH_CALL_TRAMPOLINE_SXP = Rf_mkString("Rsh_call_trampoline"); + R_PreserveObject(RSH_CALL_TRAMPOLINE_SXP); + + return R_NilValue; +} + +JIT_DEF SEXP Rsh_call_trampoline(SEXP call, SEXP op, SEXP args, SEXP rho) { + SEXP closure = CADR(args); + if (TYPEOF(closure) != CLOSXP) { + Rf_error("Expected a closure"); + } + + SEXP body = BODY(closure); + if (TYPEOF(body) != BCODESXP) { + Rf_error("Expected a compiled closure"); + } + + SEXP cp = BCODE_CONSTS(body); + if (XLENGTH(cp) != 6) { + Rf_error("Expected a constant pool with 6 elements"); + } + + SEXP c_cp = VECTOR_ELT(cp, LENGTH(cp) - 2); + // cf. https://stackoverflow.com/a/19487645 + Rsh_closure fun; + *(void **)(&fun) = R_ExternalPtrAddr(VECTOR_ELT(c_cp, 0)); + SEXP res = fun(rho, VECTOR_ELT(c_cp, 1)); + + return res; +} diff --git a/client/rsh/src/compiler.cpp b/client/rsh/src/compiler.cpp index 16543998..cdb32996 100644 --- a/client/rsh/src/compiler.cpp +++ b/client/rsh/src/compiler.cpp @@ -181,7 +181,7 @@ SEXP initialize(SEXP call_fun) { // intializing it in the init method. // I just don't know how. CALL_FUN = call_fun; - Rsh_initialize_runtime(); + // Rsh_initialize_runtime(); return R_NilValue; } diff --git a/client/rsh/src/jit.cpp b/client/rsh/src/jit.cpp index 0141ca89..adaf4db8 100644 --- a/client/rsh/src/jit.cpp +++ b/client/rsh/src/jit.cpp @@ -7,11 +7,15 @@ #include #include +extern "C" { +#include "bc2c/runtime.h" +} namespace rsh { JIT *GJIT = JIT::create(); JIT *JIT::create() { + Rsh_initialize_runtime(); llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); @@ -44,11 +48,17 @@ JIT *JIT::create() { .create(); if (auto err = orc.takeError()) { - Rf_error("Unable to create LLVJIT: %s\n", toString(std::move(err)).c_str()); + Rf_error("Unable to create LLVMJIT: %s\n", + toString(std::move(err)).c_str()); return nullptr; } - return new JIT(std::move(*orc)); + auto o = std::move(*orc); + // o->getMainJITDylib().addGenerator( + // cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess( + // o->getDataLayout().getGlobalPrefix()))); + + return new JIT(std::move(o)); } void JIT::add_object_file(const char *filename) { diff --git a/client/rsh/src/bc2c_runtime.cpp b/client/rsh/src/runtime.c similarity index 67% rename from client/rsh/src/bc2c_runtime.cpp rename to client/rsh/src/runtime.c index 088159a4..9b329a8d 100644 --- a/client/rsh/src/bc2c_runtime.cpp +++ b/client/rsh/src/runtime.c @@ -1,8 +1,9 @@ -extern "C" { #include "bc2c/runtime.h" -} -#ifndef RSH_TESTS +#ifdef RSH_TESTS +#error "RSH_TESTS cannot be set" +#endif + #define X(a, b) NULL, SEXP R_ARITH_OPS[] = {X_ARITH_OPS}; SEXP R_ARITH_OP_SYMS[] = {X_ARITH_OPS}; @@ -14,4 +15,10 @@ SEXP R_UNARY_OPS[] = {X_UNARY_OPS}; SEXP R_UNARY_OP_SYMS[] = {X_UNARY_OPS}; SEXP R_LOGIC2_OPS[] = {X_LOGIC2_OPS}; #undef X -#endif + +Value Rsh_NilValue; +SEXP NOT_OP; +SEXP DOTEXTERNAL2_SYM; +SEXP RSH_CALL_TRAMPOLINE_SXP; + +#include "bc2c/runtime_impl.h" diff --git a/client/rsh/test5.R b/client/rsh/test5.R index 240f90ac..db01f342 100644 --- a/client/rsh/test5.R +++ b/client/rsh/test5.R @@ -1,4 +1,4 @@ -dyn.load("../../../resources/R-4.3.2/library/rsh/libs/rsh.so", local = FALSE) +dyn.load("../../external/R/library/rsh/libs/rsh.so", local = FALSE) f <- function (n) { s <- 0 diff --git a/external/R b/external/R index b9e3f4b0..b623881c 160000 --- a/external/R +++ b/external/R @@ -1 +1 @@ -Subproject commit b9e3f4b0230f9fbcc57dba1fbb4ae34bb493ff07 +Subproject commit b623881ce0e37f7f62b4032fc7119b95a73cd14d diff --git a/server/src/main/java/org/prlprg/service/JITService.java b/server/src/main/java/org/prlprg/service/JITService.java index f42339d6..5d305b03 100644 --- a/server/src/main/java/org/prlprg/service/JITService.java +++ b/server/src/main/java/org/prlprg/service/JITService.java @@ -36,7 +36,7 @@ public NativeClosure execute(String name, CloSXP closure, int ccOptimization) // var output = new File("/tmp/jit.o"); var output = File.createTempFile("ofile", ".o"); - RshCompiler.getInstance(0)//ccOptimization) + RshCompiler.getInstance(ccOptimization) .createBuilder(input.getPath(), output.getPath()) .flag("-c") .compile(); diff --git a/server/src/main/java/org/prlprg/service/RshCompiler.java b/server/src/main/java/org/prlprg/service/RshCompiler.java index bb6c2180..c84778c6 100644 --- a/server/src/main/java/org/prlprg/service/RshCompiler.java +++ b/server/src/main/java/org/prlprg/service/RshCompiler.java @@ -17,7 +17,7 @@ public class RshCompiler { // what we need is to keep this in the resources, versioned by R version // and upon server instantiation, copy it to some temp directory // and precompile the header file (if needed) - private static final Path RSH_INCLUDE_PATH = Paths.get("../client/rsh/src").normalize().toAbsolutePath(); + private static final Path RSH_INCLUDE_PATH = Paths.get("../client/rsh/src/bc2c").normalize().toAbsolutePath(); private static final Path R_INCLUDE_PATH = Paths.get("../external/R/include").normalize().toAbsolutePath(); // TODO: which ones are needed?