From: Douglas Mencken <dougmencken@gmail.com>
To: bug-guile@gnu.org
Subject: [build error] ./.libs/libguile-2.0.so: undefined reference to `clock_getcpuclockid'
Date: Tue, 10 May 2011 20:16:42 +0200 [thread overview]
Message-ID: <BANLkTi=dLP7chZ0x4vo0unzaf5FmOyLvMQ@mail.gmail.com> (raw)
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
with make V=1:
Making all in libguile
make[2]: Entering directory
`/root/build-farm/guile-v2.0.1-53-g8f6a4b2.builddir/libguile'
make all-am
make[3]: Entering directory
`/root/build-farm/guile-v2.0.1-53-g8f6a4b2.builddir/libguile'
/bin/bash ../libtool --tag=CC --mode=link
powerpc-gnu-linux-uclibc-gcc -pthread -Wall -Wmissing-prototypes
-Wdeclaration-after-statement -Wswitch-enum -fvisibility=hidden -g -O2
-pthread -o guile guile-guile.o libguile-2.0.la -lcrypt -lm
libtool: link: powerpc-gnu-linux-uclibc-gcc -pthread -Wall
-Wmissing-prototypes -Wdeclaration-after-statement -Wswitch-enum
-fvisibility=hidden -g -O2 -pthread -o .libs/guile guile-guile.o
./.libs/libguile-2.0.so -L/usr/lib /usr/lib/libgc.so -lpthread
/usr/lib/libffi.so /usr/lib/libunistring.so /usr/lib/libiconv.so
/usr/lib/libgmp.so /usr/lib/libltdl.so -ldl -lcrypt -lm -pthread
./.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
To get clock_getcpuclockid, it is needed to link with librt, where
this symbol is present (see also
http://joysofprogramming.com/undefined-reference-to-clock_getcpuclockid/).
Current workaround:
# cd libguile/
# /bin/bash ../libtool --tag=CC --mode=link
powerpc-gnu-linux-uclibc-gcc -pthread -Wall -Wmissing-prototypes
-Wdeclaration-after-statement -Wswitch-enum -fvisibility=hidden -g -O2
-pthread -o guile guile-guile.o libguile-2.0.la -lcrypt -lm -lrt
libtool: link: powerpc-gnu-linux-uclibc-gcc -pthread -Wall
-Wmissing-prototypes -Wdeclaration-after-statement -Wswitch-enum
-fvisibility=hidden -g -O2 -pthread -o .libs/guile guile-guile.o
./.libs/libguile-2.0.so -L/usr/lib /usr/lib/libgc.so -lpthread
/usr/lib/libffi.so /usr/lib/libunistring.so /usr/lib/libiconv.so
/usr/lib/libgmp.so /usr/lib/libltdl.so -ldl -lcrypt -lm -lrt -pthread
./.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.
(i.e. it builds and links; after that, guile build process can be
resumed with make in source tree)
next reply other threads:[~2011-05-10 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 18:16 Douglas Mencken [this message]
2011-05-20 10:07 ` [build error] ./.libs/libguile-2.0.so: undefined reference to `clock_getcpuclockid' Andy Wingo
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='BANLkTi=dLP7chZ0x4vo0unzaf5FmOyLvMQ@mail.gmail.com' \
--to=dougmencken@gmail.com \
--cc=bug-guile@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).