bug-m4
[Top][All Lists]
Advanced

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

Re: m4-1.4.10 compile error: unsigned reference to decimal_point_char


From: Gary V. Vaughan
Subject: Re: m4-1.4.10 compile error: unsigned reference to decimal_point_char
Date: Fri, 13 Jul 2007 17:27:30 -0400

On Jul 13, 2007, at 12:22 PM, Clemens Koller wrote:
Hi, Gary!

Hi Clemens,

Thanks for the bug report. I'm forwarding to the bug-m4 mailing list for
wider visibility.

This looks like a corner case for one of the files from gnulib that m4
imports during bootstrap:  I'm forwarding to the bug-gnulib mailing list
too, so the author of that code gets the report too.

m4-1.4.10 doesn't build anymore (1.4.9 built fine):

make[1]: Entering directory `/usr/ports/core/m4/work/src/m4-1.4.10/ src' gcc -std=gnu99 -O2 -pipe -o m4 m4.o builtin.o debug.o eval.o format.o freeze.o input.o macro.o output.o path.o symtab.o stackovf.o ../lib/libm4.a
../lib/libm4.a(vasnprintf.o): In function `vasnprintf':
vasnprintf.c:(.text+0x3690): undefined reference to `decimal_point_char' vasnprintf.c:(.text+0x37d8): undefined reference to `decimal_point_char' vasnprintf.c:(.text+0x3df0): undefined reference to `decimal_point_char' vasnprintf.c:(.text+0x3e48): undefined reference to `decimal_point_char' vasnprintf.c:(.text+0x3f0c): undefined reference to `decimal_point_char' ../lib/libm4.a(vasnprintf.o):vasnprintf.c:(.text+0x400c): more undefined references to `decimal_point_char' follow
collect2: ld returned 1 exit status
make[1]: *** [m4] Error 1
make[1]: Leaving directory `/usr/ports/core/m4/work/src/m4-1.4.10/src'
make: *** [all-recursive] Error 1

Perhaps the copying the vasnprintf.c from an m4-1.4.9 tarball will tide
you over until the problem is fixed in gnulib?

Problem seems to be burried in #ifdef hell:

#if NEED_PRINTF_DIRECTIVE_A && !defined IN_LIBINTL
/* Determine the decimal-point character according to the current locale. */
# ifndef decimal_point_char_defined
#  define decimal_point_char_defined 1
static char
decimal_point_char ()
{
  const char *point;
  /* Determine it in a multithread-safe way.  We know nl_langinfo is
multithread-safe on glibc systems, but is not required to be multithread- safe by POSIX. sprintf(), however, is multithread-safe. localeconv()
     is rarely multithread-safe.  */
#  if HAVE_NL_LANGINFO && __GLIBC__
  point = nl_langinfo (RADIXCHAR);
#  elif 1
  char pointbuf[5];
  sprintf (pointbuf, "%#.0f", 1.0);
  point = &pointbuf[1];
#  else
  point = localeconv () -> decimal_point;
#  endif
  /* The decimal point is always a single byte: either '.' or ','.  */
  return (point[0] != '\0' ? point[0] : '.');
}
# endif
#endif


I am working on PowerPC architecture:
$ uname -a
Linux fox 2.6.22-rc6-gb75ae860 #5 Fri Jun 29 19:58:04 CEST 2007 ppc e500 GNU/Linux

$ gcc -v
Using built-in specs.
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc-4.2.0/configure --prefix=/usr --libexecdir=/ usr/lib --enable-languages=c,c++,objc --enable-threads=posix -- enable-__cxa_atexit --enable-clocale=gnu --enable-shared --disable- nls --with-x=no --with-cpu=8540 --with-tune=8540 --with-float=soft --with-long-double-128 --disable-multilib
Thread model: posix
gcc version 4.2.0 (ckcore)

glibc-2.3.6 _without_ NLS

Please let me know if you need further information.
A patch would be fine. :-)


Best regards,
--
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com

Cheers,
        Gary
--
  ())_.              Email me: address@hidden
  ( '/           Read my blog: http://blog.azazil.net
  / )=         ...and my book: http://sources.redhat.com/autobook
`(_~)_      Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912




Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

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