Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
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 signature.asc Description: PGP signature
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
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? Thanks for all your help on this, Dirk | -- | 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
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
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
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
On 21 August 2022 at 22:27, Bo YU wrote: | Hi, | On Sun, Aug 21, 2022 at 09:14:14AM -0500, Dirk Eddelbuettel wrote: | >| > | >| >So what is the proper architecture name for riscv64, and please remind me | >| >what the best way to determine it is (uname -m ? Or uname -p ? Or uname -i ?) | >| | >| There is only usefully for $(uname -m) for riscv64 hadreware now. | >| | >| vimer@unmatched:~/build/08/33_gridengine$ uname -m | >| riscv64 | >| vimer@unmatched:~/build/08/33_gridengine$ uname -p | >| unknown | >| vimer@unmatched:~/build/08/33_gridengine$ uname -i | >| unknown | > | >Thanks that should help. | > | >| BTW, I saw the solution is ok also. | >| | >| ifeq ($(DEB_HOST_ARCH),riscv64) | >|# do something | >| endif | >| | >| Is it ok for our case? | > | >If and when one uses debian/rules (or alike, yes). But I think I put it 'up | >one level' into configure.ac and that may not have the Debian vars set | >(unless called from debian/rules I suppose). | | 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 ## -- Part 3: Check for TileDB -- ## Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
Hi, On Sun, Aug 21, 2022 at 09:14:14AM -0500, Dirk Eddelbuettel wrote: | > | >So what is the proper architecture name for riscv64, and please remind me | >what the best way to determine it is (uname -m ? Or uname -p ? Or uname -i ?) | | There is only usefully for $(uname -m) for riscv64 hadreware now. | | vimer@unmatched:~/build/08/33_gridengine$ uname -m | riscv64 | vimer@unmatched:~/build/08/33_gridengine$ uname -p | unknown | vimer@unmatched:~/build/08/33_gridengine$ uname -i | unknown Thanks that should help. | BTW, I saw the solution is ok also. | | ifeq ($(DEB_HOST_ARCH),riscv64) | # do something | endif | | Is it ok for our case? If and when one uses debian/rules (or alike, yes). But I think I put it 'up one level' into configure.ac and that may not have the Debian vars set (unless called from debian/rules I suppose). Oh, yes, It is applied to debian/rules and I forget to mention it.:) Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- Regards, -- Bo YU signature.asc Description: PGP signature
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
On 21 August 2022 at 10:57, Bo YU wrote: | Hi, | On Sat, Aug 20, 2022 at 06:22:17PM -0500, Dirk Eddelbuettel wrote: | > | >On 19 August 2022 at 07:21, Bo YU wrote: | >| Source: tiledb-r | >| Version: 0.15.0-1 | >| Severity: normal | >| Tags: ftbfs, patch | >| User: debian-ri...@lists.debian.org | >| Usertags: riscv64 | >| X-Debbugs-Cc: debian-ri...@lists.debian.org | >| | >| Dear Maintainer, | >| | >| The tiledb-r has a ftbfs on riscv64 due to missing -latomic explicitly | >| after 0.13.0-1: | >| | >| https://buildd.debian.org/status/logs.php?pkg=tiledb-r=riscv64 | >| | >| The full buildd log failed is here: | >| https://buildd.debian.org/status/fetch.php?pkg=tiledb-r=riscv64=0.15.0-1=1660431861=0 | >| | >| The patch attached is trying to fix issue as you suggested. | >| And I'll check if there are other r-cran-* packages with similar problems also. | > | >Ok I'll deal with it (and I am actually upstream for it so I can do it in a | >local debian/patches file or upstream) -- the proper way is in configure.ac | >conditional on the architecture. | > | >So what is the proper architecture name for riscv64, and please remind me | >what the best way to determine it is (uname -m ? Or uname -p ? Or uname -i ?) | | There is only usefully for $(uname -m) for riscv64 hadreware now. | | vimer@unmatched:~/build/08/33_gridengine$ uname -m | riscv64 | vimer@unmatched:~/build/08/33_gridengine$ uname -p | unknown | vimer@unmatched:~/build/08/33_gridengine$ uname -i | unknown Thanks that should help. | BTW, I saw the solution is ok also. | | ifeq ($(DEB_HOST_ARCH),riscv64) | # do something | endif | | Is it ok for our case? If and when one uses debian/rules (or alike, yes). But I think I put it 'up one level' into configure.ac and that may not have the Debian vars set (unless called from debian/rules I suppose). Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
Hi, On Sat, Aug 20, 2022 at 06:22:17PM -0500, Dirk Eddelbuettel wrote: On 19 August 2022 at 07:21, Bo YU wrote: | Source: tiledb-r | Version: 0.15.0-1 | Severity: normal | Tags: ftbfs, patch | User: debian-ri...@lists.debian.org | Usertags: riscv64 | X-Debbugs-Cc: debian-ri...@lists.debian.org | | Dear Maintainer, | | The tiledb-r has a ftbfs on riscv64 due to missing -latomic explicitly | after 0.13.0-1: | | https://buildd.debian.org/status/logs.php?pkg=tiledb-r=riscv64 | | The full buildd log failed is here: | https://buildd.debian.org/status/fetch.php?pkg=tiledb-r=riscv64=0.15.0-1=1660431861=0 | | The patch attached is trying to fix issue as you suggested. | And I'll check if there are other r-cran-* packages with similar problems also. Ok I'll deal with it (and I am actually upstream for it so I can do it in a local debian/patches file or upstream) -- the proper way is in configure.ac conditional on the architecture. So what is the proper architecture name for riscv64, and please remind me what the best way to determine it is (uname -m ? Or uname -p ? Or uname -i ?) There is only usefully for $(uname -m) for riscv64 hadreware now. vimer@unmatched:~/build/08/33_gridengine$ uname -m riscv64 vimer@unmatched:~/build/08/33_gridengine$ uname -p unknown vimer@unmatched:~/build/08/33_gridengine$ uname -i unknown BTW, I saw the solution is ok also. ifeq ($(DEB_HOST_ARCH),riscv64) # do something endif Is it ok for our case? Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- Regards, -- Bo YU signature.asc Description: PGP signature
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
On 19 August 2022 at 07:21, Bo YU wrote: | Source: tiledb-r | Version: 0.15.0-1 | Severity: normal | Tags: ftbfs, patch | User: debian-ri...@lists.debian.org | Usertags: riscv64 | X-Debbugs-Cc: debian-ri...@lists.debian.org | | Dear Maintainer, | | The tiledb-r has a ftbfs on riscv64 due to missing -latomic explicitly | after 0.13.0-1: | | https://buildd.debian.org/status/logs.php?pkg=tiledb-r=riscv64 | | The full buildd log failed is here: | https://buildd.debian.org/status/fetch.php?pkg=tiledb-r=riscv64=0.15.0-1=1660431861=0 | | The patch attached is trying to fix issue as you suggested. | And I'll check if there are other r-cran-* packages with similar problems also. Ok I'll deal with it (and I am actually upstream for it so I can do it in a local debian/patches file or upstream) -- the proper way is in configure.ac conditional on the architecture. So what is the proper architecture name for riscv64, and please remind me what the best way to determine it is (uname -m ? Or uname -p ? Or uname -i ?) Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
Bug#1017684: tiledb-r: ftbfs on riscv64("undefined symbol: __atomic_compare_exchange_1")
Source: tiledb-r Version: 0.15.0-1 Severity: normal Tags: ftbfs, patch User: debian-ri...@lists.debian.org Usertags: riscv64 X-Debbugs-Cc: debian-ri...@lists.debian.org Dear Maintainer, The tiledb-r has a ftbfs on riscv64 due to missing -latomic explicitly after 0.13.0-1: https://buildd.debian.org/status/logs.php?pkg=tiledb-r=riscv64 The full buildd log failed is here: https://buildd.debian.org/status/fetch.php?pkg=tiledb-r=riscv64=0.15.0-1=1660431861=0 The patch attached is trying to fix issue as you suggested. And I'll check if there are other r-cran-* packages with similar problems also. -- Regards, -- Bo YU --- a/src/Makevars.in +++ b/src/Makevars.in @@ -8,7 +8,7 @@ PKG_CPPFLAGS = -I../inst/include/ @TILEDB_INCLUDE@ ## We also need the TileDB library -PKG_LIBS = @CXX17_MACOS@ @TILEDB_LIBS@ @TILEDB_RPATH@ +PKG_LIBS = @CXX17_MACOS@ @TILEDB_LIBS@ -latomic @TILEDB_RPATH@ all: $(SHLIB) # if we are signature.asc Description: PGP signature