From: Andy Wingo <wingo@pobox.com>
To: Douglas Mencken <dougmencken@gmail.com>
Cc: bug-guile@gnu.org
Subject: Re: [build error] ./.libs/libguile-2.0.so: undefined reference to `clock_getcpuclockid'
Date: Fri, 20 May 2011 12:07:46 +0200 [thread overview]
Message-ID: <m3vcx5wuq5.fsf@unquote.localdomain> (raw)
In-Reply-To: <BANLkTi=dLP7chZ0x4vo0unzaf5FmOyLvMQ@mail.gmail.com> (Douglas Mencken's message of "Tue, 10 May 2011 20:16:42 +0200")
Hi Douglas,
On Tue 10 May 2011 20:16, Douglas Mencken <dougmencken@gmail.com> writes:
> To get clock_getcpuclockid, it is needed to link with librt, where
> this symbol is present
Can you check your config.log for mentions of clock_gettime ?
For example in mine I have:
configure:25329: checking for library containing clock_gettime
configure:25377: result: -lrt
configure:25389: checking for clock_gettime
configure:25389: result: yes
configure:25389: checking for clock_settime
configure:25389: result: yes
> I'm trying to build guile-v2.0.1-53-g8f6a4b2, and got the following errors:
>
> CC guile-guile.o
> CCLD guile
> ./.libs/libguile-2.0.so: warning: the use of `tmpnam' is dangerous,
> better use `mkstemp'
> ./.libs/libguile-2.0.so: warning: gethostbyaddr is obsolescent, use
> getaddrinfo() instead.
> ./.libs/libguile-2.0.so: warning: gethostbyname is obsolescent, use
> getnameinfo() instead.
> ./.libs/libguile-2.0.so: undefined reference to `clock_getcpuclockid'
> collect2: ld returned 1 exit status
> make[3]: *** [guile] Error 1
Odd. To have gotten here you had to have built libguile already, which
indeed should have linked to -lrt. Can you grep your libguile/Makefile
for LIB_CLOCK_GETTIME ?
Is it perhaps that clock_getcpuclockid is in -lrt but clock_gettime is
in your libc?
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2011-05-20 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 18:16 [build error] ./.libs/libguile-2.0.so: undefined reference to `clock_getcpuclockid' Douglas Mencken
2011-05-20 10:07 ` Andy Wingo [this message]
2011-05-20 16:49 ` Andy Wingo
2011-05-21 12:50 ` Douglas Mencken
2011-06-17 9:18 ` Andy Wingo
2011-05-21 10:38 ` Douglas Mencken
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3vcx5wuq5.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=bug-guile@gnu.org \
--cc=dougmencken@gmail.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).