Hi,
On Sun, Aug 21, 2022 at 09:44:27PM -0500, Dirk Eddelbuettel wrote:

On 22 August 2022 at 10:20, Bo YU wrote:
| 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

Excellent catch. ${machine} is what uname -m is set to and what I meant.

| +    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

The fail is from my version with typo, not your catch, correct?

yes. This error appeared in the original patch.

The patch that is tested on my real riscv64 hardware:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1017684;filename=fix-ftbfs-riscv64.patch;msg=60
It is ok:)


Thanks for all your help on this,  Dirk

Np.


| --
| Regards,
| --
|    Bo YU
|
| [DELETED ATTACHMENT fix-ftbfs-riscv64.patch, text/x-diff]
| [DELETED ATTACHMENT signature.asc, application/pgp-signature]

--
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

--
Regards,
--
  Bo YU

Attachment: signature.asc
Description: PGP signature

Reply via email to