~lattis/muon#20: 
`cc.find_library('rt')` fails on Fedora Linux while it works fine with Meson

/home/user/rizin/rizin_copy/meson.build:358:25: error: library not found
358 |   lrt = cc.find_library('rt', required: true, static: is_static_build)
                              ^
/home/user/rizin/rizin_copy/meson.build:358:12: error: in method compiler.find_library
358 |   lrt = cc.find_library('rt', required: true, static: is_static_build)
                 ^

Here is the piece of code that uses it:

lrt = dependency('', required: false)
if not cc.has_function('clock_gettime', prefix: '#include <time.h>') and cc.has_header_symbol('features.h', '__GLIBC__')
  lrt = cc.find_library('rt', required: true, static: is_static_build)
endif

have_lrt = not ['windows', 'darwin', 'openbsd', 'android', 'haiku'].contains(host_machine.system())
if have_lrt and not lrt.found()
  lrt = cc.find_library('rt', required: true, static: is_static_build)
endif

See more here https://github.com/rizinorg/rizin/blob/dev/meson.build#L381

Status
RESOLVED FIXED
Submitter
~xvilka
Assigned to
No-one
Submitted
2 months ago
Updated
a month ago
Labels
No labels applied.

~xvilka a month ago

~lattis REPORTED FIXED a month ago

Register here or Log in to comment, or comment via email.