Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7839 closed Bugs (invalid)

Boost.Locale does not build against ICU4C 52.1.1 on Windows Vista

Reported by: Jason Erb <jason.erb@…> Owned by: Artyom Beilis
Milestone: To Be Determined Component: locale
Version: Boost 1.52.0 Severity: Problem
Keywords: locale icu Cc:

Description

The following build error occurs in Boost 1.52.0 when building against ICU4C 50.1.1 on Windows Vista, but does not occur when building against ICU4C 49.1.2 on the same machine:

compile-c-c++ bin.v2\libs\locale\build\msvc-10.0\debug\boost.locale.icu-on\boost.locale.std-off\link-static\threading-multi\icu\formatter.obj
formatter.cpp
include\unicode/decimfmt.h(41) : fatal error C1083: Cannot open include file: 'unicode/enumset.h': No such file or directory

(The file in question exists at "[icu]\source\common\unicode\enumset.h".)

Boost builds correctly against both versions of ICU on the newest OS X version.

Note the forward slash in the path (unicode/decimfmt.h); this should be a backslash on Windows, and might explain why the build proceeds normally on OS X (which uses forward slashes as path delimiters).

Change History (8)

comment:1 by Jason Erb <jason.erb@…>, 10 years ago

My guess is that problem is due to header path changes in ICU 50.1.1.

(To clarify the note above: the forward slash is clearly not a problem in the context given, as decimfmt.h is found; the point of the note is to indicate that the wrong kind of slashes may have a problematic effect elsewhere, such as in header include path configuration.)

comment:2 by viboes, 10 years ago

Component: Building Boostlocale
Owner: set to Artyom Beilis

Moved to Locale component, in case the maintainer could find a solution.

comment:3 by Artyom Beilis, 10 years ago

Resolution: invalid
Status: newclosed

You are not using ICU properly.

Please install it so you get proper layout of headers and libraries in ICU and than build Boost.Locale.

Read this carefully for more details:

http://www.boost.org/doc/libs/1_52_0/libs/locale/doc/html/building_boost_locale.html

comment:4 by Jason Erb <jason.erb@…>, 10 years ago

Resolution: invalid
Status: closedreopened

I have been able to use several previous versions of ICU correctly with boost.locale. It is only the latest verson (50.1.1) that will not build, and only on Windows (it builds fine on Xcode using LLVM). This indicates that my build configuration is correct. I have followed all of the instructions in the link that you provided.

It appears to me that something has changed in ICU that boost.locale is not properly accounting for. Please let me know if you need any assistance reproducing this problem. I can send my build scripts if it would help.

comment:5 by Jason Erb <jason.erb@…>, 10 years ago

The build scripts can be found in the root of https://github.com/sparist/Om :

The full build instructions are given here: http://sparist.github.com/Om/#building

comment:6 by Artyom Beilis, 10 years ago

Resolution: invalid
Status: reopenedclosed

This is clearly problem of your ICU installation:

include\unicode/decimfmt.h(41) : fatal error C1083: Cannot open include file: 'unicode/enumset.h': No such file or directory

Means you had not installed/configured/build properly. The header - decimfmt.h is included correctly but not enumset.h which is part of the include

http://icu-project.org/apiref/icu4c/decimfmt_8h_source.html

Also a part of proper ICU 50.1.1 installation...

(The file in question exists at "[icu]\source\common\unicode\enumset.h".)

Makes me think that you try to point include to original source and not the installed headers.

Bottom line, fix your build scripts, installation or whatever you do incorrectly with ICU and don't reopen this bug.

comment:7 by Jason Erb <jason.erb@…>, 10 years ago

This does not appear to be a naive user error (as you continue to suggest). On Windows, I build boost as follows, where %Icu% is the ICU root directory *and* the directory in which the allinone.sln solution places the build products ("bin/", "include/", etc.):

call .\bootstrap --with-icu="%Icu%"
call .\b2 boost.locale.icu=on boost.locale.std=off -sICU_PATH="%Icu%" --with-chrono --with-locale --with-system --with-thread link=static stage

On further investigation, neither include directory (in 49.1.2 or 50.1.1) contains the file "unicode/enumset.h" on Windows, but only the 50.1.1 include directory on Mac does (the include directory in 49.1.2 on Mac does not). Indeed, the include was added to "unicode/decimfmt.h" in 50.1.1, and it is only included when the macro UCONFIG_NO_FORMATTING is false.

As such, the problem appears to be with the default ICU 50.1.1 windows build via the provided allinone.sln file, rather than with boost.locale, so I will leave this ticket closed.

It is not a priority at present for me to continue investigating why boost.locale's primary dependency is broken. As boost.locale's maintainer, you might consider making it one of yours and filing a bug with ICU as necessary. And you might also consider being less rude to your users.

comment:8 by anonymous, 10 years ago

The bypass from the ICU sourceforge tracking list is:

"Thanks. And this defect is also on the older-versions' distributions. # it seems to be fixed just by copying enumset.h # from src/common/unicode of source-distribution."

Hers is the thread:

I found a difficulty on ICU4C 51.1 VC10-binary. As enumset.h not found at include/unicode, any code that #include <unicode/decimfmt.h> leads error:"enumset.h not found".

# even if the source-distribution is re-built using vc10, # include/unicode/enumset.h NOT appeared.

By the same reason, re-building Xalan-C 1.11 fails.

And the response is:

Thank you,

This is a defect that was just found. I will add it to the known defects

list on the download page. I do not have a patch yet but will be working on it soon. Steven

Note: See TracTickets for help on using tickets.