diff --git a/com.oracle.truffle.r.native/builtinlibs/Makefile b/com.oracle.truffle.r.native/builtinlibs/Makefile index 02b3a25a65b5e31bc0571d492a1014db78771343..258e508941231671a3daed8d7a19aaaf9a99cd03 100644 --- a/com.oracle.truffle.r.native/builtinlibs/Makefile +++ b/com.oracle.truffle.r.native/builtinlibs/Makefile @@ -56,18 +56,19 @@ $(C_OBJECTS): | $(OBJ) $(OBJ): mkdir -p $(OBJ) -# On Darwin we need to create a dummy libR.dylib +# On Darwin we need to create a libR.dylib in which xerbla goes (for now) +# as the libRlapack library has a dependency on libR (why I am not sure) ifeq ($(OS_NAME), Darwin) -LIB_RDUMMY := $(LIBDIR)/libR$(DYLIB_EXT) +LIB_R := $(LIBDIR)/libR$(DYLIB_EXT) -libr: $(LIB_RDUMMY) +libr: $(LIB_R) -$(LIB_RDUMMY): $(OBJ)/rdummy.o +$(LIB_R): $(OBJ)/xerbla.o mkdir -p $(LIBDIR) - $(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(LIB_RDUMMY) -current_version $(R_VERSION) -compatibility_version $(R_VERSION) $(OBJ)/rdummy.o + $(DYLIB_LD) $(DYLIB_LDFLAGS) -o $(LIB_R) -current_version $(R_VERSION) -compatibility_version $(R_VERSION) $(OBJ)/xerbla.o cleanlibr: - rm -f $(LIB_RDUMMY) + rm -f $(LIB_R) else libr: @@ -76,8 +77,10 @@ cleanlibr: endif +FFI_INCLUDES = -I$(TOPDIR)/include/jni/include -I$(TOPDIR)/include/jni/include/R_ext + $(OBJ)/%.o: $(SRC)/%.c - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(FFI_INCLUDES) -c $< -o $@ cleanlib: rm -f $(LIBDIR)/libappl.* diff --git a/com.oracle.truffle.r.native/builtinlibs/src/rdummy.c b/com.oracle.truffle.r.native/builtinlibs/src/rdummy.c deleted file mode 100644 index fab17ac780e37516a47cc8b0310cae7caa3a1baf..0000000000000000000000000000000000000000 --- a/com.oracle.truffle.r.native/builtinlibs/src/rdummy.c +++ /dev/null @@ -1 +0,0 @@ -// Empty file diff --git a/com.oracle.truffle.r.native/builtinlibs/src/xerbla.c b/com.oracle.truffle.r.native/builtinlibs/src/xerbla.c new file mode 100644 index 0000000000000000000000000000000000000000..06c41cb966c4b079eda8ea2ccd4cfcb733cd0663 --- /dev/null +++ b/com.oracle.truffle.r.native/builtinlibs/src/xerbla.c @@ -0,0 +1,21 @@ +/* + * This material is distributed under the GNU General Public License + * Version 2. You may review the terms of this license at + * http://www.gnu.org/licenses/gpl-2.0.html + * + * Copyright (c) 1995-2015, The R Core Team + * Copyright (c) 2003, The R Foundation + * Copyright (c) 2015, Oracle and/or its affiliates + * + * All rights reserved. + */ +#include <R.h> + +void F77_NAME(xerbla)(const char *srname, int *info) +{ + /* srname is not null-terminated. It should be 6 characters. */ + char buf[7]; + strncpy(buf, srname, 6); + buf[6] = '\0'; + printf("BLAS/LAPACK routine '%6s' gave error code %d", buf, -(*info)); +} diff --git a/com.oracle.truffle.r.test.cran/r/install.cran.packages.R b/com.oracle.truffle.r.test.cran/r/install.cran.packages.R index e1946075731312d5348aafca0262840c560d345b..b27b99632aa98196c75a9d1db0609dbcd5b18586 100644 --- a/com.oracle.truffle.r.test.cran/r/install.cran.packages.R +++ b/com.oracle.truffle.r.test.cran/r/install.cran.packages.R @@ -76,11 +76,11 @@ cplusplus <- c("Rcpp", "Segmentor3IsBack", "QUIC", "kernlab", "adaptivetau", "ge # parser bugs parserbug <- c("lattice") # ... lappy bug -lapplydotbug <- c("ABCoptim", "acm4r", "MASS") +lapplydotbug <- c("ABCoptim", "acm4r", "MASS", "combinat") # e.g. complex replacement assignments -trufflevisitor.nyi <- c("colorspace", "R.methodsS3") +trufflevisitor.nyi <- c("colorspace", "R.methodsS3", "ade4") # problems with native code -nativeinstall <- c("Rglpk", "overlap") +nativeinstall <- c("Rglpk", "overlap", "adimpro") # S4 anything using S4 objects s4 <- c("matrixStats") # graphics diff --git a/mx.fastr/copyrights/overrides b/mx.fastr/copyrights/overrides index 3021e7f5d82791e84c46ad1a0db1db316260a3eb..77513589c4c796bd374814b093d99b0f90ec9039 100644 --- a/mx.fastr/copyrights/overrides +++ b/mx.fastr/copyrights/overrides @@ -15,7 +15,7 @@ com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/ToolsText.ja com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/CountFields.java,gnu_r.copyright com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/Menu.java,gnu_r.copyright com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/utils/WriteTable.java,gnu_r.copyright -com.oracle.truffle.r.native/builtinlibs/src/rdummy.c,no.copyright +com.oracle.truffle.r.native/builtinlibs/src/xerbla.c,gnu_r.copyright com.oracle.truffle.r.native/fficall/jni/src/register.c,gnu_r.copyright com.oracle.truffle.r.native/fficall/jni/src/alloc.c,gnu_r.copyright com.oracle.truffle.r.native/include/jni/src/libintl.h,no.copyright