Boost logo

Boost-Build :

Subject: [Boost-build] [icu] ICU Search Scripts
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2011-07-18 02:49:11


Hello,

- Boost.Regex's search script tries to find the ICU in

  lib64/bin64 on 64 bit architecture and lib/bin on 32bit

  And it depends if address-model set to 64

- Boost.Locale's search script tries to find ICU in lib/bin
  directories only...

Actually Both are somehow wrong.

Few points:

1. address-model is not set implicitly on 64 bit builds.

   So it is not reliable on default builds (for example on my
   Ubunutu 64 it is not set).

2. It searches correctly for example on Debian and on any platform
   where ICU's ./configure script is used where the libraries are
   installed by default into $(PREFIX)/lib

3. On RH the 64 bit libraries go by default to lib64 (this is not
   default for the ICU installation scripts

   So it seems that the search in lib may fail (not sure about it)

4. On Windows MSVC Project ICU builds libraries go to lib64 and bin64,
   but it does not if Cygwin configure is used for Ming64 or for
   example MSVC 2005 and 2008 (MSVC8,MSVC9) where cygwin build
   is required and it puts files in lib/bin - not lib64/bin64

5. If you Debian/Ubuntu I provide address-model=64 and specific
   icu location like custom builds:

     ./b2 -sICU_PATH=/opt/icu48 address-model=64 --with-regex

   Boost.Regex fails to find ICU

Bottom line:

1. ICU search scripts are broken what ever way we put it
   for one simple reason:

   a) Library can be installed into lib or lib64 and it
      depends on who installed, how he installed and what policy used.

   b) Reach test can be done only with trying to link with libraries
      and search in: lib, lib32 and lib64 regardless the configuration.

2. This is correct not only for ICU but for any other library that may
   be used in the future...

3. Currently both Boost.Locale's script and Boost.Regex's script try to
   be greedy and guess where icu goes and then to check if has_icu
   builds.

   The correct approach should be - try to build it for each possible
   search option: lib/lib32/lib64 and if it fails to link then give
   up.

I've seen many-many changes in the Regex's build script and I'm not sure
all is finally done correctly.

Maybe it is possible to create a single ICU search module in trunk
that does "the right thing".

I'm really searching for help because I feel quite lost with BBv2...
Even I can't find documentation on how <search> tag works

I think a help from BBv2 experts needed.

Thanks...

Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.sf.net/
CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk