<?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>3331</bug_id>
          
          <creation_ts>2005-06-07 20:43:32 -0700</creation_ts>
          <short_desc>10.3.9 Build Failure: NSString may not respond to `+stringWithCString:encoding:&apos;</short_desc>
          <delta_ts>2005-06-19 03:17:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>312.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.3</op_sys>
          <bug_status>VERIFIED</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>
          
          <blocked>3354</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alan Ruttenberg">alanr-w</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>snu</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10844</commentid>
    <comment_count>0</comment_count>
    <who name="Alan Ruttenberg">alanr-w</who>
    <bug_when>2005-06-07 20:43:32 -0700</bug_when>
    <thetext>WebScriptObject.mm: In function `NSString* -[WebScriptObject stringRepresentation](WebScriptObject*, 
objc_selector*)&apos;:
WebScriptObject.mm:343: warning: `NSString&apos; may not respond to `+stringWithCString:encoding:&apos;
WebScriptObject.mm:343: warning: cannot find method `+stringWithCString:encoding:&apos;; return type 
`id&apos; assumed

Documentation says that +stringWithCString:encoding is 10.4 specific.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10847</commentid>
    <comment_count>1</comment_count>
    <who name="Alan Ruttenberg">alanr-w</who>
    <bug_when>2005-06-07 20:46:30 -0700</bug_when>
    <thetext>Even though these are warnings, the next thing that prints is

** BUILD FAILED **</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10851</commentid>
    <comment_count>2</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-06-07 21:48:45 -0700</bug_when>
    <thetext>There&apos;s probably a CFString function that does the same thing as this method.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10852</commentid>
    <comment_count>3</comment_count>
    <who name="Christopher Schmidt">crschmidt</who>
    <bug_when>2005-06-07 21:56:35 -0700</bug_when>
    <thetext>Webkit is built with -Werror by default: if you manually pull out the -Werror
flag from that build line, you can continue building Webkit -- however, there
will be a crash when you encounter that symbol.

Advice on #webkit indicates that it may be possible to rewrite this method to
use some CFString method instead. I don&apos;t know what this means, just tossing it
in in case it&apos;s helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10853</commentid>
    <comment_count>4</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-06-07 22:07:49 -0700</bug_when>
    <thetext>Review of this patch is in progress.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10854</commentid>
    <comment_count>5</comment_count>
    <who name="Christopher Schmidt">crschmidt</who>
    <bug_when>2005-06-07 22:09:20 -0700</bug_when>
    <thetext>Another build error: in file:
/Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp

/Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp:93: error: `isnan&apos; not
declared
/Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp: In function `int
KJS::intFeature(const QMap&lt;QString, QString&gt;&amp;, const char*, int, int, int)&apos;:
/Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp:557: error: `isnan&apos;
undeclared (first use this function)
/Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp:557: error: (Each
undeclared identifier is reported only once for each function it appears in.)

Interestingly enough, there seems to be some kind of indication in the file of
why this might happen: 

// Must include &lt;cmath&gt; instead of &lt;math.h&gt; because of a bug in the
// gcc 3.3 library version of &lt;math.h&gt; where if you include both
// &lt;cmath&gt; and &lt;math.h&gt; the macros necessary for functions like
// isnan are not defined.

But &lt;cmath&gt; is being included. Not sure why exactly this is/isn&apos;t working, but I
do know that Panther is using gcc-3.3, whereas building on Tiger used gcc-4.0.

This one is an error, rather than a warning, so it can&apos;t be just skipped over.

I was able to continue building by pulling the isnan calls out (as well as the
using std::isnan), although obviously the code in this file will suffer as a
result. (Not sure what the end result of this really is, just trying to get it
to build to find where things which need to change are).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10855</commentid>
    <comment_count>6</comment_count>
    <who name="Christopher Schmidt">crschmidt</who>
    <bug_when>2005-06-07 22:19:07 -0700</bug_when>
    <thetext>10.3.9 does not include libxslt header files: it includes the library
(-rwxr-xr-x  1 root  wheel  202984 12 May 12:13 /usr/lib/libxslt.1.dylib), but
there is no /usr/include/libxslt directory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11069</commentid>
    <comment_count>7</comment_count>
    <who name="Christopher Schmidt">crschmidt</who>
    <bug_when>2005-06-08 04:19:35 -0700</bug_when>
    <thetext>Comment #6 has been opened as Bug 3334.
Comment #5 has been opened as Bug 3344.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11126</commentid>
    <comment_count>8</comment_count>
    <who name="Christopher Schmidt">crschmidt</who>
    <bug_when>2005-06-08 20:58:40 -0700</bug_when>
    <thetext>Changing title: metabug is 3354. This is one specific aspect of said bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11830</commentid>
    <comment_count>9</comment_count>
      <attachid>2307</attachid>
    <who name="Finlay Dobbie">snu</who>
    <bug_when>2005-06-13 18:10:00 -0700</bug_when>
    <thetext>Created attachment 2307
proposed fix

Unless I&apos;m missing something, this fixes JavaScriptCore to build on Panther.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11832</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-06-13 19:01:15 -0700</bug_when>
    <thetext>The patch is OK if the internal compiler error doesn&apos;t start happening again. My guess is that it will, and 
another solution in that case is to use the deprecated +[NSString stringWithCString:].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11833</commentid>
    <comment_count>11</comment_count>
    <who name="Finlay Dobbie">snu</who>
    <bug_when>2005-06-13 19:03:48 -0700</bug_when>
    <thetext>What internal compiler error? I didn&apos;t really grok the comment, not knowing the background ;-)
Or of course the non-deprecated [NSString stringWithUTF8String:] or [NSString stringWithString:], but I 
don&apos;t like randomly copying strings for no good reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11834</commentid>
    <comment_count>12</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-06-13 19:06:01 -0700</bug_when>
    <thetext>I just applied the patch and did not see any internal compile error building with gcc 3.3 on Tiger.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11838</commentid>
    <comment_count>13</comment_count>
    <who name="Finlay Dobbie">snu</who>
    <bug_when>2005-06-13 19:38:49 -0700</bug_when>
    <thetext>I didn&apos;t get any internal compiler error on Panther with gcc 3.3 1671 or on Tiger with gcc 4.0 5026</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11841</commentid>
    <comment_count>14</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-06-13 21:47:06 -0700</bug_when>
    <thetext>r=me
I&apos;m going to assume the internal compiler error is gone and land this, since Finlay and I could not repro 
under a variety of circumstances.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12548</commentid>
    <comment_count>15</comment_count>
      <attachid>2307</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-06-18 16:48:10 -0700</bug_when>
    <thetext>Comment on attachment 2307
proposed fix

OK. If this doesn&apos;t bring back that mysterious internal compiler error, then
it&apos;s fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12584</commentid>
    <comment_count>16</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2005-06-18 23:02:39 -0700</bug_when>
    <thetext>Reporter, please mark this bug as Verified if this issue has been fixed in the latest TOT Webkit.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2307</attachid>
            <date>2005-06-13 18:10:00 -0700</date>
            <delta_ts>2005-06-18 16:48:10 -0700</delta_ts>
            <desc>proposed fix</desc>
            <filename>3331.patch</filename>
            <type>text/plain</type>
            <size>656</size>
            <attacher name="Finlay Dobbie">snu</attacher>
            
              <data encoding="base64">SW5kZXg6IGJpbmRpbmdzL29iamMvV2ViU2NyaXB0T2JqZWN0Lm1tCj09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZp
bGU6IC9jdnMvcm9vdC9KYXZhU2NyaXB0Q29yZS9iaW5kaW5ncy9vYmpjL1dlYlNjcmlwdE9iamVj
dC5tbSx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xOApkaWZmIC11IC1yMS4xOCBXZWJTY3JpcHRP
YmplY3QubW0KLS0tIFdlYlNjcmlwdE9iamVjdC5tbQkyMDA1LzA1LzA5IDE4OjQ2OjQzCTEuMTgK
KysrIFdlYlNjcmlwdE9iamVjdC5tbQkyMDA1LzA2LzE0IDAxOjA5OjQ1CkBAIC0zNDAsNyArMzQw
LDcgQEAKIHsKICAgICBpZiAoIVtzZWxmIF9pc1NhZmVTY3JpcHRdKQogICAgICAgICAvLyBUaGlz
IGlzIGEgd29ya2Fyb3VuZCBmb3IgYSBnY2MgMy4zIGludGVybmFsIGNvbXBpbGVyIGVycm9yLgot
CXJldHVybiBbTlNTdHJpbmcgc3RyaW5nV2l0aENTdHJpbmc6IlVuZGVmaW5lZCIgZW5jb2Rpbmc6
TlNBU0NJSVN0cmluZ0VuY29kaW5nXTsKKwkJcmV0dXJuIEAiVW5kZWZpbmVkIjsKIAogICAgIElu
dGVycHJldGVyOjpsb2NrKCk7CiAgICAgT2JqZWN0IHRoaXNPYmogPSBPYmplY3QoY29uc3RfY2Fz
dDxPYmplY3RJbXAqPihbc2VsZiBfaW1wXSkpOwo=
</data>
<flag name="review"
          id="5"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>