[Tarantool-patches] [PATCH v2] build: fix unit tests build with lrt
Kirill Yukhin
kyukhin at tarantool.org
Fri Dec 6 14:23:51 MSK 2019
Hello,
On 29 ноя 10:06, Alexander V. Tikhonov wrote:
> After the commit 77fa45bd05f8cdd4c0f9bad85185ef5b61528d49
> ('lua: add fiber.top() listing fiber cpu consumption')
> the unit tests builds failed like:
>
> /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld:
> ../../src/lib/core/libcore.a(fiber.c.o): undefined reference to symbol
> 'clock_gettime@@GLIBC_2.2.5'
> //lib64/librt.so.1: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> test/unit/CMakeFiles/cbus.test.dir/build.make:108: recipe for target
> 'test/unit/cbus.test' failed
> make[2]: *** [test/unit/cbus.test] Error 1
>
> Found that fiber.cc is using now clock_gettime(), which requires -lrt
> with glibc. To fix it added librt dependency for core library for glibc.
> Due to glibc requires for -lrt for clock_gettime() only for some
> versions, check 'man clock_gettime.2':
> 'Link with -lrt (only for glibc versions before 2.17).'
> the check whether is able to use clock_gettime() w/o librt library is
> added.
>
> Close #4639
> ---
>
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4639-lrt-suggested-full-ci
> Issue: https://github.com/tarantool/tarantool/issues/4639
I've checked your patch into master.
--
Regards, Kirill Yukhin
More information about the Tarantool-patches
mailing list