WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
VERIFIED FIXED
3331
10.3.9 Build Failure: NSString may not respond to `+stringWithCString:encoding:'
https://bugs.webkit.org/show_bug.cgi?id=3331
Summary
10.3.9 Build Failure: NSString may not respond to `+stringWithCString:encoding:'
Alan Ruttenberg
Reported
2005-06-07 20:43:32 PDT
WebScriptObject.mm: In function `NSString* -[WebScriptObject stringRepresentation](WebScriptObject*, objc_selector*)': WebScriptObject.mm:343: warning: `NSString' may not respond to `+stringWithCString:encoding:' WebScriptObject.mm:343: warning: cannot find method `+stringWithCString:encoding:'; return type `id' assumed Documentation says that +stringWithCString:encoding is 10.4 specific.
Attachments
proposed fix
(656 bytes, patch)
2005-06-13 18:10 PDT
,
Finlay Dobbie
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alan Ruttenberg
Comment 1
2005-06-07 20:46:30 PDT
Even though these are warnings, the next thing that prints is ** BUILD FAILED **
Maciej Stachowiak
Comment 2
2005-06-07 21:48:45 PDT
There's probably a CFString function that does the same thing as this method.
Christopher Schmidt
Comment 3
2005-06-07 21:56:35 PDT
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't know what this means, just tossing it in in case it's helpful.
Maciej Stachowiak
Comment 4
2005-06-07 22:07:49 PDT
Review of this patch is in progress.
Christopher Schmidt
Comment 5
2005-06-07 22:09:20 PDT
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' not declared /Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp: In function `int KJS::intFeature(const QMap<QString, QString>&, const char*, int, int, int)': /Users/crschmidt/webkit/WebCore/khtml/ecma/kjs_window.cpp:557: error: `isnan' 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 <cmath> instead of <math.h> because of a bug in the // gcc 3.3 library version of <math.h> where if you include both // <cmath> and <math.h> the macros necessary for functions like // isnan are not defined. But <cmath> is being included. Not sure why exactly this is/isn'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'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).
Christopher Schmidt
Comment 6
2005-06-07 22:19:07 PDT
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.
Christopher Schmidt
Comment 7
2005-06-08 04:19:35 PDT
Comment #6
has been opened as
Bug 3334
.
Comment #5
has been opened as
Bug 3344
.
Christopher Schmidt
Comment 8
2005-06-08 20:58:40 PDT
Changing title: metabug is 3354. This is one specific aspect of said bug.
Finlay Dobbie
Comment 9
2005-06-13 18:10:00 PDT
Created
attachment 2307
[details]
proposed fix Unless I'm missing something, this fixes JavaScriptCore to build on Panther.
Darin Adler
Comment 10
2005-06-13 19:01:15 PDT
The patch is OK if the internal compiler error doesn't start happening again. My guess is that it will, and another solution in that case is to use the deprecated +[NSString stringWithCString:].
Finlay Dobbie
Comment 11
2005-06-13 19:03:48 PDT
What internal compiler error? I didn't really grok the comment, not knowing the background ;-) Or of course the non-deprecated [NSString stringWithUTF8String:] or [NSString stringWithString:], but I don't like randomly copying strings for no good reason.
Maciej Stachowiak
Comment 12
2005-06-13 19:06:01 PDT
I just applied the patch and did not see any internal compile error building with gcc 3.3 on Tiger.
Finlay Dobbie
Comment 13
2005-06-13 19:38:49 PDT
I didn't get any internal compiler error on Panther with gcc 3.3 1671 or on Tiger with gcc 4.0 5026
Maciej Stachowiak
Comment 14
2005-06-13 21:47:06 PDT
r=me I'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.
Darin Adler
Comment 15
2005-06-18 16:48:10 PDT
Comment on
attachment 2307
[details]
proposed fix OK. If this doesn't bring back that mysterious internal compiler error, then it's fine.
Chris Petersen
Comment 16
2005-06-18 23:02:39 PDT
Reporter, please mark this bug as Verified if this issue has been fixed in the latest TOT Webkit.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug