build(macos/other): librt is not needed#24
build(macos/other): librt is not needed#24sitano wants to merge 1 commit intoMariaDB:mariadb-4.xfrom
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 <john.koepi@gmail.com>
|
Ok, changed to |
530dcad to
73e530e
Compare
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