From 879ee9cd45342dded45b9f9cbb8c50388612aa74 Mon Sep 17 00:00:00 2001 From: Paul Hoffman Date: Wed, 23 Apr 2025 15:35:47 -0400 Subject: [PATCH 1/2] Remove static libraries from final build of tiledb-r on Windows R 4.5 has begun introducing checks of static libraries bundled as part of the package; this PR removes said static libraries as they were failing CRAN checks --- src/Makevars.win | 7 +++++-- tools/winlibs.R | 27 ++++++++++++++------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/Makevars.win b/src/Makevars.win index 262ea9024b..e71cab60d3 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -18,7 +18,7 @@ PKG_LIBS = \ LIB_CON = ../inst/lib$(R_ARCH)/libconnection.dll -all: winlibs $(OBJECTS) $(SHLIB) $(LIB_CON) +all: winlibs $(OBJECTS) $(SHLIB) $(LIB_CON) purify $(LIB_CON): connection/connection.o mkdir -p $(dir $(LIB_CON)) @@ -30,4 +30,7 @@ winlibs: clean: rm -f $(SHLIB) $(OBJECTS) $(LIB_CON) connection/connection.o -.PHONY: all clean +purify: $(OBJECTS) $(SHLIB) $(LIB_CON) + rm -rf $(RWINLIB)/lib/ || true + +.PHONY: all clean purify diff --git a/tools/winlibs.R b/tools/winlibs.R index 3936cf4db2..18448ebcb8 100644 --- a/tools/winlibs.R +++ b/tools/winlibs.R @@ -5,17 +5,18 @@ if (!file.exists(dcffile)) stop("TileDB Version file not found.") dcf <- read.dcf(dcffile) ver <- dcf[[1, "version"]] -if (!file.exists("../inst/tiledb/include/tiledb/tiledb.h")) { - if (getRversion() < "4") stop("This package requires Rtools40 or newer") - op <- options(timeout = 180) # CRAN request to have patient download settings - zipfile <- tempfile(tmpdir = tempdir(check = TRUE), fileext = '.zip') - download.file( - sprintf("https://github.com/TileDB-Inc/rwinlib-tiledb/archive/v%s.zip", ver), - destfile = zipfile, - quiet = !isTRUE(getOption('verbose', default = FALSE)) - ) - options(op) - unzip(zipfile, exdir = "../inst") - file.rename(sprintf("../inst/rwinlib-tiledb-%s", ver), "../inst/tiledb") - unlink(zipfile, force = TRUE) +if (!file.exists("../inst/tiledb/include/tiledb/tiledb.h") || !dir.exists("../inst/tiledb/lib/")) { + if (getRversion() < "4") stop("This package requires Rtools40 or newer") + if (dir.exists("../inst/tiledb")) unlink("../inst/tiledb", recursive = TRUE, force = TRUE) + op <- options(timeout = 180) # CRAN request to have patient download settings + zipfile <- tempfile(tmpdir = tempdir(check = TRUE), fileext = '.zip') + download.file( + sprintf("https://github.com/TileDB-Inc/rwinlib-tiledb/archive/v%s.zip", ver), + destfile = zipfile, + quiet = !isTRUE(getOption('verbose', default = FALSE)) + ) + options(op) + unzip(zipfile, exdir = "../inst") + file.rename(sprintf("../inst/rwinlib-tiledb-%s", ver), "../inst/tiledb") + unlink(zipfile, force = TRUE) } From 2cc9c149978795d6ae273db7de45f0c223661a4a Mon Sep 17 00:00:00 2001 From: Paul Hoffman Date: Wed, 23 Apr 2025 18:12:34 -0400 Subject: [PATCH 2/2] Update changelog Bump develop version --- DESCRIPTION | 2 +- NEWS.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index bc8deff55c..f4bbf5e9e0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tiledb Type: Package -Version: 0.31.0.4 +Version: 0.31.0.5 Title: Modern Database Engine for Complex Data Based on Multi-Dimensional Arrays Authors@R: c( person("TileDB, Inc.", role = c("aut", "cph")), diff --git a/NEWS.md b/NEWS.md index cc54b13a95..acb2005ce8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ * Add `tiledb_vfs_copy_dir()`, a wrapper for the `vfs_copy_dir()` function * Print values for `tiledb_schema_get_types()` and `tiledb_schema_get_names()` [#805](https://github.com/TileDB-Inc/TileDB-R/issues/805) * Add `tiledb_array_is_open_for_reading()/writing()` [#806](https://github.com/TileDB-Inc/TileDB-R/issues/806) +* Fix static-linking checks for R >= 4.5 # tiledb 0.31.0