<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>22713</bug_id>
          
          <creation_ts>2008-12-06 10:51:53 -0800</creation_ts>
          <short_desc>Confusing/repetitive onboard unicode sources</short_desc>
          <delta_ts>2008-12-15 14:19:00 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Daniel Macks">dmacks</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101665</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Macks">dmacks</who>
    <bug_when>2008-12-06 10:51:53 -0800</bug_when>
    <thetext>Building r39007 on OS X 10.4 with fink installed for gtk dependencies, I noticed during autogen:

checking the Unicode backend to use... icu

and then during compiling, flags for internal icu sources are passed (-I./JavaScriptCore/icu -I./WebCore/icu). Now wait, I have libicu headers and a &quot;libicu-config&quot; available on my system, why is webkit using what sounds like *its own* icu lib? Looking at configure.ac, I see why, at line 237:

&gt;if test &quot;$os_darwin&quot; = &quot;yes&quot;; then
&gt;	UNICODE_CFLAGS=&quot;-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu&quot;
&gt;	UNICODE_LIBS=&quot;-licucore&quot;
[...]
&gt;else
&gt;	AC_PATH_PROG(icu_config, icu-config, no)
[...]
&gt;	UNICODE_CFLAGS=`$icu_config --cppflags`
&gt;	UNICODE_LIBS=`$icu_config --ldflags`
&gt;fi

It hardcodes to use the internal one on darwin even if there is an actual (&quot;normal for unixish platforms&quot;:) libicu available. Seems like the primary test should be for availablity of icu-config, and then only fall back on platform-dependent guessing if it&apos;s not found.

Secondarily, while looking at the included libicu, I see three different sets of libicu headers in the webkit sources: JavaScriptCore/icu, JavaScriptGlue/icu, and WebCore/icu, all annotated that they are for OS X 10.4. So first, that&apos;s hella-redundant:) Can&apos;t all the components share *one* libicu? But also, it&apos;s not consistent with configure.ac, which appears to trigger their use on *all* OS X versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101668</commentid>
    <comment_count>1</comment_count>
      <attachid>25817</attachid>
    <who name="Daniel Macks">dmacks</who>
    <bug_when>2008-12-06 12:51:47 -0800</bug_when>
    <thetext>Created attachment 25817
Always check for icu-config first</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101672</commentid>
    <comment_count>2</comment_count>
      <attachid>25819</attachid>
    <who name="Daniel Macks">dmacks</who>
    <bug_when>2008-12-06 13:18:13 -0800</bug_when>
    <thetext>Created attachment 25819
Always check for icu-config first

Fix ChangeLog</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101687</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-12-06 14:56:38 -0800</bug_when>
    <thetext>Mac OS X ships with ICU, but doesn&apos;t ship with headers.  The WebKit tree includes copies of the headers so that the system version of the library can be used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101713</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Macks">dmacks</who>
    <bug_when>2008-12-06 23:10:44 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Mac OS X ships with ICU, but doesn&apos;t ship with headers.  The WebKit tree
&gt; includes copies of the headers so that the system version of the library can be
&gt; used.

I&apos;m aware that OS X ships ICU libs but not headers, so it&apos;s great that WebKit itself has a copy of those missing files. But why does it need three copies of those files?

Also, given that ICU is a generally useful thing, users may have ICU from some other vendor, installed in a more complete fashion (i.e., with headers).Given that it&apos;s an external lib (from perspective of WebKit), why not use it externally? Worse, if user does have a different ICU version installed, you&apos;re forcing use of headers (via local -I) that may not match the globally available lib (found via -l, there is no local -L for the lib). Even assuming a vanilla OS X system, 10.5 and 10.4 have different versions of ICU so half the time (as of public supported OS X releases:) you&apos;re *forcing* use of mismatched headers. Fink among other vendors can install global headers &quot;that match OS X headerless lib&quot;, so I can be sure I get a matched set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101718</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-12-07 01:24:02 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; Mac OS X ships with ICU, but doesn&apos;t ship with headers.  The WebKit tree
&gt; &gt; includes copies of the headers so that the system version of the library can be
&gt; &gt; used.
&gt; 
&gt; I&apos;m aware that OS X ships ICU libs but not headers, so it&apos;s great that WebKit
&gt; itself has a copy of those missing files. But why does it need three copies of
&gt; those files?

Each WebKit project needs to be able to build independently of the others.

&gt; 
&gt; Also, given that ICU is a generally useful thing, users may have ICU from some
&gt; other vendor, installed in a more complete fashion (i.e., with headers).Given
&gt; that it&apos;s an external lib (from perspective of WebKit), why not use it
&gt; externally? Worse, if user does have a different ICU version installed, you&apos;re
&gt; forcing use of headers (via local -I) that may not match the globally available
&gt; lib (found via -l, there is no local -L for the lib). Even assuming a vanilla
&gt; OS X system, 10.5 and 10.4 have different versions of ICU so half the time (as
&gt; of public supported OS X releases:) you&apos;re *forcing* use of mismatched headers.
&gt; Fink among other vendors can install global headers &quot;that match OS X headerless
&gt; lib&quot;, so I can be sure I get a matched set.

I made no statements about what behaviour the GTK port should take when building on Darwin, I simply pointed out why the headers are in the WebKit tree.  Note that there is no problem in building against the 10.4 ICU headers but using the 10.5 ICU library.  If there were problems with that it would indicate that ICU did not maintain source- and binary-level compatibility between releases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101752</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Macks">dmacks</who>
    <bug_when>2008-12-07 09:56:13 -0800</bug_when>
    <thetext>Right, I agree that &quot;it works on plain 10.4 and 10.5 systems&quot;. My point (with which I thought you were disagreeing) is only that it&apos;s fragile because it makes assumptions that the system *only* (or at least &quot;first in -L paths&quot;) has the plain/expected libicu. My patch only changes behavior on machines that aren&apos;t vanilla...taking advantage of user-installed external ICU if it&apos;s present (otherwise falling back to the existing onboard headers and lib flags).

&gt;Each WebKit project needs to be able to build independently of the others.

Ah, didn&apos;t realize the project was modularized like that. Makes sense.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102157</commentid>
    <comment_count>7</comment_count>
      <attachid>25819</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-12-10 14:48:16 -0800</bug_when>
    <thetext>Comment on attachment 25819
Always check for icu-config first

&gt; +	Default to use external libicu-config if avail on all platforms.
&gt; +
&gt; +	https://bugs.webkit.org/show_bug.cgi?id=22713

Tabs in ChangeLog. Please don&apos;t use tabs in patches you submit to WebKit.

Change seems fine. r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102603</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-12-15 14:19:00 -0800</bug_when>
    <thetext>Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	ChangeLog
	M	configure.ac
Committed r39313
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>25817</attachid>
            <date>2008-12-06 12:51:47 -0800</date>
            <delta_ts>2008-12-06 13:18:13 -0800</delta_ts>
            <desc>Always check for icu-config first</desc>
            <filename>prep.patch</filename>
            <type>text/plain</type>
            <size>1636</size>
            <attacher name="Daniel Macks">dmacks</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDM5MDY5
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTEgQEAKKzIwMDgtMTIt
MDYgIERhbmllbCBNYWNrcyAgPHNldCBFTUFJTF9BRERSRVNTIGVudmlyb25tZW50IHZhcmlhYmxl
PgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisJRGVmYXVsdCB0byB1
c2UgZXh0ZXJuYWwgbGliaWN1LWNvbmZpZyBpZiBhdmFpbCBvbiBhbGwgcGxhdGZvcm1zLgorCisg
ICAgICAgICogY29uZmlndXJlLmFjOgorCiAyMDA4LTEyLTAzICBTaW1vbiBIYXVzbWFubiAgPGhh
dXNtYW5uQHdlYmtpdC5vcmc+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgVG9yIEFybmUgVmVzdGLD
uC4KSW5kZXg6IGNvbmZpZ3VyZS5hYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBjb25maWd1cmUuYWMJKHJldmlz
aW9uIDM5MDY4KQorKysgY29uZmlndXJlLmFjCSh3b3JraW5nIGNvcHkpCkBAIC0yMzQsMTggKzIz
NCwxOCBAQCBlc2FjCiBBQ19NU0dfUkVTVUxUKFskdW5pY29kZV9iYWNrZW5kXSkKIAogaWYgdGVz
dCAiJHVuaWNvZGVfYmFja2VuZCIgPSAiaWN1IjsgdGhlbgotCWlmIHRlc3QgIiRvc19kYXJ3aW4i
ID0gInllcyI7IHRoZW4KLQkJVU5JQ09ERV9DRkxBR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GVidWdnaW5nIGFuZCBvcHRpbWl6YXRpb24gZmxhZ3MKIAkJ
IyBTZWUgbWFuICgxKSBpY3UtY29uZmlnIGZvciBtb3JlIGluZm8uCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>25819</attachid>
            <date>2008-12-06 13:18:13 -0800</date>
            <delta_ts>2008-12-10 14:48:16 -0800</delta_ts>
            <desc>Always check for icu-config first</desc>
            <filename>unicode.patch</filename>
            <type>text/plain</type>
            <size>1667</size>
            <attacher name="Daniel Macks">dmacks</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDM5MDY5
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDgtMTIt
MDYgIERhbmllbCBNYWNrcyAgPGRtYWNrc0BuZXRzcGFjZS5vcmc+CisKKyAgICAgICAgUmV2aWV3
ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKwlEZWZhdWx0IHRvIHVzZSBleHRlcm5hbCBsaWJpY3Ut
Y29uZmlnIGlmIGF2YWlsIG9uIGFsbCBwbGF0Zm9ybXMuCisKKwlodHRwczovL2J1Z3Mud2Via2l0
Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjI3MTMKKworICAgICAgICAqIGNvbmZpZ3VyZS5hYzoKKwog
MjAwOC0xMi0wMyAgU2ltb24gSGF1c21hbm4gIDxoYXVzbWFubkB3ZWJraXQub3JnPgogCiAgICAg
ICAgIFJldmlld2VkIGJ5IFRvciBBcm5lIFZlc3Riw7guCkluZGV4OiBjb25maWd1cmUuYWMKPT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQotL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0RFX0xJQlM9Ii1saWN1aW4gLWxpY3V1YyIKKwkJZWxzZQogCQkJQUNfTVNHX0VSUk9SKFtDYW5u
b3QgZmluZCBpY3UtY29uZmlnLiBUaGUgSUNVIGxpYnJhcnkgaXMgbmVlZGVkLl0pCiAJCWZpCi0K
KwllbHNlCiAJCSMgV2UgZG9uJ3QgdXNlIC0tY2ZsYWdzIGFzIHRoaXMgZ2l2ZXMgdXMgYSBsb3Qg
b2YgdGhpbmdzIHRoYXQgd2UgZG9uJ3QKIAkJIyBuZWNlc3NhcmlseSB3YW50LCBsaWtlIGRlYnVn
Z2luZyBhbmQgb3B0aW1pemF0aW9uIGZsYWdzCiAJCSMgU2VlIG1hbiAoMSkgaWN1LWNvbmZpZyBm
b3IgbW9yZSBpbmZvLgo=
</data>
<flag name="review"
          id="12101"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>