Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-07-2005, 10:04 PM   #1
griffman
MVP
 
Join Date: Dec 2001
Location: Portland, OR
Posts: 1,472
Compiling Safari...

In case anyone missed it, Apple open-sourced WebKit today, complete with a CVS repository and buildable source -- http://webkit.opendarwin.org ...

So I went to the Building WebKit page, and followed the directions:

Code:
$ cvs -d :pserver:anonymous@anoncvs.opensource.apple.com:/cvs/root login
$ cvs -d :pserver:anonymous@anoncvs.opensource.apple.com:/cvs/root co -P WebKitTools
$ WebKitTools/checkout
These first steps seem to complete just fine, and I put everything in a new builds folder in my Home directory (so the full path is /Users/robg/builds). The next step is to run the build script:

$ WebKitTools/Scripts/update-webkit

When I do that, though, I get a bunch of errors:

Code:
/Users/robg/build_stuff/libWebKitSystemInterface.a
2005-06-07 19:56:43.473 xcodebuild[5091] WARNING: The Xcode plugin at path /Library/Application Support/Apple/Developer Tools/Plug-ins/J2EEAssistant.pbplugin is missing the XCPluginHasUI Info.plist key, it is assumed to have UI and will not be loaded by xcodebuild.
=== BUILDING NATIVE TARGET dftables  USING BUILD STYLE Deployment ===

CompileC /Users/robg/build_stuff/JavaScriptCore.build/dftables.build/Objects-normal/ppc/dftables.o pcre/dftables.c normal ppc c com.apple.compilers.gcc.4_0
    setenv MACOSX_DEPLOYMENT_TARGET 10.3
    cd /Users/robg/builds/JavaScriptCore
    /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -Os -fmessage-length=0 -mtune=G4 -fvisibility=hidden -I/Users/robg/build_stuff/JavaScriptCore.build/dftables.build/dftables.hmap -mdynamic-no-pic -F/Users/robg/build_stuff -I/Users/robg/build_stuff/include -I/Users/robg/build_stuff/JavaScriptCore.build/dftables.build/DerivedSources -c /Users/robg/builds/JavaScriptCore/pcre/dftables.c -o /Users/robg/build_stuff/JavaScriptCore.build/dftables.build/Objects-normal/ppc/dftables.o
/Users/robg/builds/JavaScriptCore/pcre/dftables.c:45:19: error: ctype.h: No such file or directory
/Users/robg/builds/JavaScriptCore/pcre/dftables.c:46:19: error: stdio.h: No such file or directory
/Users/robg/builds/JavaScriptCore/pcre/dftables.c:47:20: error: string.h: No such file or directory
In file included from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/syslimits.h:7,
                 from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/limits.h:11,
                 from /Users/robg/builds/JavaScriptCore/pcre/internal.h:71,
                 from /Users/robg/builds/JavaScriptCore/pcre/dftables.c:49:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from /Users/robg/builds/JavaScriptCore/pcre/dftables.c:49:
/Users/robg/builds/JavaScriptCore/pcre/internal.h:74:20: error: stdlib.h: No such file or directory
In file included from /Users/robg/builds/JavaScriptCore/pcre/dftables.c:52:
/Users/robg/builds/JavaScriptCore/pcre/maketables.c: In function 'kjs_pcre_maketables':
/Users/robg/builds/JavaScriptCore/pcre/maketables.c:72: warning: incompatible implicit declaration of built-in function 'malloc'
/Users/robg/builds/JavaScriptCore/pcre/maketables.c:117: warning: incompatible implicit declaration of built-in function 'memset'
/Users/robg/builds/JavaScriptCore/pcre/maketables.c:155: warning: incompatible implicit declaration of built-in function 'strchr'
/Users/robg/builds/JavaScriptCore/pcre/dftables.c: In function 'main':
/Users/robg/builds/JavaScriptCore/pcre/dftables.c:60: warning: incompatible implicit declaration of built-in function 'printf'
** BUILD FAILED **
From what I've read, you can have issues if you have a space in your path (I don't), and if you have Bison 2.0 (I have 1.28). I did the XCode setup step, too, so that's not it.

Anyone out there with more expertise than I care to tell me what I'm doing wrong? I even tried WebKitTools/Scripts/update-webkit, just to make sure I had all the components. Still no luck.

Thanks;
-rob.
griffman is offline   Reply With Quote
Old 06-07-2005, 10:20 PM   #2
griffman
MVP
 
Join Date: Dec 2001
Location: Portland, OR
Posts: 1,472
Addendum, should have included: Dual 2.0 G5, 2.5GB RAM, 10.4.1, XCode 2.0 (not 2.1 yet).

-rob.
griffman is offline   Reply With Quote
Old 06-07-2005, 10:38 PM   #3
nkuvu
MVP
 
Join Date: Jun 2002
Location: Tucson, Arizona
Posts: 1,236
Quote:
Originally Posted by griffman
The next step is to run the build script:

$ WebKitTools/Scripts/update-webkit

I'm guessing you mean WebKitTools/Scripts/build-webkit ?

In any case, I checked out the WebKit, and it's currently in the process of building. Running XCode 2.0 on a dual 2.3 G5, 10.4.1. I did install the X11 bits also, but other than that haven't done much in the way of changing things around on my system.

I have bison 1.28 also. In XCode I set the build objects to go into my ~/Projects/build directory -- where did you set yours? My Projects directory is where I checked out the WebKit, and the directory I started calling the build script from.

Interesting to note that your first error message is that it's unable to find ctype.h, which should be in /usr/include. Does this exist on your system?

Ahh... here we go:
Quote:
Touch /Users/nkuvu/Projects/build/WebKit.framework
cd /Users/nkuvu/Projects/WebKit
/usr/bin/touch /Users/nkuvu/Projects/build/WebKit.framework
** BUILD SUCCEEDED **

Seems to be working fine.
nkuvu is offline   Reply With Quote
Old 06-07-2005, 10:44 PM   #4
griffman
MVP
 
Join Date: Dec 2001
Location: Portland, OR
Posts: 1,472
Yea, meant build-webkit, sorry about that.

And strangely, no, there's no ctype.h in /usr/include -- and this system was an Archive & Install, followed by the Dev Tools. I wonder if I left something out when I installed them ... gonna reinstall now and see how it goes.

-rob.
griffman is offline   Reply With Quote
Old 06-07-2005, 10:46 PM   #5
nkuvu
MVP
 
Join Date: Jun 2002
Location: Tucson, Arizona
Posts: 1,236
My own addendum: Of course it's not actually running. *sigh*

Shortly before the end of the build script output there's a message "ld: warning -F: directory name (/Users/nkuvu/Projects/build/WebKit.build/WebKit.build/DerivedSources) does not exist" and when I try to do the run-safari script, I get
Code:
Can't find executable at /Users/nkuvu/Projects/build/Deployment/JavaScriptCore.framework/Versions/A/JavaScriptCore; have you built successfully?
(in code tags because it's a long line)
nkuvu is offline   Reply With Quote
Old 06-07-2005, 10:52 PM   #6
nkuvu
MVP
 
Join Date: Jun 2002
Location: Tucson, Arizona
Posts: 1,236
The run-safari script was looking in the wrong directory, by the way. I changed line 48 to read
Code:
    $productDir = "$productDir";
instead of
Code:
    $productDir = "$productDir/Deployment";
And Safari starts up. The icon in the dock bounces, and it pulls in current preferences. So I may have to play with this to see if I'm running the application in /Applications or the newly built one.

Edit: Correct typo.

Last edited by nkuvu; 06-08-2005 at 12:32 PM.
nkuvu is offline   Reply With Quote
Old 06-07-2005, 10:57 PM   #7
griffman
MVP
 
Join Date: Dec 2001
Location: Portland, OR
Posts: 1,472
My problem was an incomplete Dev Tools install. I went back in and included everything other than the documentation. It's now grinding away at my hard drive, and lots of messages are flying by, so that's a good sign .

My understanding is that you're running the old application, but with the new frameworks. If you run the app from the Finder, you'll get the old frameworks. One way to tell is to visit the Acid Test 2 page...

-rob.
griffman is offline   Reply With Quote
Old 06-07-2005, 11:08 PM   #8
sailgreg
Prospect
 
Join Date: Apr 2004
Posts: 36
This sounds interesting, I will have to try it out.
sailgreg is offline   Reply With Quote
Old 06-07-2005, 11:13 PM   #9
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,294
Quote:
Originally Posted by griffman
And strangely, no, there's no ctype.h in /usr/include -- and this system was an Archive & Install, followed by the Dev Tools. I wonder if I left something out when I installed them ... gonna reinstall now and see how it goes.

I recall some discussion about a month ago on the XCode-users mailing list about a problem that occurred if you installed Tiger and then did an uninstall of the old XCode (version 1.5) using the uninstall script that comes with XCode Tools. It removed some files that don't get replaced by the new XCode installer since some files that used to be part of XCode Tools have moved into the OS with Tiger. (Or something like that)
I think the conclusion was that if you weren't going to do an erase & install (which is what I did) then you should be sure to uninstall the XCode Tools before you install Tiger.

But I note that on my system (10.4.1) with XCode 2.1, the file /usr/include/ctype.h came with the "DevSDK.pkg" package - I see this by looking at the BOM files under /Library/Receipts
hayne is offline   Reply With Quote
Old 06-07-2005, 11:18 PM   #10
nkuvu
MVP
 
Join Date: Jun 2002
Location: Tucson, Arizona
Posts: 1,236
Yep, running the new frameworks. The second acid test works fine. If I click the icon in the dock to start Safari, it fails the second acid test.

Eeeeenteresting.
nkuvu is offline   Reply With Quote
Old 06-07-2005, 11:40 PM   #11
griffman
MVP
 
Join Date: Dec 2001
Location: Portland, OR
Posts: 1,472
Awesome! Thanks for the help, and that fix to the run-safari script is definitely key. Acid Test 2 looks great, and this thing is notably faster.

Hint in progress now ...

-rob.
griffman is offline   Reply With Quote
Old 06-08-2005, 12:19 PM   #12
sailgreg
Prospect
 
Join Date: Apr 2004
Posts: 36
I just compiled it this morning and everything went perfect. The latest code is a LOT faster then what came with 10.4.1, especially scrolling speed. This is on an iBook G3, so a small increase can make a big difference.
sailgreg is offline   Reply With Quote
Old 06-08-2005, 10:55 PM   #13
voldenuit
Hall of Famer
 
Join Date: Sep 2003
Location: Old Europe
Posts: 4,974
Just to complete the story, with 10.4.1 and XCode 2.1, I did not need to modify any scripts.
I think they silently assumed that people checking out the cvs version would also tend to use the most recent version of XCode.

Apple is well inspired to lessen the impact of the khtml-grudge by releasing the code.

It's really awesome to have a browser running that passes the Acid test, a lot more fun than knowing that Dave Hyatt has a version that does .

And holy 5h1t, it is +fast+ !

Last edited by voldenuit; 06-08-2005 at 10:57 PM.
voldenuit is offline   Reply With Quote
Old 06-09-2005, 11:01 AM   #14
Raven
Hall of Famer
 
Join Date: Jul 2003
Location: Montreal
Posts: 4,782
I second Voldenuit... Had no issues with xCode 2.1 installing on my machine... And indeed it is much fatser...
Now a simple question... The Java that come with the download... Does any one know the specific version its running ? Still the 1.4.2 series ? Or does only contain Java script update for Safari itself and no Java update ?
__________________
Waffled foreheads are a symptom of broken keyboards and inexperienced users
Raven is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 01:42 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.