Created attachment 225824 [details] databases/mariadb103-server: patch and unbreak on riscv64 RISC-V does not have FP exceptions and nobody has bothered to stub out the fpsetmask() calls. Remove these calls on platforms that don't support them to unbreak the build. These patches fix databases/mariadb103-server databases/mariadb104-server databases/mariadb105-server on riscv64. Additional, version 104 is also unbroken on i386 as I couldn't reproduce the build failure.
Created attachment 225825 [details] databases/mariadb104-server: patch and unbreak on riscv64 and i386
Created attachment 225826 [details] databases/mariadb105-server: patch and unbreak on riscv64
(In reply to Robert Clausecker from comment #0) Is a separate referent issue to stub out those syscalls useful? Note: Resolving this issue would not block on that issue.
(In reply to Kubilay Kocak from comment #3) It would certainly be useful. The functions seem to exist already; what is missing are the various macros associated with it. Some dummy values would need to be set up.
As for QA, databases/mariadb104-server appears to have plist issues on i386 and riscv64. These need to be looked at separately from the build issues: ====> Running Q/A tests (stage-qa) Warning: setuid files in the stage directory (are these necessary?): 49782 -rwsr-xr-x 1 nobody wheel 8664 Jun 15 09:12:50 2021 +/wrkdirs/usr/ports/databases/mariadb104-server/work/stage/usr/local/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%DATADIR%%/wsrep.cnf ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. *** Error code 1
(In reply to Robert Clausecker from comment #4) Hi, I'm happy to provide a patch for the base system to define the missing values on riscv. However, it is worth noting that the reason we have not done so thus far is because the unstandardized ieeefp.h has long been deprecated in favor of fenv.h, which is part of the C99 standard. It seems the better fix would be to remove this outdated and FreeBSD-specific code block from MariaDB, and make use of the fenv(3) functions like other platforms do. It looks like there are existing feature flags for this, HAVE_FEDISABLEEXCEPT, and HAVE_FESETROUND.
(In reply to Mitchell Horne from comment #6) In fact, the fenv(3) functions should be in use already, since they are detected by configure.cmake in the MariaDB server source.
(In reply to Mitchell Horne from comment #6) Hi Mitchell, While you are right in principle, ieeefp.h is an official FreeBSD interface. So unless a decision is made to remove it from the system, it should still be supported on all platforms. That said, I am in favour of changing the code over to fenv in the long term. The patch I submitted is a minimal fix for the issue at hand and should be followed up by a more thorough fix upstream.
Maintainer timeout.
Thank you Robert. Just to note, while the build only fix (not fixing plist issues) can technically be committed on its own, it is unusual for that to occur (in ports), in the presence of other issues, in particular for packaging failures, which will continue not to be produced for users. Given the build fix should be merged, it would be great to resolve the plist and any other known issues/bugs, as that should be merged as well.
(In reply to Kubilay Kocak from comment #10) I'll go ahead and try to fix the plist issue with databases/mariadb104-server. Since it's an orphaned file (looks like a candidate for @sample), it does not prevent packages from being built, but should indeed still be cleaned up.
Created attachment 226110 [details] databases/mariadb104-server: fix plist issues on non-amd64 This patch fixes the plist issues by always attempting to move wsrep.cnf into the place pkg-plist expects it in, regardless of whether the WSREP option is set or not. if the file does not exist, the error is ignored. There may be a deeper underlying issue for this symptom: WSREP is only available as an option on amd64, so the configuration file should not be installed on other architectures. However, it is unexpectedly present. I presume that the absence of the option means that the wsrep feature is unconditionally built on platforms other than amd64 that support it. This is something that needs to be looked into, but I am not sufficiently familiar with mariadb to make an informed judgement here. Also, I was unable to determine why the WSREP option exists on amd64 only.
Pls hang on, I'm about to commit point updates for all 3 server ports
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8d286ea3810d18103dafe59e38cf8d8878f1625f commit 8d286ea3810d18103dafe59e38cf8d8878f1625f Author: Bernard Spil <brnrd@FreeBSD.org> AuthorDate: 2021-06-30 08:30:18 +0000 Commit: Bernard Spil <brnrd@FreeBSD.org> CommitDate: 2021-06-30 08:39:05 +0000 databases/mariadb103-server: Update to 10.3.30 PR: 256827 [1], 256618 [2] Reported by: <vincent jancso outlook com> [1], Robert Clausecker <fuz fuz su> [2] databases/mariadb103-server/Makefile | 4 +--- databases/mariadb103-server/distinfo | 6 +++--- .../files/patch-scripts_wsrep__sst__mariabackup.sh | 20 ++++++++++---------- .../mariadb103-server/files/patch-sql_mysqld.cc | 22 ++++++++++++++++++++-- 4 files changed, 34 insertions(+), 18 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c930ca58ddbb4e9e86c2cba0ff30a4c31bfdfc56 commit c930ca58ddbb4e9e86c2cba0ff30a4c31bfdfc56 Author: Bernard Spil <brnrd@FreeBSD.org> AuthorDate: 2021-06-30 14:23:30 +0000 Commit: Bernard Spil <brnrd@FreeBSD.org> CommitDate: 2021-06-30 14:23:30 +0000 databases/mariadb105-server: Update to 10.5.11 * Fix build with RISC-V [1] PR: 256618 [1] Submitted by: Robert Clausecker [1] databases/mariadb105-client/Makefile | 1 - databases/mariadb105-server/Makefile | 4 +--- databases/mariadb105-server/distinfo | 6 +++--- .../files/patch-scripts_wsrep__sst__mariabackup.sh | 20 ++++++++++---------- .../files/patch-scripts_wsrep__sst__rsync.sh (gone) | 18 ------------------ .../files/patch-sql_mysqld.cc (new) | 20 ++++++++++++++++++++ 6 files changed, 34 insertions(+), 35 deletions(-)
Seems this triggers an error for 10.4 on FreeBSD 11.4-i386 See https://brnrd.eu/poudriere/data/114i386-git/2021-06-30_15h58m15s/logs/errors/mariadb104-client-10.4.20.log > ../mysys/libmysys.a(my_open.c.o): In function `my_register_filename': > my_open.c:(.text+0x107): undefined reference to `my_atomic_add32' OK on 12.2 though.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=89b30bb9de066abf8e3710b8f5f37bbe0489b549 commit 89b30bb9de066abf8e3710b8f5f37bbe0489b549 Author: Bernard Spil <brnrd@FreeBSD.org> AuthorDate: 2021-06-30 16:48:56 +0000 Commit: Bernard Spil <brnrd@FreeBSD.org> CommitDate: 2021-06-30 16:48:56 +0000 databases/mariadb104-server: Update to 10.4.20 * Fix build on RISC-V and i386 [1] * Fix plist issue with WSREP on i386 [1] PR: 256618 Submitted by: Robert Clausecker <fuz fuz su> databases/mariadb104-server/Makefile | 12 +++--------- databases/mariadb104-server/distinfo | 6 +++--- .../files/patch-scripts_wsrep__sst__mariabackup.sh | 20 ++++++++++---------- .../patch-scripts_wsrep__sst__rsync.sh (gone) | 18 ------------------ .../mariadb104-server/files/patch-sql_mysqld.cc | 22 ++++++++++++++++++++-- 5 files changed, 36 insertions(+), 42 deletions(-)
^Triage: Pending 103,105 commits and merges
(In reply to Kubilay Kocak from comment #18) Is there anything left to do with this one? All three ports have been patched.
It seems like there's nothing left to do with this one. All three ports have been patched. Closing this one.