[Scratchbox-users] Problems with locales with uclibc toolchain

sumit.jain at nokia.com sumit.jain at nokia.com
Fri Apr 13 15:12:46 EEST 2007


Hi,
I have build a scratchbox arm toolchain with uclibc 0.9.28.3 as the
standard libc. In the config file for uclibc I have made sure that the
parameter UCLIBC_HAS_LOCALE is set to "y". However when I run the
following code compiled using the toolchain , I don't get any output. 

#include <stdio.h>
#include <locale.h>

int main()
{
        char *locale = setlocale(LC_ALL,"en_US");
        if(locale)
                printf("locale set %s\n",locale);
        else
                printf("locale not set\n");

        return 0;
}

The program terminates with exit status 245.

The way I create the toolchain is as follows....

make -C meta/toolchain CONFIG=meta/toolchain/myconf.conf all-sums
make CONFIG=meta/toolchain/myconf.conf all-sums.

In my config file I have made LIBC_VER to be 0.9.28.1 and I have placed
all the packages in sb-toolchain/packages so that none are downloaded
from the net. If the same code is run and I set locale to POSIX then
output of the code is 

locale set POSIX

If I just compile uclibc using the glibc-arm toolchain and make my code
to link to uclibc rather than glibc, the code works properly. I am
wondering if I have done a mistake in creating the toolchain. Any
pointers as to what the problem might be. 

Thanks in advance.

Regards,
Sumit

Sumit Kumar Jain
Nokia India Pvt. Ltd.
Bangalore.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scratchbox.org/pipermail/scratchbox-users/attachments/20070413/c95e2c8c/attachment.html


More information about the Scratchbox-users mailing list