Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-34825 FreeBSD fails to build under clang natively #3484

Merged
merged 8 commits into from
Sep 5, 2024

Conversation

grooverdan
Copy link
Member

  • The Jira issue number for this PR is: MDEV-34825

Description

clang doesn't have /usr/local/lib in the path. As such there are various depedency linkages that will fail.

For example pcre and libfmt.`

Release Notes

Add /usr/local/lib to linking path for FreeBSD.

How can this PR be tested?

Check BB FreeBSD worker to ensure that pcre is linked rather than bundled.

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@Sp1l is this too much of a hack?

@CLAassistant
Copy link

CLAassistant commented Aug 28, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ grooverdan
✅ pkubaj
❌ vuvova
You have signed the CLA already but the status is still pending? Let us recheck it.

@grooverdan
Copy link
Member Author

test: https://buildbot.mariadb.org/#/builders/619/builds/6305

  • pcre2 system libraries detected
  • no pcre2 download and build occured
  • my_apc-t unit test passed

Removed on unneeded commit, but all should pass again.

Copy link
Contributor

@LinuxJedi LinuxJedi left a comment

Choose a reason for hiding this comment

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

In general I approve, but please notify the ColumnStore team prior to merging, they use the server's PCRE_INCLUDES in their submodule.

INCLUDE (ExternalProject)

SET(WITH_PCRE "auto" CACHE STRING
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")

MACRO(BUNDLE_PCRE2)
SET(dir "${CMAKE_BINARY_DIR}/extra/pcre2")
SET(PCRE_INCLUDES ${dir}/src/pcre2-build ${dir}/src/pcre2/src)
SET(PCRE_INCLUDE_DIRS ${dir}/src/pcre2-build ${dir}/src/pcre2/src)
Copy link
Contributor

Choose a reason for hiding this comment

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

This renaming will break ColumnStore, best to flag this to that team.

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out 10.6 (develop-6) was already out of date - mariadb-corporation/mariadb-columnstore-engine#3304
develop-5 doesn't appear to be getting updated.

Appended commit for it d80ce3d

grooverdan and others added 7 commits September 5, 2024 11:25
clang doesn't have /usr/local/lib in the path. As such
there are various depedency linkages that will fail.

For example pcre and libfmt.`
Without the call to my_mutex_init, the mutex attributes
my_fast_mutexattr and my_errorcheck_mutexattr are uninitialized.

Linux tolerates this but FreeBSD doesn't (and segfaults).

We fix for all since the unit text should be testing the
standard mutexes of the system.
use pkg-config to find pcre2, if possible

rename PCRE_INCLUDES to use PKG_CHECK_MODULES naming, PCRE_INCLUDE_DIRS
even if pkg-config has it. otherwise build dependencies
aren't detected.
From e735cf2, the PCRE_INCLUDES
changed to PCRE_INCLUDE_DIRS for consistency.

The columnstore module depends on the old name.

Create a mapping for the columnstore submodule.

10.6+ fix for submodule is:
* mariadb-corporation/mariadb-columnstore-engine#3304
@grooverdan grooverdan merged commit 8024b8e into MariaDB:10.5 Sep 5, 2024
12 of 16 checks passed
@grooverdan grooverdan deleted the 10.5-MDEV-34825-freebsd branch September 5, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants