Skip to content

Prefer MariaDB Connector/C for Spine builds - #613

Closed
somethingwithproof wants to merge 2 commits into
Cacti:developfrom
somethingwithproof:build/prefer-mariadb-connector
Closed

Prefer MariaDB Connector/C for Spine builds#613
somethingwithproof wants to merge 2 commits into
Cacti:developfrom
somethingwithproof:build/prefer-mariadb-connector

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

  • prefer mariadb_config while retaining mysql_config support
  • validate the MySQL-compatible header and client symbol instead of probing library filenames
  • retain MariaDB, MySQL, and Percona-compatible fallback linking
  • exercise both MariaDB Connector/C and MySQL Connector/C with GCC and Clang in CI
  • document MariaDB Connector/C as the preferred packaging dependency

Validation

  • Docker: full make check with MariaDB Connector/C (4/4 passed)
  • Docker: full make check with MySQL Connector/C (4/4 passed)
  • Docker: build through header/library fallback with the config tool unavailable
  • actionlint .github/workflows/ci.yml
  • git diff --check
  • GitHub Actions: all nine jobs succeeded, including all four compiler/connector combinations

Coordination

PR #597 overlaps configure.ac and CI structurally but retains the prior connector discovery. It should rebase after this PR and preserve these checks; no implementation is duplicated here.

Closes #612

Discover mariadb_config before mysql_config while retaining MySQL and Percona-compatible fallback linking. Validate both headers and client symbols instead of relying on filename probes.

Exercise MariaDB Connector/C and MySQL Connector/C across the GCC and Clang build matrix and update the build documentation.

Closes Cacti#612

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The no-config-tool fallback can detect headers under non-default prefixes but fail to add corresponding library search paths, causing avoidable link failures in valid installations.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates Spine’s build and CI configuration to prefer MariaDB Connector/C while retaining compatibility with MySQL/Percona client libraries, and refreshes documentation to reflect the preferred dependency.

Changes:

  • Reworks configure.ac to prefer mariadb_config (with mysql_config support) and validates availability via mysql.h + mysql_init rather than probing library filenames.
  • Expands CI to build/test across a compiler (gcc/clang) × client (MariaDB/MySQL Connector/C) matrix.
  • Updates installation docs and changelog to note MariaDB Connector/C as the preferred packaging dependency.
File summaries
File Description
README.md Documents MariaDB Connector/C dev package as preferred over MySQL Connector/C.
INSTALL Mirrors the README dependency guidance for Cygwin prerequisites.
configure.ac Switches client discovery to config-tool flags when available; otherwise uses header + link checks.
CHANGELOG Adds an entry tracking the feature/issue work for connector discovery changes.
.github/workflows/ci.yml Adds CI build matrix for gcc/clang and MariaDB/MySQL client dev packages.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread configure.ac
… from

The fallback discovery scanned seven prefixes for mysql.h but only added -L
paths when MYSQL_DIR was set, so a client installed under any other prefix
compiled and then failed to link.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof

Copy link
Copy Markdown
Member Author

Consolidated into #618 to reduce review overhead. #618 now carries the connector discovery, compiler/connector matrix, shared build action, sanitizer test execution, and Linux-capabilities CI coverage. No implementation was dropped.

@somethingwithproof

Copy link
Copy Markdown
Member Author

Superseded by #618.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prefer MariaDB Connector/C while retaining MySQL compatibility

4 participants