Summary: | fails to build on Linux with recent glibc | ||
---|---|---|---|
Product: | dbus | Reporter: | Simon McVittie <smcv> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | Havoc Pennington <hp> |
Severity: | normal | ||
Priority: | medium | CC: | lennart, thiago, walters |
Version: | unspecified | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
On Linux, check for mq_getattr(), needed by sd-daemon.c
Disable sd-daemon.c's support for POSIX message queues |
Description
Simon McVittie
2013-04-05 12:54:26 UTC
(In reply to comment #0) > I'll open a separate bug against systemd Bug #63167 Created attachment 78100 [details] [review] Disable sd-daemon.c's support for POSIX message queues This fixes build failures with recent glibc while avoiding an otherwise useless librt dependency. --- Now that I've updated sd-daemon.[ch] from systemd git, we can avoid needing librt altogether. Comment on attachment 78100 [details] [review] Disable sd-daemon.c's support for POSIX message queues Review of attachment 78100 [details] [review]: ----------------------------------------------------------------- Shouldn't there be somewhere in the Makefile.am a link to -lrt? (In reply to comment #3) > Shouldn't there be somewhere in the Makefile.am a link to -lrt? Until recently, clock_getres() was in -lrt, so our checks in configure.ac meant that THREAD_LIBS ended up including it. However, glibc 2.17 made this change: * 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. so we no longer linked -lrt in order to get clock_getres(). That meant we couldn't see the implementation of mq_getattr() either, and linking failed. In attachment #77478 [details] [review] I added a check for the location of mq_getattr(), which is used by sd-daemon.c, so arguably we should have been checking for it ever since sd-daemon.c was used. We don't really actually *want* -lrt or mq_getattr(), though - nothing in libdbus has ever cared about POSIX message queues - so I opened Bug #63167, requesting a way to stop sd-daemon.c from referencing mq_getattr(). Lennart applied my patch, and I've already updated libdbus' copy. If you would prefer Attachment #77478 [details] for some reason, we could have that instead. So you're saying that sd_daemon.c has dead code? Then this patch is ok. Follow up later with another one removing the dead code. (In reply to comment #5) > So you're saying that sd_daemon.c has dead code? sd-daemon.c is imported verbatim from systemd. I don't think forking it is a valuable use of dbus maintainers' time. I don't get why we need a verbatim copy of some file from a different project, but oh well. Patch is good. Fixed in git for 1.7.2, thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.