locales woes

Carmelo Amoroso carmelo73 at gmail.com
Sun Apr 20 21:39:40 UTC 2014



Il 20 aprile 2014 18:34:26 "Yann E. MORIN" <yann.morin.1998 at free.fr> ha 
scritto:

> Hello!

Hello,

>
> While building postgresql with uClibc, we have locales-related build
> failures. Here is a small test-case (by Peter) that breaks on uClibc,
> but works on glibc:
>
>     ---8<--- test.c ---8<---
>     #include <locale.h>
>     #include <ctype.h>
>
>     int f(int c, locale_t l)
>     {
>         return isdigit_l(c, l);
>     }
>     ---8<---
>
>     $ gcc -Wall -D_GNU_SOURCE -c test.c
>     [OK]
>
>     $ i686-buildroot-linux-uclibc-gcc -Wall -D_GNU_SOURCE -c test.c
>     test.c: In function ‘f’:
>     test.c:5:9: error: dereferencing pointer to incomplete type
>     test.c:6:1: warning: control reaches end of non-void function [-Wreturn-type]
>
> What happens is that:
>     sysroot/usr/include/locale.h:
>         typedef __locale_t locale_t;
>
>     sysroot/usr/include/bits/uClibc_locale.h:
>         typedef struct __uclibc_locale_struct *__locale_t;
>
> But struct __uclibc_locale_struct is never defined:
>

What about removing the typedef above ?

>     $ grep -r '__uclibc_locale_struct' sysroot/
>     sysroot/usr/include/bits/uClibc_locale.h:struct __uclibc_locale_struct;
>     sysroot/usr/include/bits/uClibc_locale.h:typedef struct 
>     __uclibc_locale_struct *__locale_t;
>
> So, no actual definition of struct __uclibc_locale_struct, so incomplete
> type is being derefenced. :-(
>

Indeed !

>
> Here are the locales-related options from .config:
>
>     $ grep LOCALE .config
>     UCLIBC_HAS_LOCALE=y
>     # UCLIBC_BUILD_ALL_LOCALE is not set
>     UCLIBC_BUILD_MINIMAL_LOCALE=y
>     # UCLIBC_PREGENERATED_LOCALE_DATA is not set
>     UCLIBC_BUILD_MINIMAL_LOCALES="en_US"
>     UCLIBC_HAS_XLOCALE=y
>
> Any idea?
>
> Regards,
> Yann E. MORIN.
>

Cheers,
Carmelo
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' 
> conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___            
>    |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is 
> no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   
> conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc


Inviato con AquaMail per Android
http://www.aqua-mail.com




More information about the uClibc mailing list