Skip to content

Commit

Permalink
Build enhancement for Conda (#722)
Browse files Browse the repository at this point in the history
* Build enhancement for Conda

* Turn window build matrix CI back to r-rel and r-dev

* Roll micro version, update NEWS [ci skip]

* Correct DYLIB_EXT on Darwin aka macOS

* Another refinement
  • Loading branch information
eddelbuettel authored Jun 21, 2024
1 parent e37db85 commit 81ac0f8
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ jobs:
fail-fast: false
matrix:
include: [
#{ windows: windows-latest, r: release },
#{ windows: windows-latest, r: devel }
#
# for now just r-release
{ windows: windows-latest, r: release }
{ windows: windows-latest, r: release },
{ windows: windows-latest, r: devel }
]
steps:
- run: git config --global core.autocrlf false
Expand Down
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.28.0.1
Version: 0.28.0.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 = "dirk@tiledb.com", role = "cre"))
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

* When creating arrays with `fromDataFrame`, start and/or end timestamps can now be specified (#719)

## Build and Test Systems

* The nighly continuous integration matrix now included Core release 2.24.0 and 2.22.0 is dropped (#721)

* The Conda build is now accomodating the change from #710 (#722)


# tiledb 0.28.0

Expand Down
27 changes: 18 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for TileDB-R 0.26.0.
# Generated by GNU Autoconf 2.71 for TileDB-R 0.28.0.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
Expand Down Expand Up @@ -607,8 +607,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='TileDB-R'
PACKAGE_TARNAME='tiledb-r'
PACKAGE_VERSION='0.26.0'
PACKAGE_STRING='TileDB-R 0.26.0'
PACKAGE_VERSION='0.28.0'
PACKAGE_STRING='TileDB-R 0.28.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -646,6 +646,7 @@ ac_includes_default="\
ac_header_cxx_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
DYLIB_EXT
FILESYSTEM_HEADER_MISSSING
CXX17_MACOS
have_git
Expand Down Expand Up @@ -1270,7 +1271,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures TileDB-R 0.26.0 to adapt to many kinds of systems.
\`configure' configures TileDB-R 0.28.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1332,7 +1333,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of TileDB-R 0.26.0:";;
short | recursive ) echo "Configuration of TileDB-R 0.28.0:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1425,7 +1426,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
TileDB-R configure 0.26.0
TileDB-R configure 0.28.0
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1572,7 +1573,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by TileDB-R $as_me 0.26.0, which was
It was created by TileDB-R $as_me 0.28.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -2155,6 +2156,8 @@ CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
CXX11FLAGS=`"${R_HOME}/bin/R" CMD config CXX11FLAGS`
CXX17FLAGS=`"${R_HOME}/bin/R" CMD config CXX17FLAGS`
DYLIB_EXT=`"${R_HOME}/bin/R" CMD config DYLIB_EXT`

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
Expand Down Expand Up @@ -6055,6 +6058,10 @@ printf %s "checking for Darwin use minimum version override... " >&6; }
CXX17_MACOS="-mmacosx-version-min=11"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${CXX17_MACOS}" >&5
printf "%s\n" "${CXX17_MACOS}" >&6; }
## Obscure but important override: we may have gotten .dylib, but we prefer .so -- unless it is Conda
if test x"${CONDA_BUILD}" != x"1"; then
DYLIB_EXT=".so"
fi
fi

## Take care of riscv64 machines and need for -latomic
Expand Down Expand Up @@ -6375,6 +6382,8 @@ fi





ac_config_files="$ac_config_files src/Makevars"

cat >confcache <<\_ACEOF
Expand Down Expand Up @@ -6912,7 +6921,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by TileDB-R $as_me 0.26.0, which was
This file was extended by TileDB-R $as_me 0.28.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6967,7 +6976,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
TileDB-R config.status 0.26.0
TileDB-R config.status 0.28.0
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

## require at least autoconf 2.69
AC_PREREQ([2.69])
AC_INIT([TileDB-R],[0.26.0])
AC_INIT([TileDB-R],[0.28.0])

## -- Part 1: Setup -------------------------------------------------------------
##
Expand All @@ -43,6 +43,8 @@ CXXFLAGS=`"${R_HOME}/bin/R" CMD config CXXFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
CXX11FLAGS=`"${R_HOME}/bin/R" CMD config CXX11FLAGS`
CXX17FLAGS=`"${R_HOME}/bin/R" CMD config CXX17FLAGS`
DYLIB_EXT=`"${R_HOME}/bin/R" CMD config DYLIB_EXT`

AC_LANG(C++)
AC_REQUIRE_CPP
AC_PROG_CXX
Expand Down Expand Up @@ -166,6 +168,10 @@ if test x"${uname}" = x"Darwin"; then
AC_MSG_CHECKING([for Darwin use minimum version override])
CXX17_MACOS="-mmacosx-version-min=11"
AC_MSG_RESULT([${CXX17_MACOS}])
## Obscure but important override: we may have gotten .dylib, but we prefer .so -- unless it is Conda
if test x"${CONDA_BUILD}" != x"1"; then
DYLIB_EXT=".so"
fi
fi

## Take care of riscv64 machines and need for -latomic
Expand Down Expand Up @@ -286,8 +292,10 @@ if test x"${have_tiledb}" = x"no"; then

fi


AC_SUBST([CXX17_MACOS])
AC_SUBST([FILESYSTEM_HEADER_MISSSING])
AC_SUBST([DYLIB_EXT])

AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT
4 changes: 2 additions & 2 deletions src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ PKG_CPPFLAGS = -I. -I../inst/include/ @CXX17_MACOS@ @TILEDB_INCLUDE@ @TILEDB_SIL
PKG_LIBS = @CXX17_MACOS@ @TILEDB_LIBS@ @TILEDB_RPATH@

LIB_CON_DIR = ../inst/lib$(R_ARCH)
LIB_CON = $(LIB_CON_DIR)/libconnection.so
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' ]; then \
@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); \
Expand Down

0 comments on commit 81ac0f8

Please sign in to comment.