Opened 3 years ago

Last modified 2 years ago

#12011 new Bugs

Boost.Regex always links against dynamic DLLs of ICU with MSVC

Reported by: stathis@… Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

I found out there is no detection code of static ICU in the Regex (and Locale) Jamfiles.

I have blogged about the problem and solution here. To cut a long story short, sicuXX.lib files should be detected when static linking and also if the runtimes are static, instead of <linkflags>, the <archiveflags> feature should be used.

I have written a rough patch for my own use, which does that, but it may not be entirely clean for upstream. It is here though in case you decide to fix it properly.

It would be nice until (and if at all) this is fixed the documentation or at build time this limitation was made clear. Currently the user is left to believe he has a statically linked Boost against ICU.

I will try to improve my patch in the next iteration, but I'm still learning Boost.Build.

thanks.

Change History (1)

comment:1 Changed 2 years ago by John Maddock

I'm struggling to find any information on building ICU static libraries for MSVC (other than your blog). Am I right in thinking that this is not officially supported?

In any case, no Boost changes are required for building the library against static ICU with static Boost.Regex as the process of building the archive doesn't need to reference ICU at all in that case anyway (just find the headers, the binaries aren't required until you link your program).

What is probably needed is an update to the ICU detection code, so that when "<runtime-link>static" is used it looks for static ICU. I believe the patch here: https://github.com/boostorg/regex/commit/acade9f20c9ff439e71b1c919c3c4889bf98aebf should have this working now. Can you please double check for me?

Note: See TracTickets for help on using tickets.