[uClibc]Build problems on "stable" 0.9.19

Jarl Friis jarl at pallas.dk
Wed Apr 9 06:57:46 UTC 2003


Erik Andersen <andersen at codepoet.org> writes:

> On Mon Apr 07, 2003 at 08:40:38AM +0200, Jarl Friis wrote:
> > 
> > Compiling with locale gives compile errors, the error is a missing
> > header, i.e. 
> > gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mpreferred-stack-boundary=2 -falign-jumps=0 -falign-loops=0 -Os    -march=i486 -fno-builtin -nostdinc -D_LIBC -I../../../include -I. -I/usr/lib/gcc-lib/i486-suse-linux/3.2/include -DNDEBUG -fPIC -DL_isalnum ctype.c -c -o isalnum.o
> > In file included from ../../../include/locale.h:30,
> >                  from ctype.c:36:
> > ../../../include/bits/uClibc_locale.h:95:37: bits/uClibc_locale_data.h: No such file or directory
> 
> Building with UCLIBC_HAS_LOCALE enabled currently requires a
> small amount of hand configuration.  See
> uClibc/extra/locale/README for instructions on how to make it
> compile.  Yes, it is currently a pain.  We plan to address that
> in the next couple of months,

Thanks, I somehow figured that out too...

Following these instructions:

1) In the toplevel dir,  'make headers'.

2) Create a codesets.txt file in this dir listing the codesets you want
   to support.  The easiest way to do this is to edit the output of
	'find ./charmaps -name "*.pairs" > codesets.txt'.
   NOTE: UTF-8 support is always included if you build with wide chars enabled.
   NOTE: The files in charmaps/ were created from glibc's charmap files
         with the awk script at the end of this file.  You can add others
	 but only single byte codesets are supported.

3) Create a locales.txt file to select the locales you want to support.
   You can copy and edit the LOCALES file for example.  Other locales could
   added provided you've included the appropriate codesets in step 2.
   NOTE: You have to have the approprite locales available for glibc!

4) Run make here.

I run into problems here. I put the output of the make at the end of
this mail.

I used the following content for codesets.txt:

./charmaps/ISO-8859-1.pairs
./charmaps/ASCII.pairs
./charmaps/ISO-8859-15.pairs

And this for locales.txt (comments removed):

@euro e
@cyrillic c
UTF-8 yes
8-BIT yes
da_DK ISO-8859-1
da_DK.UTF-8 UTF-8
fi_FI ISO-8859-1
fi_FI.UTF-8 UTF-8
fi_FI.UTF-8 at euro UTF-8
fi_FI at euro ISO-8859-15
sv_FI ISO-8859-1
sv_FI.UTF-8 UTF-8
sv_FI.UTF-8 at euro UTF-8
sv_FI at euro ISO-8859-15
sv_SE ISO-8859-1
sv_SE.UTF-8 UTF-8

Thanks for your reply, let me know if you need more information to debug.

Jarl

Now here comes the output of make:



linux66/var/devel-zone/build-area/uClibc-0.9.19/extra/locale:make
gcc -O2 -Wall  -DCTYPE_PACKED=1 -DDO_WIDE_CHAR=1 gen_wc8bit.c -o gen_wc8bit
./gen_wc8bit `cat codesets.txt`
processing ./charmaps/ISO-8859-1.pairs... 256 lines  done
processing ./charmaps/ASCII.pairs... 128 lines  done
processing ./charmaps/ISO-8859-15.pairs... 256 lines  done
tt_num = 15   ti_num = 5
max_wchar = 0x20ac
size is 15 * 16  +  5 * 16  + 38 * 3  =  434
ctype - CTYPE_IDX_SHIFT = 3 -- 3 * 16 + 14 * 4 = 104
uplow - UPLOW_IDX_SHIFT = 3 -- 3 * 16 + 8 * 8 = 112
c2wc - C2WC_IDX_SHIFT = 3 -- 3 * 16 + 2 * 21 * 8 = 384
total size = 1034
gcc -O2 -Wall  gen_wctype.c -o gen_wctype
gen_wctype.c:739:2: warning: #warning fix the upper bound on the upper/lower tables... save 200 bytes or so
gen_wctype.c: In function `main':
gen_wctype.c:230: warning: unused variable `widthtable'
gen_wctype.c:231: warning: unused variable `last_comb'
gen_wctype.c:634: warning: `n' might be used uninitialized in this function
gen_wctype.c:634: warning: `sc' might be used uninitialized in this function
gen_wctype.c:635: warning: `i0' might be used uninitialized in this function
gen_wctype.c:635: warning: `i1' might be used uninitialized in this function
./gen_wctype en_US
typecount[ 0] =    96100  C_unclassified
typecount[ 1] =    88670  C_alpha_nonupper_nonlower
typecount[ 2] =      742  C_alpha_lower
typecount[ 3] =        4  C_alpha_upper_lower
typecount[ 4] =      731  C_alpha_upper
typecount[ 5] =       10  C_digit
typecount[ 6] =    10270  C_punct
typecount[ 7] =        0  C_graph
typecount[ 8] =        0  C_print_space_nonblank
typecount[ 9] =       14  C_print_space_blank
typecount[10] =        0  C_space_nonblank_noncntrl
typecount[11] =        0  C_space_blank_noncntrl
typecount[12] =        6  C_cntrl_space_nonblank
typecount[13] =        1  C_cntrl_space_blank
typecount[14] =       60  C_cntrl_nonspace
typecount[15] =        0  empty_slot
optimizing is* table..
ishift 1  tshift 0  size 49432
ishift 2  tshift 0  size 25546
ishift 4  tshift 0  size 9826
ishift 5  tshift 0  size 8386
ishift 6  tshift 0  size 7970
ishift 1  tshift 1  size 25290
ishift 3  tshift 1  size 8214
ishift 4  tshift 1  size 5958
ishift 5  tshift 1  size 4982
ishift 6  tshift 1  size 4918
ishift 2  tshift 2  size 7992
ishift 3  tshift 2  size 5328
ishift 4  tshift 2  size 4072
ishift 5  tshift 2  size 3656
ishift 1  tshift 4  size 7050
ishift 2  tshift 4  size 5584
ishift 3  tshift 4  size 4904
ishift 4  tshift 4  size 4672
ishift 1  tshift 5  size 7016
ishift 2  tshift 5  size 6292
ishift 3  tshift 5  size 5984
ishift 4  tshift 5  size 5920
ishift 1  tshift 6  size 7290
ishift 2  tshift 6  size 6944
ishift 3  tshift 6  size 6816
ishift 4  tshift 6  size 6816
ishift 1  tshift 7  size 8272
ishift 2  tshift 7  size 8112
ishift 3  tshift 7  size 8064
ishift 1  tshift 8  size 10488
ishift 2  tshift 8  size 10416
ishift 3  tshift 8  size 10416
ishift 1  tshift 9  size 14472
ishift 2  tshift 9  size 14448
ishift 1  tshift 10  size 20560
ishift 2  tshift 10  size 20556
smallest = 3656
setting ishift 5  tshift 2
optimizing u/l-to table..
ishift 1  tshift 0  size 98618
ishift 2  tshift 0  size 49660
ishift 3  tshift 0  size 25400
ishift 4  tshift 0  size 13456
ishift 5  tshift 0  size 7840
ishift 6  tshift 0  size 5472
ishift 7  tshift 0  size 4320
ishift 8  tshift 0  size 4192
ishift 1  tshift 1  size 49576
ishift 2  tshift 1  size 25158
ishift 3  tshift 1  size 13042
ishift 4  tshift 1  size 7162
ishift 5  tshift 1  size 4442
ishift 6  tshift 1  size 3098
ishift 7  tshift 1  size 2650
ishift 1  tshift 2  size 25170
ishift 2  tshift 2  size 12968
ishift 3  tshift 2  size 6956
ishift 4  tshift 2  size 4060
ishift 5  tshift 2  size 2620
ishift 6  tshift 2  size 2012
ishift 7  tshift 2  size 1948
ishift 1  tshift 3  size 13150
ishift 2  tshift 3  size 7072
ishift 3  tshift 3  size 4088
ishift 4  tshift 3  size 2600
ishift 5  tshift 3  size 1912
ishift 6  tshift 3  size 1688
ishift 1  tshift 4  size 7316
ishift 2  tshift 4  size 4288
ishift 3  tshift 4  size 2776
ishift 4  tshift 4  size 2048
ishift 5  tshift 4  size 1744
ishift 1  tshift 5  size 4744
ishift 2  tshift 5  size 3220
ishift 3  tshift 5  size 2472
ishift 4  tshift 5  size 2128
ishift 5  tshift 5  size 2048
ishift 1  tshift 6  size 3882
ishift 2  tshift 6  size 3124
ishift 3  tshift 6  size 2760
ishift 4  tshift 6  size 2624
ishift 5  tshift 6  size 2592
ishift 1  tshift 7  size 3482
ishift 2  tshift 7  size 3108
ishift 3  tshift 7  size 2944
ishift 4  tshift 7  size 2880
ishift 1  tshift 8  size 3730
ishift 2  tshift 8  size 3552
ishift 3  tshift 8  size 3472
ishift 4  tshift 8  size 3472
ishift 1  tshift 9  size 4816
ishift 2  tshift 9  size 4728
ishift 3  tshift 9  size 4704
ishift 1  tshift 10  size 8300
ishift 2  tshift 10  size 8264
ishift 3  tshift 10  size 8256
ishift 1  tshift 11  size 12348
ishift 2  tshift 11  size 12332
ishift 3  tshift 11  size 12332
ishift 1  tshift 12  size 24610
ishift 2  tshift 12  size 24604
ishift 1  tshift 13  size 40980
1688 (smallest) + 384 (u/l diffs) = 2072
smallest = 1688
setting ishift 6  tshift 3
ii_shift = 5  ti_shift = 3
ii_len = 768  ti_len = 1952  ut_len = 936
total = 3656
ii_shift = 6  ti_shift = 3
ii_len = 384  ti_len = 576  ut_len = 728
total = 1688
ii_shift = 0  ti_shift = 0
ii_len = 0  ti_len = 0  ut_len = 0
total = 0
verifying for en_US...
   0x1c4 : totitle glibc 0x1c5 != 0x1c4 mine   i0 = 27
   0x1c5 : totitle glibc 0x1c5 != 0x1c4 mine   i0 = 28
   0x1c6 : totitle glibc 0x1c5 != 0x1c4 mine   i0 = 29
   0x1c7 : totitle glibc 0x1c8 != 0x1c7 mine   i0 = 27
   0x1c8 : totitle glibc 0x1c8 != 0x1c7 mine   i0 = 28
   0x1c9 : totitle glibc 0x1c8 != 0x1c7 mine   i0 = 29
   0x1ca : totitle glibc 0x1cb != 0x1ca mine   i0 = 27
   0x1cb : totitle glibc 0x1cb != 0x1ca mine   i0 = 28
   0x1cc : totitle glibc 0x1cb != 0x1ca mine   i0 = 29
   0x1f1 : totitle glibc 0x1f2 != 0x1f1 mine   i0 = 27
   0x1f2 : totitle glibc 0x1f2 != 0x1f1 mine   i0 = 28
   0x1f3 : totitle glibc 0x1f2 != 0x1f1 mine   i0 = 29
................................................................................................................................................................................................................................................................................done
gcc -O2 -Wall  gen_locale.c -o gen_locale
gen_locale.c:1060:2: warning: #warning fix the char entries for monetary... target signedness of char may be different!
./gen_locale locales.txt
@mapping: "@euro" to 'e'
@mapping: "@cyrillic" to 'c'
UTF-8 locales are enabled
8-BIT locales are enabled
setlocale(LC_ALL,fi_FI.UTF-8 at euro) failed!
setlocale(LC_ALL,sv_FI.UTF-8 at euro) failed!
buf-size=1095  uniq=161  rows=7
total = 13 + 7 * 50 + 1095 = 1458
setlocale(LC_ALL,fi_FI.UTF-8 at euro) failed!
setlocale(LC_ALL,sv_FI.UTF-8 at euro) failed!
buf-size=9  uniq=5  rows=3
total = 13 + 3 * 3 + 9 = 31
setlocale(LC_ALL,fi_FI.UTF-8 at euro) failed!
setlocale(LC_ALL,sv_FI.UTF-8 at euro) failed!
buf-size=59  uniq=20  rows=5
total = 13 + 5 * 22 + 59 = 182
setlocale(LC_ALL,fi_FI.UTF-8 at euro) failed!
setlocale(LC_ALL,sv_FI.UTF-8 at euro) failed!
buf-size=73  uniq=9  rows=4
total = 13 + 4 * 4 + 73 = 102
setlocale(LC_ALL,fi_FI.UTF-8 at euro) failed!
setlocale(LC_ALL,sv_FI.UTF-8 at euro) failed!
buf-size=21  uniq=11  rows=1
total = 13 + 1 * 10 + 21 = 44
locale data = 117  name data = 30 for 6 uniq
total data size = 2033
null count = 0
gcc -O2 -Wall  gen_collate.c -o gen_collate
gen_collate.c:318:2: warning: #warning devel code
gen_collate.c:329:2: warning: #warning devel code
gen_collate.c:704:2: warning: #warning devel code
gen_collate.c: In function `processfile':
gen_collate.c:792: warning: unused variable `p'
gen_collate.c:1225:2: warning: #warning mult by 2 for rule indecies
gen_collate.c: In function `pushfile':
gen_collate.c:1277: warning: type defaults to `int' in declaration of `fbuf'
gen_collate.c:1279: warning: passing arg 1 of `snprintf' from incompatible pointer type
gen_collate.c:1285: warning: passing arg 1 of `fopen' from incompatible pointer type
gen_collate.c:1287: warning: char format, different type arg (arg 2)
gen_collate.c:1448:2: warning: #warning need to update last in order and position or check
gen_collate.c:1534:2: warning: #warning devel code
gen_collate.c:1677:2: warning: #warning devel code
gen_collate.c:1794:2: warning: #warning need to add section to weight list?
gen_collate.c:1874:2: warning: #warning have to use rule for current section!!!
gen_collate.c:1925:2: warning: #warning devel code
gen_collate.c:1928:2: warning: #warning hack to get around hu_HU reorder-after problem
gen_collate.c:2335:2: warning: #warning devel code
gen_collate.c: In function `dump_section':
gen_collate.c:2449: warning: unused variable `i'
gen_collate.c:2601:2: warning: #warning fix the index2weight check!!
gen_collate.c:2638:2: warning: #warning check ko_kR and 9
gen_collate.c:2645:2: warning: #warning check ko_kR and 9
gen_collate.c:2669:2: warning: #warning check ko_kR and 9
gen_collate.c:2691:2: warning: #warning check
gen_collate.c:3173:2: warning: #warning handle UNDEFINED idx specially? what if in only some of derived?
gen_collate.c: In function `finalize_base':
gen_collate.c:2583: warning: unused variable `p'
gen_collate.c:2584: warning: unused variable `n'
gen_collate.c: In function `print_starter_all_node':
gen_collate.c:3230: warning: unused variable `ci'
gen_collate.c:3231: warning: unused variable `p'
gen_collate.c:3232: warning: unused variable `n'
gen_collate.c:3233: warning: unused variable `x'
gen_collate.c: In function `add_rule':
gen_collate.c:3618: warning: unused variable `j'
gen_collate.c: In function `add_range_rule':
gen_collate.c:3695: warning: unused variable `j'
gen_collate.c:3777:26: warning: pasting "." and "num_weights" does not give a valid preprocessing token
gen_collate.c:3779:23: warning: pasting "." and "ii_shift" does not give a valid preprocessing token
gen_collate.c:3780:23: warning: pasting "." and "ti_shift" does not give a valid preprocessing token
gen_collate.c:3781:21: warning: pasting "." and "ii_len" does not give a valid preprocessing token
gen_collate.c:3782:21: warning: pasting "." and "ti_len" does not give a valid preprocessing token
gen_collate.c:3783:25: warning: pasting "." and "max_weight" does not give a valid preprocessing token
gen_collate.c:3785:27: warning: pasting "." and "num_col_base" does not give a valid preprocessing token
gen_collate.c:3786:28: warning: pasting "." and "max_col_index" does not give a valid preprocessing token
gen_collate.c:3787:28: warning: pasting "." and "undefined_idx" does not give a valid preprocessing token
gen_collate.c:3788:24: warning: pasting "." and "range_low" does not give a valid preprocessing token
gen_collate.c:3789:26: warning: pasting "." and "range_count" does not give a valid preprocessing token
gen_collate.c:3791:32: warning: pasting "." and "range_base_weight" does not give a valid preprocessing token
gen_collate.c:3792:27: warning: pasting "." and "num_starters" does not give a valid preprocessing token
gen_collate.c:3795:32: warning: pasting "." and "range_rule_offset" does not give a valid preprocessing token
gen_collate.c:3796:32: warning: pasting "." and "wcs2colidt_offset" does not give a valid preprocessing token
gen_collate.c:3797:34: warning: pasting "." and "index2weight_offset" does not give a valid preprocessing token
gen_collate.c:3799:35: warning: pasting "." and "index2ruleidx_offset" does not give a valid preprocessing token
gen_collate.c:3800:32: warning: pasting "." and "multistart_offset" does not give a valid preprocessing token
gen_collate.c:3816:23: warning: pasting "." and "base_idx" does not give a valid preprocessing token
gen_collate.c:3818:28: warning: pasting "." and "undefined_idx" does not give a valid preprocessing token
gen_collate.c:3820:31: warning: pasting "." and "overrides_offset" does not give a valid preprocessing token
gen_collate.c:3821:32: warning: pasting "." and "multistart_offset" does not give a valid preprocessing token
gen_collate.c:3867:34: warning: pasting "." and "num_weights" does not give a valid preprocessing token
gen_collate.c:3868:35: warning: pasting "." and "num_starters" does not give a valid preprocessing token
gen_collate.c:3869:31: warning: pasting "." and "ii_shift" does not give a valid preprocessing token
gen_collate.c:3870:31: warning: pasting "." and "ti_shift" does not give a valid preprocessing token
gen_collate.c:3871:29: warning: pasting "." and "ii_len" does not give a valid preprocessing token
gen_collate.c:3872:29: warning: pasting "." and "ti_len" does not give a valid preprocessing token
gen_collate.c:3873:33: warning: pasting "." and "max_weight" does not give a valid preprocessing token
gen_collate.c:3874:35: warning: pasting "." and "num_col_base" does not give a valid preprocessing token
gen_collate.c:3875:36: warning: pasting "." and "max_col_index" does not give a valid preprocessing token
gen_collate.c:3876:36: warning: pasting "." and "undefined_idx" does not give a valid preprocessing token
gen_collate.c:3877:32: warning: pasting "." and "range_low" does not give a valid preprocessing token
gen_collate.c:3878:34: warning: pasting "." and "range_count" does not give a valid preprocessing token
gen_collate.c:3879:40: warning: pasting "." and "range_base_weight" does not give a valid preprocessing token
gen_collate.c:3880:40: warning: pasting "." and "range_rule_offset" does not give a valid preprocessing token
gen_collate.c:3881:42: warning: pasting "." and "index2weight_offset" does not give a valid preprocessing token
gen_collate.c:3882:43: warning: pasting "." and "index2ruleidx_offset" does not give a valid preprocessing token
gen_collate.c:3883:40: warning: pasting "." and "multistart_offset" does not give a valid preprocessing token
gen_collate.c:3899:31: warning: pasting "." and "base_idx" does not give a valid preprocessing token
gen_collate.c:3900:36: warning: pasting "." and "undefined_idx" does not give a valid preprocessing token
gen_collate.c:3901:39: warning: pasting "." and "overrides_offset" does not give a valid preprocessing token
gen_collate.c:3902:40: warning: pasting "." and "multistart_offset" does not give a valid preprocessing token
gen_collate.c: In function `dump_collate':
gen_collate.c:3919: warning: int format, long unsigned int arg (arg 3)
/usr/include/ctype.h: At top level:
gen_collate.c:3772: warning: `dump_base_locale' defined but not used
gen_collate.c:3808: warning: `dump_der_locale' defined but not used
gen_collate.c:837: warning: `print_colnode' defined but not used
gen_collate.c:2567: warning: `print_starter_node' defined but not used
gen_collate.c:3228: warning: `print_starter_all_node' defined but not used
grep COL_IDX_ locale_tables.h | sed -e "s/^.*COL_IDX_\([^, ]*\).*$/\1/" | sort | uniq | xargs ./gen_collate
ignoring C locale
Base:     iso14651_t1  1154 weights       0 der      0 reor      0 starter - 0 new stubs
Warning: adding UNDEFINED entry for sv_SE
 Der:           sv_SE    20 weights       5 der     15 reor      0 starter - 10 new stubs
range pre = 1174  after = 22076
iso14651_t1:   1139 invariant      15 varying       5 derived    1159 total   22076 max weight     940 wcs2
NOT adding special derived for iso14651_t1
Error: no UNDEFINED definition for sv_SE
make: *** [locale_collate.h] Error 123



More information about the uClibc mailing list