Installing ICU 49 on CentOS

Posted on

Installing ICU 49 on CentOS – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, centos, php, , .

I’m trying to install ICU 49 on CentOS release 5.8 (Final). The only way I know how to do it is compiling by source.

I do the following:

./runConfigureICU Linux
gmake

And get the following error towards the end of the compile:

make[2]: Leaving directory `/root/icu/icu/source/tools/toolutil'
make[1]: Making `all' in `ctestfw'
make[2]: Entering directory `/root/icu/icu/source/tools/ctestfw'
generating dependency information for ucln_ct.c
generating dependency information for uperf.cpp
generating dependency information for datamap.cpp
generating dependency information for testdata.cpp
generating dependency information for tstdtmod.cpp
generating dependency information for ctest.c
make[2]: Leaving directory `/root/icu/icu/source/tools/ctestfw'
make[2]: Entering directory `/root/icu/icu/source/tools/ctestfw'
gcc -D_REENTRANT   -I../../common -I../../i18n -I./../toolutil -I.   -DU_ATTRIBUTE_DEPRECATED= -DT_CTEST_IMPLEMENTATION -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long   -c -DPIC -fPIC -o ctest.o ctest.c
g++ -D_REENTRANT   -I../../common -I../../i18n -I./../toolutil -I.   -DU_ATTRIBUTE_DEPRECATED= -DT_CTEST_IMPLEMENTATION -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -c -DPIC -fPIC -o tstdtmod.o tstdtmod.cpp
g++ -D_REENTRANT   -I../../common -I../../i18n -I./../toolutil -I.   -DU_ATTRIBUTE_DEPRECATED= -DT_CTEST_IMPLEMENTATION -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -c -DPIC -fPIC -o testdata.o testdata.cpp
g++ -D_REENTRANT   -I../../common -I../../i18n -I./../toolutil -I.   -DU_ATTRIBUTE_DEPRECATED= -DT_CTEST_IMPLEMENTATION -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -c -DPIC -fPIC -o datamap.o datamap.cpp
g++ -D_REENTRANT   -I../../common -I../../i18n -I./../toolutil -I.   -DU_ATTRIBUTE_DEPRECATED= -DT_CTEST_IMPLEMENTATION -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -c -DPIC -fPIC -o uperf.o uperf.cpp
gcc -D_REENTRANT   -I../../common -I../../i18n -I./../toolutil -I.   -DU_ATTRIBUTE_DEPRECATED= -DT_CTEST_IMPLEMENTATION -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long   -c -DPIC -fPIC -o ucln_ct.o ucln_ct.c
g++ -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long     -shared -Wl,-Bsymbolic -Wl,-soname -Wl,libicutest.so.49 -o libicutest.so.49.1.2 ctest.o tstdtmod.o testdata.o datamap.o uperf.o ucln_ct.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -ldl -lm
rm -f libicutest.so.49 && ln -s libicutest.so.49.1.2 libicutest.so.49
rm -f libicutest.so && ln -s libicutest.so.49.1.2 libicutest.so
make[2]: Leaving directory `/root/icu/icu/source/tools/ctestfw'
make[1]: Making `all' in `makeconv'
make[2]: Entering directory `/root/icu/icu/source/tools/makeconv'
generating dependency information for gencnvex.c
generating dependency information for genmbcs.cpp
generating dependency information for ucnvstat.c
generating dependency information for makeconv.c
make[2]: Leaving directory `/root/icu/icu/source/tools/makeconv'
make[2]: Entering directory `/root/icu/icu/source/tools/makeconv'
gcc -D_REENTRANT   -I../../common -I./../toolutil -DU_ATTRIBUTE_DEPRECATED= -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long  -c   -o makeconv.o makeconv.c
gcc -D_REENTRANT   -I../../common -I./../toolutil -DU_ATTRIBUTE_DEPRECATED= -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long  -c   -o ucnvstat.o ucnvstat.c
g++ -D_REENTRANT   -I../../common -I./../toolutil -DU_ATTRIBUTE_DEPRECATED= -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -c   -o genmbcs.o genmbcs.cpp
gcc -D_REENTRANT   -I../../common -I./../toolutil -DU_ATTRIBUTE_DEPRECATED= -O3 -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long  -c   -o gencnvex.o gencnvex.c
g++ -O3 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   -o ../../bin/makeconv makeconv.o ucnvstat.o genmbcs.o gencnvex.o -L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata -lpthread -ldl -lm
../../lib/libicuuc.so: undefined reference to `__sync_val_compare_and_swap_4'
../../lib/libicuuc.so: undefined reference to `__sync_add_and_fetch_4'
../../lib/libicuuc.so: undefined reference to `__sync_sub_and_fetch_4'
collect2: ld returned 1 exit status
make[2]: *** [../../bin/makeconv] Error 1
make[2]: Leaving directory `/root/icu/icu/source/tools/makeconv'
make[1]: *** [all-recursive] Error 2
make[1]: Leaving directory `/root/icu/icu/source/tools'
make: *** [all-recursive] Error 2

I’ve found absolutely nothing on Google to help me. I’m using icu4c-49_1_2-src.tgz from http://site.icu-project.org/download/49

Solution :

I might be a little late here, but I experienced this exact same problem building ICU 49.1.2 on 32-bit SLES 11 SP2.

After a bit of research and the bug report below, I tried updating my gcc/g++ installation.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40134

Using gcc/g++.46 (after performing a “make clean”), I was able to build the libraries.
Obviously, this might be a little late for the OP, but perhaps someone else will benefit.

My suggestion (while I try and recreate your error).
Don’t.

I’ve found the requisite libraries in one of the yum repositories.

libicu.i386 : International Components for Unicode - libraries
libicu-devel.i386 : Development files for International Components for Unicode
libicu-doc.i386 : Documentation for International Components for Unicode

Ignore that those ones are i386, just the old server I’m using.

Name       : libicu
Arch       : i386
Version    : 3.6
Release    : 5.16.1
Size       : 13 M
Repo       : installed
Summary    : International Components for Unicode - libraries
URL        : http://www.ibm.com/software/globalization/icu/
License    : X License
Description: International Components for Unicode - libraries.

I’m lead to believe that it’s in the default Centos repositories. I advise you try searching yum for libicu.

I’ll have a go at reproducing the error when building from source.

Leave a Reply

Your email address will not be published. Required fields are marked *