1---
2layout: default
3title: Build Updates
4parent: Release & Milestone Tasks
5grand_parent: Contributors
6nav_order: 30
7---
8
9<!--
10© 2021 and later: Unicode, Inc. and others.
11License & terms of use: http://www.unicode.org/copyright.html
12-->
13
14# Build Updates
15{: .no_toc }
16
17## Contents
18{: .no_toc .text-delta }
19
201. TOC
21{:toc}
22
23---
24
25## Regenerate configure
26
27Don't forget to re-run and check in the configure file along with configure.in.
28This is normally supposed to be done when configure.in or aclocal.m4 are
29modified. It also should be done whenever the version numbers change in
30**uvernum.h**
31
32On a Linux system,
33
34```sh
35cd icu4c/source
36autoconf
37```
38
39Review the changes to configure, most commonly just an updated ICU version
40number. Sometimes there are differences due to different versions of the
41autoconf tool being used.
42
43## Update urename.h
44
45Update urename.h to catch all possible ICU4C library exports (especially on
46non-Windows systems that tend to ignore export qualifiers). See
47[icu4c/source/tools/genren/README](https://github.com/unicode-org/icu/blob/main/icu4c/source/tools/genren/README).
48
49Diff the new one with the previous one; there are typically a few bad #defines
50in there.
51
52You are looking to make sure that the defines all are correct exported symbols
53and that the Perl script hasn't inadvertently grabbed extraneous text. Each of
54the defines should be of the format "uxxxx_NamingConvention". If not then you
55need to determine if it's a script issue or a poorly named method.
56
57Also, please look out for this type of message: "\***\*\* WARNING Bad namespace
58(not 'icu') on ShoeSize::ShoeSize()**" - it probably means that there is a class
59not defined inside the "icu" namespace. Consider adding **U_NAMESPACE_BEGIN**
60and **U_NAMESPACE_END** around the class and member definitions.
61
62## Update the pool bundles
63
64*Obsolete for ICU 64+*: The pool bundles are no longer checked in. Instead,
65they are built on the fly. (And smaller if the data is filtered.)
66
67The locale data resource bundles use pool.res bundles (one per bundle tree) for
68sharing most of their resource table key strings. We should update the pool
69bundles once per release, or when we get new data from CLDR, or change the tree
70or key structure, to capture the changing set of key strings.
71
721.  Build ICU4C
732.  Check the date and size of the old pool bundles, for comparison later
74    1.  `~/icu/mine/src$ find icu4c -name 'pool.res' -exec ls -l '{}' \;`
753.  Temporarily modify the data makefile: s/usePoolBundle/writePoolBundle/
76    1.  If you are not on Windows, you probably need to make other changes to
77        the Makefile as well. See
78        [ICU-8101](https://unicode-org.atlassian.net/browse/ICU-8101) (contains
79        a data/Makefile patch; use the latest version there)
80    2.  I like to make a copy the Makefile, then change it, save that for
81        possible reuse, and later copy the original back.
82    3.  Try to patch it in rather than redoing it manually:
83        `~/icu/mine/bld/icu4c/data$ patch -p0 <
84        ~/Downloads/Makefile-writePoolBundle.patch`
854.  Rebuild the data (make sure it actually gets rebuilt: cd data, make clean,
86    make)
875.  Copy all of the pool.res files like this
88    1.  Linux ICU 63, from inside the build output's data directory:
89    2.  ICUDT=icudt63l
90    3.  cp out/build/$ICUDT/pool.res ../../../src/icu4c/source/data/locales
91    4.  cp out/build/$ICUDT/lang/pool.res ../../../src/icu4c/source/data/lang
92    5.  cp out/build/$ICUDT/region/pool.res
93        ../../../src/icu4c/source/data/region
94    6.  cp out/build/$ICUDT/zone/pool.res ../../../src/icu4c/source/data/zone
95    7.  cp out/build/$ICUDT/curr/pool.res ../../../src/icu4c/source/data/curr
96    8.  cp out/build/$ICUDT/unit/pool.res ../../../src/icu4c/source/data/unit
976.  Double-check the date and size of the old pool bundles. Sizes are usually a
98    few % higher than before, due to increased CLDR data.
997.  Revert the data makefile change (copy the original back, if you kept a copy)
1008.  Rebuild the data (make sure it actually gets rebuilt: make clean, make)
1019.  Build ICU4C & run tests
10210. Rebuild the ICU4J data .jar files
103    1.  See
104        [icu4c/source/data/icu4j-readme.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/icu4j-readme.txt)
105    2.  And/or see "update Java data files" in
106        [icu4c/source/data/unidata/changes.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/unidata/changes.txt)
107
108If there are new bundle trees that should use pool.res files (like the "unit"
109tree in ICU 54 ticket
110[ICU-11092](https://unicode-org.atlassian.net/browse/ICU-11092)), then first
111modify the data makefiles (Windows and Linux) to add the new pool.res to the
112appropriate file lists and initially add --writePoolBundle which at the end also
113needs to be turned into --usePoolBundle. Or, simpler, initially copy (svn cp)
114the parent tree's pool bundle, and update it later (maybe during release task
115work).
116