From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH bluez-utils] Link mcaptest with -lrt
Date: Mon, 29 Dec 2014 23:22:19 +0100 [thread overview]
Message-ID: <20141229232219.622fd4d8@free-electrons.com> (raw)
In-Reply-To: <B9CBBBC9-712D-4E23-8023-84DBE3BDE635@holtmann.org>
Dear Marcel Holtmann,
On Mon, 29 Dec 2014 09:40:04 -0800, Marcel Holtmann wrote:
> Hi Thomas,
>
> > The mcaptest tool uses the profiles/health/mcap.c source file, which
> > calls clock_getres(). This function is defined in librt, so mcaptest
> > should be linked against librt, otherwise one gets link failures such
> > as:
> >
> > ld: profiles/health/mcap.o: undefined reference to symbol 'clock_getres@@GLIBC_2.2.5'
> > ld: note: 'clock_getres@@GLIBC_2.2.5' is defined in DSO [...]/sysroot/lib64/librt.so.1 so try adding it to the linker command line
> > [...]/sysroot/lib64/librt.so.1: could not read symbols: Invalid operation
> > collect2: error: ld returned 1 exit status
> > Makefile:4184: recipe for target 'tools/mcaptest' failed
>
> the manpage clearly states to only link against -lrt when using glibc
> versions before 2.17. If we want to support older glibc, then this
> might need to be conditional via a configure test.
Ah, yes, indeed. v2 of the patch follows. Thanks for the review!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-12-29 22:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 12:38 [PATCH bluez-utils] Link mcaptest with -lrt Thomas Petazzoni
2014-12-29 17:40 ` Marcel Holtmann
2014-12-29 22:22 ` Thomas Petazzoni [this message]
2014-12-29 22:22 ` [PATCHv2] Link mcaptest with -lrt when needed Thomas Petazzoni
2015-02-11 15:33 ` Szymon Janc
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=20141229232219.622fd4d8@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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