From: Natanael Copa <ncopa@alpinelinux.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] make: link udevd with -lrt
Date: Tue, 14 Feb 2012 08:45:44 +0000 [thread overview]
Message-ID: <20120214094544.2d8afde7@ncopa-desktop.nor.wtbts.net> (raw)
In-Reply-To: <1328127721-18825-1-git-send-email-ncopa@alpinelinux.org>
On Sun, 12 Feb 2012 22:10:34 +0100
Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Wed, Feb 1, 2012 at 21:22, Natanael Copa <ncopa@alpinelinux.org>
> wrote:
> > sd-daemon.c uses mq_getattr() and should link with -lrt as the
> > man mq_getattr(3) states.
>
> Something seems wrong on your system. The:
> AC_SEARCH_LIBS([clock_gettime], [rt], ...
> in configure.ac should take care of that, and puts this in Makefile:
> LIBS = -lrt
> ...
> $(AM_V_CCLD)$(src_udevd_LINK) $(src_udevd_OBJECTS)
> $(src_udevd_LDADD) $(LIBS)
>
> Kay
configure:12437: checking for library containing clock_gettime
configure:12468: ccache gcc -o conftest -march=i486 -Os -fomit-frame-pointer -pipe -march=i486 -Os -fomit-frame-pointer -pipe -Wl,--as-needed conftest.c >&5
configure:12468: $? = 0
configure:12485: result: none required
$ nm -D /lib/libc.so.0.9.32 | grep clock_gettime
0000000000010b08 T clock_gettime
$ nm -D /lib/librt.so.0.9.32 | grep clock_gettime
00000000000023c0 T clock_gettime
So what is "wrong" on my system is that uClibc provides 2 different
versions of clock_gettime. One is with the threading additions and one
is without. This makes it possible to use clock_gettime() without
linking in the entire libpthread unless you actually use those
additions.
The configure script will test if -lrt is needed by checking
clock_gettime() and bumps into this "feature" and thinks it does not
need to add the -lrt flag. However, it also uses mq_getattr() which
does require -lrt.
We should probably check for mq_getattr() instead of clock_gettime().
Thanks!
-nc
prev parent reply other threads:[~2012-02-14 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 20:22 [PATCH] make: link udevd with -lrt Natanael Copa
2012-02-12 21:10 ` Kay Sievers
2012-02-14 8:45 ` Natanael Copa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120214094544.2d8afde7@ncopa-desktop.nor.wtbts.net \
--to=ncopa@alpinelinux.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox