unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [build error] ./.libs/libguile-2.0.so: undefined reference to `clock_getcpuclockid'
@ 2011-05-10 18:16 Douglas Mencken
  2011-05-20 10:07 ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Douglas Mencken @ 2011-05-10 18:16 UTC (permalink / raw)
  To: bug-guile

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)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-17  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-05-21 12:50     ` Douglas Mencken
2011-06-17  9:18       ` Andy Wingo
2011-05-21 10:38   ` Douglas Mencken

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).