Skip to content

Fix MacOS rpath for local-core corner case #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tiledb
Type: Package
Version: 0.30.1.1
Version: 0.30.1.2
Title: Modern Database Engine for Complex Data Based on Multi-Dimensional Arrays
Authors@R: c(person("TileDB, Inc.", role = c("aut", "cph")),
person("Dirk", "Eddelbuettel", email = "[email protected]", role = "cre"))
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Unreleased

* Fix [#758](https://github.com/TileDB-Inc/TileDB-R/issues/758) "Can't read domain for dimensions of type UINT16"
* [#760](https://github.com/TileDB-Inc/TileDB-R/issues/758) Fix MacOS `rpath`

* [#758](https://github.com/TileDB-Inc/TileDB-R/issues/758) Fix "Can't read domain for dimensions of type UINT16"

# tiledb 0.30.1

Expand Down
19 changes: 11 additions & 8 deletions src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ LIB_CON_DIR = ../inst/lib$(R_ARCH)
LIB_CON = $(LIB_CON_DIR)/libconnection@DYLIB_EXT@

all: $(OBJECTS) $(LIB_CON) $(SHLIB)
# if we are
# - on macOS aka Darwin which needs this
# - the library is present (implying non-system library use)
# then let us call install_name_tool
@if [ `uname -s` = 'Darwin' ] && [ -f ../inst/tiledb/lib/libtiledb.dylib ] && [ -f tiledb.so ]; then \
install_name_tool -change libz.1.dylib @rpath/libz.1.dylib ../inst/tiledb/lib/libtiledb.dylib; \
install_name_tool -add_rpath @loader_path/../tiledb/lib tiledb.so; \
install_name_tool -add_rpath @loader_path/../tiledb/lib $(LIB_CON); \
# On macOS aka Darwin we call install_name_tool
# Case one: If we had a downloaded TileDB Core artifact, adjust zlib path and add to @rpath
# Case two: If we see the system libraries (on macOS) ensure /usr/local/lib rpath is considered
@if [ `uname -s` = 'Darwin' ] && [ -f tiledb.so ]; then \
if [ -f ../inst/tiledb/lib/libtiledb.dylib ] ; then \
install_name_tool -change libz.1.dylib @rpath/libz.1.dylib ../inst/tiledb/lib/libtiledb.dylib; \
install_name_tool -add_rpath @loader_path/../tiledb/lib tiledb.so; \
fi; \
if [ -f /usr/local/lib/libtiledb.dylib ] ; then \
install_name_tool -add_rpath /usr/local/lib tiledb.so; \
fi; \
fi

$(LIB_CON): connection/connection.o
Expand Down