icu: unknown type locale_t #1459

Closed
opened 6 years ago by stevenschlansker · 9 comments
stevenschlansker commented 6 years ago (Migrated from github.com)

attempting to build Mac 27.6.0,

13:18.51 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:497:8: error: unknown type name 'locale_t'
13:18.52 static locale_t gCLocale = (locale_t)0;
13:18.52        ^
13:18.52 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:497:29: error: use of undeclared identifier 'locale_t'
13:18.52 static locale_t gCLocale = (locale_t)0;
13:18.52                             ^
13:18.53 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:506:22: error: use of undeclared identifier 'locale_t'
13:18.53     if (gCLocale != (locale_t)0) {
13:18.53                      ^
13:18.54 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:519:26: error: use of undeclared identifier 'LC_ALL_MASK'
13:18.55     gCLocale = newlocale(LC_ALL_MASK, "C", (locale_t)0);
13:18.55                          ^
13:18.56 4 errors generated.

13:18.57 *** Failed compilation command follows: ----------------------------------------------------------
13:18.57 /usr/bin/clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -DUCONFIG_NO_IDNA -DU_CHARSET_IS_UTF8 -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/common -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n -Qunused-arguments -DU_HAVE_ATOMIC=0 -DU_HAVE_STRTOD_L=1 -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/common -fPIC -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -frtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -DNO_X11 -pipe -g -UDEBUG -DNDEBUG -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-unused -Wno-unused-parameter -fvisibility=hidden -fno-common -c -dynamic -MMD -MT digitlst.d digitlst.o digitlst.o -o digitlst.o /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp
13:18.57 --- ( rebuild with "/usr/bin/make VERBOSE=1 all" to show all parameters ) --------

Probably a simple missing import; investigating...

attempting to build Mac 27.6.0, ``` 13:18.51 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:497:8: error: unknown type name 'locale_t' 13:18.52 static locale_t gCLocale = (locale_t)0; 13:18.52 ^ 13:18.52 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:497:29: error: use of undeclared identifier 'locale_t' 13:18.52 static locale_t gCLocale = (locale_t)0; 13:18.52 ^ 13:18.53 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:506:22: error: use of undeclared identifier 'locale_t' 13:18.53 if (gCLocale != (locale_t)0) { 13:18.53 ^ 13:18.54 /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp:519:26: error: use of undeclared identifier 'LC_ALL_MASK' 13:18.55 gCLocale = newlocale(LC_ALL_MASK, "C", (locale_t)0); 13:18.55 ^ 13:18.56 4 errors generated. 13:18.57 *** Failed compilation command follows: ---------------------------------------------------------- 13:18.57 /usr/bin/clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -DUCONFIG_NO_IDNA -DU_CHARSET_IS_UTF8 -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/common -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n -Qunused-arguments -DU_HAVE_ATOMIC=0 -DU_HAVE_STRTOD_L=1 -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n -I/Users/pale/jenkins/workspace/tycho/default/intl/icu/source/common -fPIC -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -frtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -DNO_X11 -pipe -g -UDEBUG -DNDEBUG -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-unused -Wno-unused-parameter -fvisibility=hidden -fno-common -c -dynamic -MMD -MT digitlst.d digitlst.o digitlst.o -o digitlst.o /Users/pale/jenkins/workspace/tycho/default/intl/icu/source/i18n/digitlst.cpp 13:18.57 --- ( rebuild with "/usr/bin/make VERBOSE=1 all" to show all parameters ) -------- ``` Probably a simple missing import; investigating...
janekptacijarabaci commented 6 years ago (Migrated from github.com)
AFAIK: Related to https://github.com/MoonchildProductions/Pale-Moon/commit/617d3a3927cdf31c7b6d2ae13dfc6c9929881eef#diff-0fdf04b107072995c3c71a790b0ff533
stevenschlansker commented 6 years ago (Migrated from github.com)

Backing out that commit results in a clean build.
Note that I had to revert 65b4148c3c0ad9c15e794a2966a33dd42e932852 -- I'm not sure why the commit id is not what you linked above...

Backing out that commit results in a clean build. Note that I had to revert `65b4148c3c0ad9c15e794a2966a33dd42e932852` -- I'm not sure why the commit id is not what you linked above...
stevenschlansker commented 6 years ago (Migrated from github.com)

I'm not the most familiar with autoconf scripting, but possible solutions include changing if test "$ac_cv_header_xlocale_h" = yes; then to blacklist Mac, or maybe we can feature test whether xlocale.h provides the locale_t type before preferring it.

I'm not the most familiar with `autoconf` scripting, but possible solutions include changing `if test "$ac_cv_header_xlocale_h" = yes; then` to blacklist Mac, or maybe we can feature test whether `xlocale.h` provides the `locale_t` type before preferring it.
janekptacijarabaci commented 6 years ago (Migrated from github.com)

Note that I had to revert 65b4148c3c0ad9c15e794a2966a33dd42e932852

master: 617d3a3927cdf31c7b6d2ae13dfc6c9929881eef
27.6_RelBranch: 65b4148c3c0ad9c15e794a2966a33dd42e932852

> Note that I had to revert `65b4148c3c0ad9c15e794a2966a33dd42e932852` [master](https://github.com/MoonchildProductions/Pale-Moon/tree/master): [617d3a3927cdf31c7b6d2ae13dfc6c9929881eef](https://github.com/MoonchildProductions/Pale-Moon/commit/617d3a3927cdf31c7b6d2ae13dfc6c9929881eef) [27.6_RelBranch](https://github.com/MoonchildProductions/Pale-Moon/tree/27.6_RelBranch): [65b4148c3c0ad9c15e794a2966a33dd42e932852](https://github.com/MoonchildProductions/Pale-Moon/commit/65b4148c3c0ad9c15e794a2966a33dd42e932852)
wolfbeast commented 6 years ago (Migrated from github.com)

I'm not entirely sure why the test for <xlocale.h> doesn't work in a Mac build environment (you need the header and its available, but the test fails).
Simple solution to use: You can use a preprocessor conditional in digitlst.cpp using a Mac #ifdef to include whatever headers Mac works with.

I'm not entirely sure why the test for `<xlocale.h>` doesn't work in a Mac build environment (you need the header and its available, but the test fails). Simple solution to use: You can use a preprocessor conditional in `digitlst.cpp` using a Mac `#ifdef` to include whatever headers Mac works with.
wolfbeast commented 6 years ago (Migrated from github.com)

I'm guessing the following would work:

#if U_USE_STRTOD_L
# if U_HAVE_XLOCALE_H || U_PLATFORM_IS_DARWIN_BASED
#   include <xlocale.h>
# else
#   include <locale.h>
# endif
#endif

Can you let me know if that builds?

I'm guessing the following would work: ``` #if U_USE_STRTOD_L # if U_HAVE_XLOCALE_H || U_PLATFORM_IS_DARWIN_BASED # include <xlocale.h> # else # include <locale.h> # endif #endif ``` Can you let me know if that builds?
wolfbeast commented 6 years ago (Migrated from github.com)

Since there's no feedback and this code is in the way for me working on the tree, I'll put it in a separate branch for testing. I can't verify this because no Mac.

Since there's no feedback and this code is in the way for me working on the tree, I'll put it in a separate branch for testing. I can't verify this because no Mac.
stevenschlansker commented 6 years ago (Migrated from github.com)

Sorry for the delay, been indisposed. Will build now.

Sorry for the delay, been indisposed. Will build now.
wolfbeast commented 6 years ago (Migrated from github.com)

Confirmed fixed with #1473

Confirmed fixed with #1473
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MoonchildProductions/Pale-Moon#1459
Loading…
There is no content yet.