-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
|
d3d429f
to
634a74d
Compare
test: https://buildbot.mariadb.org/#/builders/619/builds/6305
Removed on unneeded commit, but all should pass again. |
dd8ca6e
to
546060e
Compare
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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.
Taking both the FreeBSD[1] and Alpine[1] patch concepts; provide non-GLIBC definations for HMT_*. Provide FreeBSD ASM base for __ppc_get_timebase. On alternately use __builtin_ppc_get_timebase which is described on https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html an not depended on glibc/musl. [1] https://github.com/freebsd/freebsd-ports/blob/15d22e1c70da81aaa5751ad0d82f92e9451c4d81/databases/mariadb106-server/files/patch-include_my__cpu.h [2] https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/mariadb/ppc-remove-glibc-dep.patch
546060e
to
0f351b9
Compare
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
0f351b9
to
d80ce3d
Compare
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
main
branch.PR quality check
@Sp1l is this too much of a hack?