bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils 6.0


From: Jim Meyering
Subject: Re: coreutils 6.0
Date: Fri, 18 Aug 2006 09:33:25 +0200

"Gabor Z. Papp" <address@hidden> wrote:
...
> Tried to compile coreutils 6.0 from alpha.gnu, and here is the result.
...
> gcc -std=gnu99  -g -O2  -Wl,--as-needed -o dd  dd.o ../lib/libcoreutils.a  
> ../lib/libcoreutils.a
> ../lib/libcoreutils.a(gettime.o): In function `gettime':
> /home/gzp/src/coreutils-6.0/lib/gettime.c:36: undefined reference to 
> `clock_gettime'
> collect2: ld returned 1 exit status
> make[3]: *** [dd] Error 1
> make[3]: Leaving directory `/home/gzp/src/coreutils-6.0/src'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/gzp/src/coreutils-6.0/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/gzp/src/coreutils-6.0'
> make: *** [all] Error 2

Thanks again for the report.
That was caused by a bug in gethrxtime.m4.
The gettime libraries ($LIB_CLOCK_GETTIME) are needed
by gethrxtime.c only if CLOCK_MONOTONIC is *not* defined.

Here's the patch:

2006-08-18  Jim Meyering  <address@hidden>

        * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Reverse sense of test for
        CLOCK_MONOTONIC.  Otherwise, linking a gethrxtime-using program
        with $(LIB_GETHRXTIME) could fail due to unresolved clock_gettime.
        Reported by Gabor Z. Papp.

Index: m4/gethrxtime.m4
===================================================================
RCS file: /fetish/cu/m4/gethrxtime.m4,v
retrieving revision 1.3
diff -u -p -r1.3 gethrxtime.m4
--- m4/gethrxtime.m4    10 Nov 2005 20:21:07 -0000      1.3
+++ m4/gethrxtime.m4    18 Aug 2006 07:06:37 -0000
@@ -1,5 +1,5 @@
 # gethrxtime.m4 serial 3
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -67,7 +67,7 @@ AC_DEFUN([gl_PREREQ_GETHRXTIME],
        ],
        gl_cv_have_CLOCK_MONOTONIC=yes,
        gl_cv_have_CLOCK_MONOTONIC=no)])
-    if test $gl_cv_have_CLOCK_MONOTONIC = yes; then
+    if test $gl_cv_have_CLOCK_MONOTONIC = no; then
       LIB_GETHRXTIME=$LIB_CLOCK_GETTIME
     fi
     AC_SUBST([LIB_GETHRXTIME])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]