Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icu.h missing unistr.h include #7843

Open
thedjnK opened this issue May 18, 2017 · 1 comment
Open

icu.h missing unistr.h include #7843

thedjnK opened this issue May 18, 2017 · 1 comment
Labels

Comments

@thedjnK
Copy link
Contributor

thedjnK commented May 18, 2017

Tried building HHVM and it's encountered an issue when building the icu extension. According to http://icu-project.org/apiref/icu4c/classicu_1_1UnicodeString.html unistr.h must be included to reference icu::UnicodeString but this is missing from icu.h and it fails to build, putting #include <unicode/unistr.h> in icu.h fixes the problem.

HHVM Version

Pulled directly from git (latest)

Standalone code, or other way to reproduce the problem

Build on arch linux with default options

Expected result

Build to be successful

Actual result

In file included from /tmp/hhvm/hphp/runtime/base/zend-collator.h:21:0,
                 from /tmp/hhvm/hphp/runtime/base/zend-collator.cpp:17:
/tmp/hhvm/hphp/runtime/ext/icu/icu.h:84:6: error: 'UnicodeString' in namespace 'icu' does not name a type
 icu::UnicodeString u16(const char* u8, int32_t u8_len, UErrorCode &error,
      ^~~~~~~~~~~~~
/tmp/hhvm/hphp/runtime/ext/icu/icu.h:86:13: error: 'UnicodeString' in namespace 'icu' does not name a type
 inline icu::UnicodeString u16(const String& u8, UErrorCode& error,
             ^~~~~~~~~~~~~
/tmp/hhvm/hphp/runtime/ext/icu/icu.h:91:29: error: 'UnicodeString' in namespace 'icu' does not name a type
 inline String u8(const icu::UnicodeString& u16, UErrorCode& error) {
                             ^~~~~~~~~~~~~
/tmp/hhvm/hphp/runtime/ext/icu/icu.h: In function 'HPHP::String HPHP::Intl::u8(const int&, UErrorCode&)':
/tmp/hhvm/hphp/runtime/ext/icu/icu.h:92:17: error: request for member 'getBuffer' in 'u16', which is of non-class type 'const int'
   return u8(u16.getBuffer(), u16.length(), error);
                 ^~~~~~~~~
/tmp/hhvm/hphp/runtime/ext/icu/icu.h:92:34: error: request for member 'length' in 'u16', which is of non-class type 'const int'
   return u8(u16.getBuffer(), u16.length(), error);
@mofarrell
Copy link
Contributor

It would be great if you could you put up a pull request!

hhvm-bot pushed a commit that referenced this issue May 26, 2017
Summary:
Fix for missing include in icu.h as referenced in #7843
Closes #7856

Reviewed By: mofarrell

Differential Revision: D5131706

Pulled By: Orvid

fbshipit-source-id: 426d253f579cf6ae851a634eb3d312e761a03a85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants