Modify

Opened 5 years ago

Last modified 4 years ago

#13095 new defect

uClibc fails to compile with full language support

Reported by: Chi Zhang <zhangchi866@…> Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: toolchain Version: Trunk
Keywords: uClibc nls Cc: zhangchi866@…

Description

When building with CONFIG_BUILD_NLS=y , uClibc fails to compile with following message:

grep "^#define" extra/locale/locale_tables.h > extra/locale/lt_defines.h
grep "^#define __lc" extra/locale/locale_collate.h >> extra/locale/lt_defines.h
gcc extra/locale/gen_wctype.c  -o extra/locale/gen_wctype    -Os -Wall  -D__UCLIBC_GEN_LOCALE -I./
extra/locale/gen_wctype.c: In function 'main':
extra/locale/gen_wctype.c:684:2: warning: #warning fix the upper bound on the upper/lower tables... save 200 bytes or so [-Wcpp]
for locale in  en_US en_GB; do \
                extra/locale/gen_wctype  $locale > extra/locale/wctables.h || \
                extra/locale/gen_wctype  $locale.UTF-8 > extra/locale/wctables.h || \
                extra/locale/gen_wctype  $locale.iso8859-1 > extra/locale/wctables.h && break; \
        done
make[4]: *** [extra/locale/wctables.h] Error 1
make[4]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2'
make[3]: *** [/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/stamp/.uclibc_headers_installed] Error 2
make[3]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt/toolchain/uClibc/headers'
make[2]: *** [toolchain/uClibc/headers/install] Error 2
make[2]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt'
make[1]: *** [/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt'
make: *** [world] 错误 2

If you rerun, you will get a different one:

make[3]: Entering directory `/media/study/boards/TEWA-300RL-C/openwrt/toolchain/uClibc/headers'
PATH='/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/bin:/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/host/bin:/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/bin:/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/host/bin:/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/bin:/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/host/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' make -C /media/study/boards/TEWA-300RL-C/openwrt/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2 PREFIX="/media/study/boards/TEWA-300RL-C/openwrt/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/uClibc-dev/" DEVEL_PREFIX=/ RUNTIME_PREFIX="/media/study/boards/TEWA-300RL-C/openwrt/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/uClibc-dev/" HOSTCC="gcc" CC="mipsel-openwrt-linux-uclibc-gcc" CPU_CFLAGS="-Os -pipe -mips32 -mtune=mips32 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" ARCH=""mipsel"" pregen install_headers
make[4]: Entering directory `/media/study/boards/TEWA-300RL-C/openwrt/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2'
gcc extra/locale/gen_ldc.c  -o extra/locale/gen_ldc    -Os -Wall  -I./extra/locale -D__WCHAR_ENABLED=1
In file included from extra/locale/gen_ldc.c:45:0:
extra/locale/locale_mmap.h:46:32: error: '__LOCALE_DATA_WCctype_II_LEN' undeclared here (not in a function)
extra/locale/locale_mmap.h:46:32: error: '__LOCALE_DATA_WCctype_TI_LEN' undeclared here (not in a function)
extra/locale/locale_mmap.h:46:32: error: '__LOCALE_DATA_WCctype_UT_LEN' undeclared here (not in a function)
extra/locale/locale_mmap.h:47:32: error: '__LOCALE_DATA_WCuplow_II_LEN' undeclared here (not in a function)
extra/locale/locale_mmap.h:47:32: error: '__LOCALE_DATA_WCuplow_TI_LEN' undeclared here (not in a function)
extra/locale/locale_mmap.h:47:32: error: '__LOCALE_DATA_WCuplow_UT_LEN' undeclared here (not in a function)
extra/locale/locale_mmap.h:48:31: error: '__LOCALE_DATA_WCuplow_diffs' undeclared here (not in a function)
extra/locale/gen_ldc.c: In function 'main':
extra/locale/gen_ldc.c:195:14: error: '__LOCALE_DATA_WCctype_data' undeclared (first use in this function)
extra/locale/gen_ldc.c:195:14: note: each undeclared identifier is reported only once for each function it appears in
extra/locale/gen_ldc.c:196:14: error: '__LOCALE_DATA_WCuplow_data' undeclared (first use in this function)
extra/locale/gen_ldc.c:197:15: error: '__LOCALE_DATA_WCuplow_diff_data' undeclared (first use in this function)
make[4]: *** [extra/locale/gen_ldc] Error 1
make[4]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2'
make[3]: *** [/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/stamp/.uclibc_headers_installed] Error 2
make[3]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt/toolchain/uClibc/headers'
make[2]: *** [toolchain/uClibc/headers/install] Error 2
make[2]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt'
make[1]: *** [/media/study/boards/TEWA-300RL-C/openwrt/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/media/study/boards/TEWA-300RL-C/openwrt'
make: *** [world] 错误 2

Using latest git source and target brcm47xx.

Another problem is that the toolchain won't get recompiled if related settings are changed. So a distclean is needed before turnning full language support on and reproducing the bug.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by Ieshua

Try this patch http://ftp.osuosl.org/pub/manulix/scripts/build-scripts/PPFILES/ppfiles-uclibc/gen_wctype.patch
It works for attitude_adjustment (r38863). I just renamed it into 999-gen_wctype.patch and put in toolchain/uClibc/patches-0.9.33.2

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.