Opened 9 years ago
Closed 5 years ago
#8770 closed Bugs (invalid)
has_icu_test depending on DEBUG ICU libraries
Reported by: | Owned by: | Artyom Beilis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | locale |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | ICU | Cc: |
Description
I am pretty sure this has been brought to attention before, as I distinctly remember reading a discussion on the issue, but I couldn't find it in the database.
Platform is Windows XP, MS Visual Studio 8.
Having unpacked the latest ICU release to support MSVC 8 (which is ICU 4.0.1), I am trying to compile Boost 1.54.0 with ICU support enabled.
Using the instructions, I call:
bjam -sICU_PATH=C:\contrib\icu-4.0.1
I get:
...
- has_icu builds : no
In bin.v2\config.log:
msvc.link bin.v2\libs\regex\build\msvc-8.0\debug\has_icu.exe LINK : fatal error LNK1181: cannot open input file 'icuind.lib'
call "C:\Programme\microsoft visual studio 8\vc\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DEBUG /MACHINE:X86 /MANIFEST /subsystem:console
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
...failed msvc.link bin.v2\libs\regex\build\msvc-8.0\debug\has_icu.exe bin.v2\libs\regex\build\msvc-8.0\debug\has_icu.pdb...
In bin.v2\libs\regex\build\msvc-8.0\debug:
"bin.v2\libs\regex\build\msvc-8.0\debug\has_icu_test.obj" "icudt.lib" "icuind.lib" "icuucd.lib"
This happens even if I state variant=release
on the bjam
line. I.e., to determine whether ICU is present for a release build, Boost is looking for debug versions of the ICU libraries. This renders the default instructions of how to build Boost with ICU support non-functional with the default distribution of ICU for Windows, effectively forcing people to manually compile ICU instead of using the ready-made binaries, to satisfy peculiarities of the Boost build system. (Unless there are some command-line switches I am not aware of, which should then be made part of the respective documentation of the build process.)
Thumbs down, that's not the way to go.
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | Building Boost → locale |
---|---|
Owner: | set to |
comment:3 by , 5 years ago
It seems that Boost.Locale is abandoned.
The solution here is to bypass the brain damaged ICU detection by setting ICU_PATH and ICU_LINK in the bjam command line. Note that this affects both Locale and Regex.
comment:4 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: you should never link release with debug versions and other way around since you get incompatible runtime i.e. link with both MSVCRTXXD.DLL and MSVCRTXX.DLL
It is by design.
I just confirmed that a self-compiled version of ICU, including the debug versions of the libraries, indeed makes all the difference:
So,
bjam
should link that test executable against the release version of the ICU libraries, at least when asked to build the release version of Boost only.