Boost logo

Boost :

Subject: Re: [boost] regex/ICU fix
From: John Maddock (john_at_[hidden])
Date: 2009-08-20 13:04:06


>> Yes the ICU binary is always a dll, linked to the shared runtime.
>> However,
>> the regex binary could be a static lib as long as links to the same
>> shared
>> runtime as the ICU dll.
>
> OK, I have checked in this:
>
> https://svn.boost.org/trac/boost/changeset/55685

Testing on Win32 checks out OK, but on Linux I see some errors, first off:

john_at_john-laptop:~/boost/trunk$ bjam
stage --with-regex -sHAVE_ICU=1 --build-type=complete
Note: Building Boost.Regex with Unicode/ICU support enabled
    Using ICU in
warning: forcing runtime-link=shared for Boost.Regex
warning: this is required when using the ICU library
/home/john/boost/trunk/tools/build/v2/build/virtual-target.jam:1056: in
virtual-target.register-actual-name from module virtual-target
error: Duplicate name of actual target: <pstage/lib>libboost_regex.a
error: previous virtual target {
common%common.copy-libboost_regex.a.STATIC_LIB {
gcc%gcc.archive-libboost_regex.a.STATIC_LIB {
gcc%gcc.compile.c++-c_regex_traits.o.OBJ { ../src/c_regex_traits.cpp.CPP } }
{ gcc%gcc.compile.c++-cpp_regex_traits.o.OBJ {
../src/cpp_regex_traits.cpp.CPP } } { gcc%gcc.compile.c++-cregex.o.OBJ {
../src/cregex.cpp.CPP } } { gcc%gcc.compile.c++-fileiter.o.OBJ {
../src/fileiter.cpp.CPP } } { gcc%gcc.compile.c++-icu.o.OBJ {
../src/icu.cpp.CPP } } { gcc%gcc.compile.c++-instances.o.OBJ {
../src/instances.cpp.CPP } } { gcc%gcc.compile.c++-posix_api.o.OBJ {
../src/posix_api.cpp.CPP } } { gcc%gcc.compile.c++-regex.o.OBJ {
../src/regex.cpp.CPP } } { gcc%gcc.compile.c++-regex_debug.o.OBJ {
../src/regex_debug.cpp.CPP } } { gcc%gcc.compile.c++-regex_raw_buffer.o.OBJ
{ ../src/regex_raw_buffer.cpp.CPP } } {
gcc%gcc.compile.c++-regex_traits_defaults.o.OBJ {
../src/regex_traits_defaults.cpp.CPP } } {
gcc%gcc.compile.c++-static_mutex.o.OBJ { ../src/static_mutex.cpp.CPP } } {
gcc%gcc.compile.c++-w32_regex_traits.o.OBJ {
../src/w32_regex_traits.cpp.CPP } } {
gcc%gcc.compile.c++-wc_regex_traits.o.OBJ {
../src/wc_regex_traits.cpp.CPP } } {
gcc%gcc.compile.c++-wide_posix_api.o.OBJ { ../src/wide_posix_api.cpp.CPP } }
{ gcc%gcc.compile.c++-winstances.o.OBJ { ../src/winstances.cpp.CPP } } {
gcc%gcc.compile.c++-usinstances.o.OBJ { ../src/usinstances.cpp.CPP } } } }
error: created from ./stage-proper
error: another virtual target {
common%common.copy-libboost_regex.a.STATIC_LIB {
gcc%gcc.archive-libboost_regex.a.STATIC_LIB {
gcc%gcc.compile.c++-c_regex_traits.o.OBJ { ../src/c_regex_traits.cpp.CPP } }
{ gcc%gcc.compile.c++-cpp_regex_traits.o.OBJ {
../src/cpp_regex_traits.cpp.CPP } } { gcc%gcc.compile.c++-cregex.o.OBJ {
../src/cregex.cpp.CPP } } { gcc%gcc.compile.c++-fileiter.o.OBJ {
../src/fileiter.cpp.CPP } } { gcc%gcc.compile.c++-icu.o.OBJ {
../src/icu.cpp.CPP } } { gcc%gcc.compile.c++-instances.o.OBJ {
../src/instances.cpp.CPP } } { gcc%gcc.compile.c++-posix_api.o.OBJ {
../src/posix_api.cpp.CPP } } { gcc%gcc.compile.c++-regex.o.OBJ {
../src/regex.cpp.CPP } } { gcc%gcc.compile.c++-regex_debug.o.OBJ {
../src/regex_debug.cpp.CPP } } { gcc%gcc.compile.c++-regex_raw_buffer.o.OBJ
{ ../src/regex_raw_buffer.cpp.CPP } } {
gcc%gcc.compile.c++-regex_traits_defaults.o.OBJ {
../src/regex_traits_defaults.cpp.CPP } } {
gcc%gcc.compile.c++-static_mutex.o.OBJ { ../src/static_mutex.cpp.CPP } } {
gcc%gcc.compile.c++-w32_regex_traits.o.OBJ {
../src/w32_regex_traits.cpp.CPP } } {
gcc%gcc.compile.c++-wc_regex_traits.o.OBJ {
../src/wc_regex_traits.cpp.CPP } } {
gcc%gcc.compile.c++-wide_posix_api.o.OBJ { ../src/wide_posix_api.cpp.CPP } }
{ gcc%gcc.compile.c++-winstances.o.OBJ { ../src/winstances.cpp.CPP } } {
gcc%gcc.compile.c++-usinstances.o.OBJ { ../src/usinstances.cpp.CPP } } } }
error: created from ./stage-proper
error: added properties: <debug-symbols>off <define>NDEBUG <inlining>full
<optimization>speed <runtime-debugging>off <variant>release
error: removed properties: <debug-symbols>on <inlining>off <optimization>off
<runtime-debugging>on <variant>debug
/home/john/boost/trunk/tools/build/v2/build/virtual-target.jam:480: in
actualize-no-scanner from module object(file-target)@1216
/home/john/boost/trunk/tools/build/v2/build/virtual-target.jam:130: in
object(file-target)@1216.actualize from module object(file-target)@1216
/home/john/boost/trunk/tools/build/v2/build-system.jam:713: in load from
module build-system
/home/john/boost/trunk/tools/build/v2/kernel/modules.jam:283: in import from
module modules
/home/john/boost/trunk/tools/build/v2/kernel/bootstrap.jam:142: in
boost-build from module
/home/john/boost/trunk/boost-build.jam:17: in module scope from module

Am I doing something wrong here? Is this due to the lib names not being
mangled anymore? If so can we please have a better error message :-)

And when I set ICU_PATH I see a different error:

john_at_john-laptop:~/boost/trunk$ bjam
stage --with-regex -sICU_PATH=../../download/open/icu-4.2
/home/john/boost/trunk/tools/build/v2/build/property.jam:455: in
property.translate-paths
*** argument error
* rule path.root ( path root )
* called with: ( libs/regex/build )
* missing argument root
/home/john/boost/trunk/tools/build/v2/util/path.jam:201:see definition of
rule 'root' being called
/home/john/boost/trunk/tools/build/v2/build/property-set.jam:386: in
property-set.create-from-user-input
/home/john/boost/trunk/tools/build/v2/build/property-set.jam:448: in
property-set.refine-from-user-input
/home/john/boost/trunk/tools/build/v2/build/targets.jam:1505: in
targets.main-target-requirements
/home/john/boost/trunk/tools/build/v2/tools/builtin.jam:602: in lib
libs/regex/build/Jamfile.v2:222: in modules.load
/home/john/boost/trunk/tools/build/v2/build/project.jam:313: in load-jamfile
/home/john/boost/trunk/tools/build/v2/build/project.jam:62: in project.load
/home/john/boost/trunk/tools/build/v2/build/project.jam:754: in project.use
/home/john/boost/trunk/tools/build/v2/build/project.jam:89: in
load-used-projects
/home/john/boost/trunk/tools/build/v2/build/project.jam:73: in load
/home/john/boost/trunk/tools/build/v2/build/project.jam:168: in project.find
/home/john/boost/trunk/tools/build/v2/build-system.jam:553: in load
/home/john/boost/trunk/tools/build/v2/kernel/modules.jam:283: in import
/home/john/boost/trunk/tools/build/v2/kernel/bootstrap.jam:142: in
boost-build
/home/john/boost/trunk/boost-build.jam:17: in module scope

Note that my Boost tree is actually located on a windows NTFS drive with
\r\n line endings, could/should this effect things?

Thanks, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk