Bug 17637 - compile error in CarbonWindowAdapter.m, Revision 30701
Summary: compile error in CarbonWindowAdapter.m, Revision 30701
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-02 08:28 PST by Michael Zedler
Modified: 2008-03-02 16:37 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Zedler 2008-03-02 08:28:20 PST
I checked out revision 30701, but using 
  WebKit/WebKitTools/Scripts/build-webkit
I get

    cd /Users/zedler/Documents/CVS/WebKit/WebKit
    /usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -std=gnu99 -Wno-trigraphs -fobjc-exceptions -fpascal-strings -fasm-blocks -O2 -Werror -Wmissing-prototypes -Wnewline-eof -DNDEBUG -DENABLE_WEBKIT_UNSET_DYLD_FRAMEWORK_PATH -DENABLE_CROSS_DOCUMENT_MESSAGING -DENABLE_DATABASE -DENABLE_ICONDATABASE -DENABLE_SVG -DENABLE_SVG_FOREIGN_OBJECT -DENABLE_SVG_FONTS -DENABLE_SVG_AS_IMAGE -DENABLE_SVG_USE -DENABLE_XPATH -DENABLE_XSLT -DENABLE_VIDEO -DFRAMEWORK_NAME=WebKit -fmessage-length=0 -fobjc-direct-dispatch -mmacosx-version-min=10.4 -gdwarf-2 -I/Users/zedler/Documents/CVS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/WebKit.hmap -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wundef -F/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release -F/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -F/System/Library/Frameworks/Carbon.framework/Frameworks -F/System/Library/Frameworks/Quartz.framework/Frameworks -F/System/Library/PrivateFrameworks -I/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/include -Imac/ForwardingHeaders -Imac/icu -I/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/usr/local/include -I/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/DerivedSources/WebKit -I/Users/zedler/Documents/CVS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/DerivedSources -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/WebKitPrefix-fhlkzsamlxwauzfaircbxyhtsgyl/WebKitPrefix.h -c /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Carbon/CarbonWindowAdapter.m -o /Users/zedler/Documents/CVS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/i386/CarbonWindowAdapter.o
In file included from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMObject.h:28,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMNode.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMAttr.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMCore.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOM.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Misc/WebKit.h:29,
                 from /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Carbon/HIViewAdapter.h:29,
                 from /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Carbon/CarbonWindowAdapter.m:64:
/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h:27:35: error: <JavaScriptCore/JSBase.h: No such file or directory
In file included from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMObject.h:28,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMNode.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMAttr.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOMCore.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/DOM.h:27,
                 from /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Misc/WebKit.h:29,
                 from /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Carbon/HIViewAdapter.h:29,
                 from /Users/zedler/Documents/CVS/WebKit/WebKit/mac/Carbon/CarbonWindowAdapter.m:64:
/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h:234: error: parse error before 'JSObjectRef'
/Users/zedler/Documents/CVS/WebKit/WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h:245: fatal error: method definition not in @implementation context
compilation terminated.
{standard input}:30:FATAL:.abort  detected.  Assembly stopping.
** BUILD FAILED **
Comment 1 Mark Rowe (bdash) 2008-03-02 13:19:04 PST
error: <JavaScriptCore/JSBase.h: No such file or directory

There are two surprising aspects to this error:
1) The presence of < in the error message.  I would not expect this to be output in the error message unless the compiler is looking for a filename with a literal < in the name.

2) JSBase.h is copied to JavaScriptCore's headers directory as part of the build process.  If WebKitBuild/Release/JavaScriptCore.framework/Headers/JSBase.h does not exist then the problem is much earlier in the build process.


Which version of Xcode are you using to build?
Comment 2 Michael Zedler 2008-03-02 15:34:16 PST
> Which version of Xcode are you using to build?
 
Xcode 2.4.1, Xcode Core: 762

I did nothing but checkout the current svn version and run 
  WebKit/WebKitTools/Scripts/build-webkit


Comment 3 Mark Rowe (bdash) 2008-03-02 15:37:32 PST
Does WebKitBuild/Release/JavaScriptCore.framework/Headers/JSBase.h exist?
Comment 4 Michael Zedler 2008-03-02 15:50:49 PST
(In reply to comment #3)
> Does WebKitBuild/Release/JavaScriptCore.framework/Headers/JSBase.h exist?

yes

Comment 5 Michael Zedler 2008-03-02 15:55:31 PST
(In reply to comment #4)
> (In reply to comment #3)
> > Does WebKitBuild/Release/JavaScriptCore.framework/Headers/JSBase.h exist?
> 
> yes

and 
  WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h
has in line 27
#import <<JavaScriptCore/JSBase.h>

so there's the spurious "<"
Comment 6 Mark Rowe (bdash) 2008-03-02 16:00:02 PST
Can you please do the following:
1) diff -u ./WebCore/bindings/objc/WebScriptObject.h WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h


2) svn st WebCore/bindings/objc/WebScriptObject.h


Comment 7 Michael Zedler 2008-03-02 16:06:53 PST
(In reply to comment #6)
> Can you please do the following:
> 1) diff -u ./WebCore/bindings/objc/WebScriptObject.h
> WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h

--- ./WebCore/bindings/objc/WebScriptObject.h   2008-03-02 15:02:45.000000000 +0100
+++ WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h      2008-03-03 01:01:35.000000000 +0100
@@ -24,7 +24,7 @@
  */
 
 #import <Foundation/Foundation.h>
-#import <JavaScriptCore/JSBase.h>
+#import <<JavaScriptCore/JSBase.h>
 
 // NSObject (WebScripting) -----------------------------------------------------
 
> 2) svn st WebCore/bindings/objc/WebScriptObject.h

returns nothing.

Just a guess, could this behaviour be caused by the fink sed version I'm running?
If I correct WebKitBuild/Release/WebKit.framework/Headers/WebScriptObject.h manually (remove spurious '<') the build compiles fine.
Comment 8 Mark Rowe (bdash) 2008-03-02 16:09:08 PST
Try removing Fink from your PATH variable and see whether things work correctly.  Mine is simply: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin, which I believe is the default on Leopard.
Comment 9 Michael Zedler 2008-03-02 16:31:00 PST
(In reply to comment #8)
> Try removing Fink from your PATH variable and see whether things work
> correctly.  Mine is simply:
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin, which I believe is
> the default on Leopard.

With Apple's sed the problem is gone, thanks. Last question: Is it possible to use the intel compiler instead of gcc?

Comment 10 Mark Rowe (bdash) 2008-03-02 16:37:54 PST
Using the Intel compiler isn't supported, though it may be possible to get it to work.

Closing bug as WORKSFORME as it was a local configuration problem that caused the build error rather than a problem in WebKit itself.