chuifeng / webkitdriver

Automatically exported from code.google.com/p/webkitdriver
0 stars 0 forks source link

Build fails on TextBreakIteratorICU #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. checkout and build the project as described on wiki page

What version of the product are you using? On what operating system?
Latest, Linux Mint 13 x64

Build output (fragment):

make: Nothing to be done for `all'.
make: Leaving directory 
`/home/artur/projects/work/3rdparty/webkitdriver/hlwk/WebCore/DerivedSources'
[797 / 1589] WebCore/platform/text/TextBreakIteratorICU.cpp
WebCore/platform/text/TextBreakIteratorICU.cpp: In function 
‘WebCore::TextBreakIterator* WebCore::setUpIterator(bool&, 
WebCore::TextBreakIterator*&, UBreakIteratorType, const UChar*, int)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:41:114: error: invalid 
static_cast from type ‘UBreakIterator*’ to type 
‘WebCore::TextBreakIterator*’
WebCore/platform/text/TextBreakIteratorICU.cpp:49:58: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘void ubrk_setText_48(UBreakIterator*, const UChar*, int32_t, 
UErrorCode*)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakFirst(WebCore::TextBreakIterator*)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:90:25: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘int32_t ubrk_first_48(UBreakIterator*)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakLast(WebCore::TextBreakIterator*)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:95:24: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘int32_t ubrk_last_48(UBreakIterator*)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakNext(WebCore::TextBreakIterator*)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:100:24: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘int32_t ubrk_next_48(UBreakIterator*)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakPrevious(WebCore::TextBreakIterator*)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:105:28: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘int32_t ubrk_previous_48(UBreakIterator*)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakPreceding(WebCore::TextBreakIterator*, int)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:110:34: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘int32_t ubrk_preceding_48(UBreakIterator*, int32_t)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakFollowing(WebCore::TextBreakIterator*, int)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:115:34: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘int32_t ubrk_following_48(UBreakIterator*, int32_t)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘int 
WebCore::textBreakCurrent(WebCore::TextBreakIterator*)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:120:27: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘const UBreakIterator*’ for argument 
‘1’ to ‘int32_t ubrk_current_48(const UBreakIterator*)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function ‘bool 
WebCore::isTextBreak(WebCore::TextBreakIterator*, int)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:125:35: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘UBool ubrk_isBoundary_48(UBreakIterator*, int32_t)’
WebCore/platform/text/TextBreakIteratorICU.cpp: In function 
‘WebCore::TextBreakIterator* WebCore::setUpIteratorWithRules(bool&, 
WebCore::TextBreakIterator*&, const char*, const UChar*, int)’:
WebCore/platform/text/TextBreakIteratorICU.cpp:139:135: error: invalid 
static_cast from type ‘UBreakIterator*’ to type 
‘WebCore::TextBreakIterator*’
WebCore/platform/text/TextBreakIteratorICU.cpp:147:58: error: cannot convert 
‘WebCore::TextBreakIterator*’ to ‘UBreakIterator*’ for argument ‘1’ 
to ‘void ubrk_setText_48(UBreakIterator*, const UChar*, int32_t, 
UErrorCode*)’
rake aborted!
Command failed with status (1): [g++ -c -o WebKitBuild/Release/TextBreakIte...]

Tasks: TOP => default => libhlwk.so => WebKitBuild/Release/libhlwk.so => 
WebKitBuild/Release/TextBreakIteratorICU.o
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [rake...]

Original issue reported on code.google.com by arturgaj...@gmail.com on 13 Oct 2012 at 11:40

GoogleCodeExporter commented 8 years ago
https://bugs.webkit.org/show_bug.cgi?id=36381

diff --git a/WebCore/platform/text/TextBreakIterator.h 
b/WebCore/platform/text/TextBreakIterator.h
index 17cf5f0..7ead196 100644
--- a/WebCore/platform/text/TextBreakIterator.h
+++ b/WebCore/platform/text/TextBreakIterator.h
@@ -26,7 +26,12 @@

 namespace WebCore {

+#if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM >= 4)
+    typedef struct UBreakIterator TextBreakIterator;
+#else
     class TextBreakIterator;
+#endif
+

     // Note: The returned iterator is good only until you get another iterator.

Original comment by javed...@gmail.com on 10 May 2013 at 11:35