Changeset: 8e46d5445b18 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8e46d5445b18 Modified Files: tools/embedded/embedded.c tools/reverserapi/R/monetdb.R tools/reverserapi/configure Branch: embedded Log Message:
Get this to work on Linux diffs (61 lines): diff --git a/tools/embedded/embedded.c b/tools/embedded/embedded.c --- a/tools/embedded/embedded.c +++ b/tools/embedded/embedded.c @@ -52,7 +52,6 @@ static void* lookup_function(char* lib, return fun; } - int monetdb_startup(char* dir) { opt *set = NULL; int setlen = 0; diff --git a/tools/reverserapi/R/monetdb.R b/tools/reverserapi/R/monetdb.R --- a/tools/reverserapi/R/monetdb.R +++ b/tools/reverserapi/R/monetdb.R @@ -1,3 +1,7 @@ +.onLoad <- function(libname, pkgname){ + dyn.load(file.path(libname, pkgname, "libs", "MonetDB.so"), local=F, now=F) +} + monetdb_startup <- function(dir=tempdir()) { dir <- as.character(dir) if (length(dir) != 1) { @@ -9,7 +13,7 @@ monetdb_startup <- function(dir=tempdir( if (file.access(dir, mode=2) < 0) { stop("Cannot write to ", dir) } - invisible(.Call("monetdb_startup_R", dir , PACKAGE="MonetDB")) + invisible(.Call("monetdb_startup_R", dir)) } monetdb_query <- function(query) { @@ -19,7 +23,7 @@ monetdb_query <- function(query) { } # make sure the query is terminated query <- paste(query, "\n;", sep="") - res <- .Call("monetdb_query_R", query, PACKAGE="MonetDB") + res <- .Call("monetdb_query_R", query) if (is.null(res)) { return(invisible(FALSE)) } diff --git a/tools/reverserapi/configure b/tools/reverserapi/configure --- a/tools/reverserapi/configure +++ b/tools/reverserapi/configure @@ -1,7 +1,7 @@ #!/bin/sh cd src # TODO wget/unpack MonetDB here? Once embedded-lib is in release... -CFLAGS="-I$R_INCLUDE_DIR" LDFLAGS="-Wl,-rpath,$R_PACKAGE_DIR/install/lib" ./configure --prefix=$R_PACKAGE_DIR/install \ +CFLAGS="-I$R_INCLUDE_DIR" ./configure --prefix=$R_PACKAGE_DIR/install \ --enable-embedded --disable-fits --disable-geom --disable-rintegration --disable-gsl \ --disable-jdbc --disable-merocontrol --disable-odbc --disable-console --disable-microhttpd \ --without-perl --without-python2 --without-python3 --without-rubygem --without-unixodbc \ @@ -9,7 +9,7 @@ CFLAGS="-I$R_INCLUDE_DIR" LDFLAGS="-Wl,- # Dirty hack, normally R would call make, but we need to also do a make install to get the libs in place. # So we do it ourselves instead and then render the MonetDB makefile inert. -make -j install +make -j clean install echo -e "dummytarget:\n\ttrue\n" > Makefile cd .. _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list