From: Simon Marchi <simark@simark.ca>
To: psmith@gnu.org, Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sourceware.org
Subject: Re: GDB 8.3.1 gdbserver linker error: needs -lrt
Date: Sat, 01 Feb 2020 03:05:00 -0000 [thread overview]
Message-ID: <67612a6c-8410-b089-d22f-4c7ac47fb32b@simark.ca> (raw)
In-Reply-To: <e0a028ff0fecddd3be76e979583a2d47d071d1c5.camel@gnu.org>
On 2020-01-31 12:23 p.m., Paul Smith wrote:
> On Fri, 2020-01-31 at 19:17 +0200, Eli Zaretskii wrote:
>>> In this case, we need a new library to link gdbserver directly, not
>>> because of some other package that gdbserver depends on, so we
>>> don't have a package that might contain a pkg-config we could use.
>>
>> Sorry, I thought liblzma needed -lrt. Apologies if I was confused.
>
> Oh I see the confusion.
>
> No, you're absolutely right, liblzma DOES need -lrt. And indeed, we DO
> use pkg-config to get info about liblzma.
>
> And that's why linking of gdb itself succeeds: it links lzma with its
> pkg-config options and that causes -lrt to be linked, as a side-effect.
>
> However, I'm whinging about gdbserver (and libinproctrace.so), and
> liblzma is not not linked into those, and so neither is -lrt.
I have tried to reproduce the build failure using a Docker container of
Centos 6.10. I used the gcc 8 toolchain from softwarecollections.org,
and didn't see the undefined reference to clock_gettime. This is despite
the system running glibc 2.12, and the clock_gettime man page saying that
-lrt is needed to use clock_gettime for glibc < 2.17.
Anyway, I suppose adding this to gdbserver's configure.ac would help, could
you try?
AC_SEARCH_LIBS ([clock_gettime], [rt])
Simon
prev parent reply other threads:[~2020-02-01 3:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 21:23 Paul Smith
2020-01-30 21:35 ` Simon Marchi
2020-01-30 22:17 ` Paul Smith
2020-01-30 22:50 ` Simon Marchi
2020-01-31 7:44 ` Eli Zaretskii
2020-01-31 16:48 ` Paul Smith
2020-01-31 17:17 ` Eli Zaretskii
2020-01-31 17:23 ` Paul Smith
2020-02-01 3:05 ` Simon Marchi [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=67612a6c-8410-b089-d22f-4c7ac47fb32b@simark.ca \
--to=simark@simark.ca \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=psmith@gnu.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