-
Notifications
You must be signed in to change notification settings - Fork 20
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
build(macos/other): librt is not needed #24
base: mariadb-4.x
Are you sure you want to change the base?
Conversation
As it can be seen at least Debian 10, 11, and Ubuntu 20.04 still provide some functions in |
The solution could be to include rt lib if timer_create is not found in libc for example, or just exclude it for DARWIN builds. |
@grooverdan wdyt? |
I think the patch is relatively good. I hope CI builders do build tests :D.
or maybe give me a permission to press button |
Sorry for delay. CMake can do checks. What do you think of this:
|
@grooverdan I am up for it. What if there will be another function besides timer_create that will be needed from librt and we miss it? If you think it is relatively safe I can replace it easily with your version. What would you say? |
I can't easily grant rebuild access so I triggered those. |
Since glibc >=2.17 (2012-12-25), librt is a stub-only library. (https://abi-laboratory.pro/?view=changelog&l=glibc&v=2.17) * The `clock_*' suite of functions (declared in <time.h>) is now available directly in the main C library. Previously it was necessary to link with -lrt to use these functions. This change has the effect that a single-threaded program that uses a function such as `clock_gettime' (and is not linked with -lrt) will no longer implicitly load the pthreads library at runtime and so will not suffer the overheads associated with multi-thread support in other code such as the C++ runtime library. Current version on Arch Linux is 2.40. It is however is required for Debian 10, 11 and Ubuntu 20.04. Signed-off-by: Ivan Prisyazhnyy <[email protected]>
Ok, changed to |
Follow up to #20
Since glibc >= 2.17 (2012-12-25), librt is a stub-only library. (https://abi-laboratory.pro/?view=changelog&l=glibc&v=2.17)
clock_*
suite of functions (declared in<time.h>
) is now available directly in the main C library. Previously it was necessary to link with -lrt to use these functions. This change has the effect that a single-threaded program that uses a function such asclock_gettime
(and is not linked with-lrt
) will no longer implicitly load the pthreads library at runtime and so will not suffer the overheads associated with multi-thread support in other code such as the C++ runtime library.Current version on Arch Linux is 2.40.
Build results: https://buildbot.mariadb.org/#/grid?branch=refs%2Fpull%2F24%2Fmerge