ICU not found while building Boost

I'm having trouble building Boost 1.87 on Windows using the latest VS2022. I'm starting from the "x64 Native Tools Command Prompt for VS 2022". I've downloaded the latest ICU binaries and updated my PATH, LIB, and INCLUDE environment variables: set PATH=%PATH%;D:\icu\bin64 set LIB=%LIB%;D:\icu\lib64 set INCLUDE=%INCLUDE%;D:\icu\include I go into my boost directory and run bootstrap.bat. It seems to complete, creating b2.exe. I then run "b2 address-model=64" and it's not finding icu: E:\boost_1_87_0>b2 address-model=64 Performing configuration checks - default address-model : 64-bit [1] - default architecture : x86 [1] Building the Boost C++ Libraries. warning: Graph library does not contain MPI-based parallel components. note: to enable them, add "using mpi ;" to your user-config.jam. note: to suppress this message, pass "--without-graph_parallel" to bjam. - icu : no [2] - iconv (libc) : no [2] - iconv (separate) : no [2] - cxx11_auto_declarations : yes [2] - cxx11_decltype : yes [2] I ctrl-c to quit at this point and looked at my config.log and it doesn't seem to find icu when building has_icu_test.obj: compile-c-c++ bin.v2\libs\locale\build\msvc-14.3\debug\x86_64\link-static\threading-multi\has_icu_test.obj has_icu_test.cpp E:\boost_1_87_0\libs\locale\build\has_icu_test.cpp(6): fatal error C1083: Cannot open include file: 'unicode/coll.h': No such file or directory The file D:\icu\include\unicode\coll.h does exist though. Is there some reason my environment variables don't make it to the processes kicked off by b2? Or am I overlooking something obvious? Any help is greatly appreciated. Cory

Cory Riddell wrote on Friday, January 10, 2025 4:09 PM
I then run "b2 address-model=64" and it's not finding icu:
Do you get the same result if you put the include path on the command line, like this? "b2 address-model=64 include=D:\icu\include" ---------------------------------------------------------------------- This message, and any attachment(s), is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/electronic-disclaimer. If you are not the intended recipient, please delete this message. For more information about how Bank of America protects your privacy, including specific rights that may apply, please visit the following pages: https://business.bofa.com/en-us/content/global-privacy-notices.html (which includes global privacy notices) and https://www.bankofamerica.com/security-center/privacy-overview/ (which includes US State specific privacy notices such as the http://www.bankofamerica.com/ccpa-notice).

Do you get the same result if you put the include path on the command line, like this? "b2 address-model=64 include=D:\icu\include"
Thanks Erik. With this information I was able to get closer. My b2 command line now is: b2 address-model=64 include="D:\icu\include" library-path="D:\icu\lib64" -sICU_PATH="D:\icu" cxxstd=20 and the has_icu build is failing because it can't find icuind.lib. I believe that's a debug version of the icuin.lib and it looks like the binary distribution of the ICU library doesn't include any debug builds. If I add the "variant=release" option to my b2 command line, it finds icu: - icu : yes [2] - iconv (libc) : no [2] - iconv (separate) : no [2] So I guess I have to take a step back and build ICU first. I remember that being tricky and was hoping to avoid it. Cory

On Fri, Jan 10, 2025 at 4:12 PM Cory Riddell via Boost-users < boost-users@lists.boost.org> wrote:
I'm having trouble building Boost 1.87 on Windows using the latest VS2022.
I'm starting from the "x64 Native Tools Command Prompt for VS 2022".
I've downloaded the latest ICU binaries and updated my PATH, LIB, and INCLUDE environment variables:
set PATH=%PATH%;D:\icu\bin64
set LIB=%LIB%;D:\icu\lib64
set INCLUDE=%INCLUDE%;D:\icu\include
B2 doesn't generally use those environment variables as they cause problems in multi-configuration building that is designed with. And generally they are problematic for reproducing builds. Instead you need to tell B2 where the ICU library is located. Boost.Locale has instructions on that here < https://www.boost.org/doc/libs/1_87_0/libs/locale/doc/html/building_boost_lo...
.
-- -- René Ferdinand Rivera Morell -- Don't Assume Anything -- No Supongas Nada -- Robot Dreams - http://robot-dreams.net
participants (3)
-
Cory Riddell
-
Nelson, Erik - 2
-
René Ferdinand Rivera Morell