Bug 293164 - databases/mariadb-connector-c: fix build with clang 21
Summary: databases/mariadb-connector-c: fix build with clang 21
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-13 19:14 UTC by Dimitry Andric
Modified: 2026-02-15 09:41 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments
databases/mariadb-connector-c: fix build with clang 21 (2.20 KB, patch)
2026-02-13 19:15 UTC, Dimitry Andric
brnrd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2026-02-13 19:14:48 UTC
With clang 21 databases/mariadb-connector-c fails to build, with errors
similar to:

    /wrkdirs/usr/ports/databases/mariadb-connector-c/work/mariadb-connector-c-3.4.5-src/libmariadb/ma_tls.c:227:14: error: default initialization of an object of type 'const char[64]' leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
      227 |   const char fp[EVP_MAX_MD_SIZE];
          |              ^

This has been fixed upstream in
https://github.com/mariadb-corporation/mariadb-connector-c/commit/0ca807a2,
so add it as a patch file.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-13 19:15:52 UTC
Created attachment 268033 [details]
databases/mariadb-connector-c: fix build with clang 21
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2026-02-14 11:41:41 UTC
Comment on attachment 268033 [details]
databases/mariadb-connector-c: fix build with clang 21

Hey dim!

Race-condition? Port is at 3.4.8 since yesterday which includes this patch.

Or is this for the 2026Q1 branch only? In which case: approved!
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2026-02-14 16:19:21 UTC
(In reply to Bernard Spil from comment #2)
Well, I lost the race, no problem. :) It's not terribly urgent since I don't expect clang 21 to merged very soon, but aren't you planning on merging 3.4.8 to the 2026Q1 branch at some point?
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2026-02-14 17:14:07 UTC
(In reply to Dimitry Andric from comment #3)
Version update doesn't warrant a MFH as far as I know.

Any timeline? It would be updated 2026-04-01 otherwise.

If we merge clang 21, no problem committing this to 2026Q1
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2026-02-14 21:06:59 UTC
(In reply to Bernard Spil from comment #4)
In my opinion the exp-run (bug 292067) is going well, and if it were up to me, I would merge it today. But it's up to portmgr to decide whether it's good enough, and I can't really predict it. :)

For now, let's close this bug, we can always revisit it later.
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-02-15 09:41:08 UTC
A commit in branch 2026Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2db35de0ce8b32e4b9637907913078c9e887d347

commit 2db35de0ce8b32e4b9637907913078c9e887d347
Author:     Bernard Spil <brnrd@FreeBSD.org>
AuthorDate: 2026-02-13 16:27:55 +0000
Commit:     Bernard Spil <brnrd@FreeBSD.org>
CommitDate: 2026-02-15 09:40:11 +0000

    databases/mariadb-connector-c: Update to 3.4.8

    Fixes build error with clang 21

    PR:             293164
    Reported by:    dim

    (cherry picked from commit 7f792383099669c49ca17cb1ea8903dbd5c02a74)

 databases/mariadb-connector-c/Makefile | 2 +-
 databases/mariadb-connector-c/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)