bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: wrong gnu_getline definition


From: Bruno Haible
Subject: Re: wrong gnu_getline definition
Date: Wed, 19 Jul 2006 14:17:31 +0200
User-agent: KMail/1.9.1

Hello,

Nils Magnus Larsgard wrote:
> When I compiled gettext-0.14.6 the other day, I got some compiling
> errors(at the end of the mail).

> avr32-linux-gcc -g -O2 -o .libs/testlocale
> testlocale.o  ../intl/.libs/libintl.so
> -L/usr/avr32-linux/lib /usr/avr32-linux/lib/libiconv.so -lc -Wl,--rpath
> -Wl,/usr/avr32-linux/lib
> ../intl/.libs/libintl.so: undefined reference to `gnu_getline'
> collect2: ld returned 1 exit status
> distcc[1869] ERROR: compile (null) on localhost failed
> make[3]: *** [testlocale] Error 1
> make[3]: Leaving directory
> `/home/nilsmagnus/directFB/gettext-0.14.5/gettext-tools/tests'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/home/nilsmagnus/directFB/gettext-0.14.5/gettext-tools'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/home/nilsmagnus/directFB/gettext-0.14.5/gettext-tools'
> make: *** [all-recursive] Error 1

Thanks for the report. It appears that you are cross-compiling to a
glibc system, right? The logic in relocatable.c assumes that glibc
systems have a working getline() function, whereas the getline.m4
macro assumes that when cross-compiling, you don't know whether
getline() works. Attached is a fix for this mismatch.

Bruno


*** getline.m4  19 Jan 2005 14:24:18 -0000      1.4
--- getline.m4  19 Jul 2006 12:19:06 -0000
***************
*** 42,48 ****
      }
      ], am_cv_func_working_getline=yes dnl The library version works.
      , am_cv_func_working_getline=no dnl The library version does NOT work.
!     , am_cv_func_working_getline=no dnl We're cross compiling.
      )])
    fi
  
--- 42,59 ----
      }
      ], am_cv_func_working_getline=yes dnl The library version works.
      , am_cv_func_working_getline=no dnl The library version does NOT work.
!     , dnl We're cross compiling. Assume ir works on glibc2 systems.
!       [AC_EGREP_CPP([Lucky GNU user],
!          [
! #include <features.h>
! #ifdef __GNU_LIBRARY__
!  #if (__GLIBC__ >= 2)
!   Lucky GNU user
!  #endif
! #endif
!          ],
!          [am_cv_func_working_getline=yes],
!          [am_cv_func_working_getline=no])]
      )])
    fi
  




reply via email to

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