Hi, On Sun, Aug 21, 2022 at 09:41:39AM -0500, Dirk Eddelbuettel wrote:
| Oh, yes, It is applied to debian/rules and I forget to mention it.:)
No worries :) Do you have easy-enough access to the platform? Could you
test this diff (and then also run 'autoconf' to regenerate 'configure'; else
I can send you a longer diff including it). And of course remove what we had
added to src/Makevars.in 'by hand'.
| modified configure.ac
@@ -153,6 +153,13 @@ if test x"${uname}" = x"Darwin" -a x"${machine}" =
x"x86_64"; then
AC_MSG_RESULT([${CXX17_MACOS}])
fi
+## Take care of riscv64 machines and need for -latomic
+if test x"${uname}" = x"riscv64"; then
+ AC_MSG_CHECKING([for riscv64 linker adjustment])
+ CXX17_MACOS="-mmacosx-version-min=10.14"
+ TILEDB_LIBS="${TILEDB_LIBS} -latomic"
+ AC_MSG_RESULT([${TILEDB_LIBS}])
+fi
It works except with word modifications:
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,14 @@
AC_MSG_RESULT([${CXX17_MACOS}])
fi
+## Take care of riscv64 machines and need for -latomic
+if test x"${machine}" = x"riscv64"; then
+ AC_MSG_CHECKING([for riscv64 linker adjustment])
+ #CXX17_MACOS="-mmacosx-version-min=10.14"
+ TILEDB_LIBS="${TILEDB_LIBS} -latomic"
+ AC_MSG_RESULT([${TILEDB_LIBS}])
+fi
+
And I tested it on real riscv64 hardware successfully.
here:
uname == linux
CXX17_MACOS should be redundant and can be safely deleted: g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-z,relro -o tiledb.so RcppExports.o arrowio.o batched.o deprecation.o durations.o libtiledb.o nullable.o shmem.o utilities.o -mmacosx-version-min=10.14 -ltiledb -latomic -L/usr/lib/R/lib -lR g++: error: unrecognized command-line option ‘-mmacosx-version-min=10.14’ make[2]: *** [/usr/share/R/share/make/shlib.mk:10: tiledb.so] Error 1 -- Regards, -- Bo YU
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,14 @@
AC_MSG_RESULT([${CXX17_MACOS}])
fi
+## Take care of riscv64 machines and need for -latomic
+if test x"${machine}" = x"riscv64"; then
+ AC_MSG_CHECKING([for riscv64 linker adjustment])
+ #CXX17_MACOS="-mmacosx-version-min=10.14"
+ TILEDB_LIBS="${TILEDB_LIBS} -latomic"
+ AC_MSG_RESULT([${TILEDB_LIBS}])
+fi
+
## -- Part 3: Check for TileDB --------------------------------------------------
##
signature.asc
Description: PGP signature

