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 18:49:15 +0200 [thread overview]
Message-ID: <m31uztuxkk.fsf@unquote.localdomain> (raw)
In-Reply-To: <m3vcx5wuq5.fsf@unquote.localdomain> (Andy Wingo's message of "Fri, 20 May 2011 12:07:46 +0200")
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
On Fri 20 May 2011 12:07, Andy Wingo <wingo@pobox.com> writes:
> 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
Does this patch fix it for you?
[-- Attachment #2: 0001-check-for-clock_getcpuclockid-in-gl_CLOCK_TIME.patch --]
[-- Type: text/plain, Size: 1567 bytes --]
From 5ad05b93a3f02be7c66fbab9c49e23ca314b7c33 Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@pobox.com>
Date: Fri, 20 May 2011 18:48:33 +0200
Subject: [PATCH] check for clock_getcpuclockid in gl_CLOCK_TIME
* acinclude.m4 (gl_CLOCK_TIME): It could be that clock_gettime is in
libc but clock_getcpuclockid is not, so check for that explicitly.
---
acinclude.m4 | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index ba8b090..5bd1ced 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -529,8 +529,14 @@ AC_DEFUN([gl_CLOCK_TIME],
AC_SUBST([LIB_CLOCK_GETTIME])
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt posix4],
- [test "$ac_cv_search_clock_gettime" = "none required" ||
- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
- AC_CHECK_FUNCS([clock_gettime clock_settime])
+ [if test "$ac_cv_search_clock_gettime" = "none required"; then
+ AC_SEARCH_LIBS([clock_getcpuclockid], [rt posix4],
+ [test "$ac_cv_search_clock_getcpuclockid" = "none required" \
+ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_getcpuclockid],
+ [LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+ else
+ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
+ fi])
+ AC_CHECK_FUNCS([clock_gettime clock_settime clock_getcpuclockid])
LIBS=$gl_saved_libs
])
--
1.7.5.1
[-- Attachment #3: Type: text/plain, Size: 26 bytes --]
--
http://wingolog.org/
next prev parent reply other threads:[~2011-05-20 16:49 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
2011-05-20 16:49 ` Andy Wingo [this message]
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=m31uztuxkk.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).