JavaScriptCore Runs on Haiku! (mostly)

Blog post by leavengood on Wed, 2007-09-05 04:27
testkjs working

So after a few frustrating weeks of very little progress on my WebKit port, I have finally gotten JavaScriptCore running on Haiku!

As described in my last blog entry, the main show stopper was getting the ICU library compiled with the Haiku GCC 4.1.2 cross compiler.

After reading some documentation and a lot of trial and error, I finally got Haiku's GCC 4.1.2 to compile code outside of the Haiku build environment. I will document how to do this within the next week, as there are a few gotchas.

Once I had that working I was finally about to successfully run ICU's configure script, and most of the build went fine until the data directory. The data directory uses some code generators to do its work, but the code generators were compiled for Haiku, yet I was running them on Linux. I emailed the ICU mailing list for some help, but alas, received none. It seems I'm doomed to be a pioneer and figure out all my problems alone for this project.

Well it actually was pretty obvious to just build ICU for Linux and then copy over the needed code generators, and this is what I did. After this the build for ICU seemed to go fine.

But when I went to test, there was some odd error about a missing symbol in one of the ICU libraries! Argh! So I decided to take a break and sleep on it, and then today I looked again. It turns out the library from the infamous data directory did not compile right the first time, so I tried it again, and it finally worked!

The end result was I could finally run "testkjs" (the JavaScriptCore test program) on Haiku! Now some of you may have noticed that "(mostly)" on the title of this blog entry. Well since this was the first time running testkjs I got a segment violation related to the garbage collection in JavaScriptCore, so I still have some work to do before JSC is fully usable. But just getting the bugger to run is definitely a good milestone! And I'm only a month behind on my (clearly too ambitious) schedule :)

See the attached screenshot for some exciting textual output.

Here is the crash :-D

AttachmentSize
testkjs_crash.png78.25 KB

Comments

Re: JavaScriptCore Runs on Haiku! (mostly)

Splendid!
Well done, Ryan!

Re: JavaScriptCore Runs on Haiku! (mostly)

Deadline, shmeadline! I'm just glad to see someone doing some major browser work for my favorite OS and getting somewhere with it. :D

Re: JavaScriptCore Runs on Haiku! (mostly)

I've seen a lot of native browser project down here for Haiku. The first i've heard about and see the GUI running at BG013 was Themis. Dead/sleeping project nowdays.
Then they were Net++ (say Net Plus Plus), a project to create a new NetPositive (same GUI) with a new HTML renderer based on Gecko. here again, i never seen more than the mockups i've done for it (for curious -> http://www.beosfrance.com/muckups/Net++/)
And lately, the Nirvana project was opened. The goal was already to use the WebCore, but no work was done ...only talks on Google Groups.

So i must confess, i was a bit septic when i heard about the bounty of this port. I must admit that i was wrong and so glad to be !!!

Awesome job Ryan !!!!!!!! Congratulations and thanks a million !

Re: JavaScriptCore Runs on Haiku! (mostly)

Well done Ryan! I know I've said it a million times already but I am very excited to see this project succeed. A native browser for Haiku will most definitely draw some attention to the project as well as make it more usable.

Hats off to you!

Re: JavaScriptCore Runs on Haiku! (mostly)

Congratulations, Ryan! Now that ongoing Firefox development is looking iffy (many new dependencies and code specializations), webkit and the hope of a native Haiku browser is very important to the OS's success. My heartfelt thanks for everything you're doing!

Re: JavaScriptCore Runs on Haiku! (mostly)

Hello. (That wasn't supposed to be a reply to a reply.)

I'm sorry you didn't get a response on your posting last year. I just checked in very basic support for haiku into the ICU trunk as part of http://bugs.icu-project.org/trac/ticket/6617 - It seems to mostly build on r28521 - gcc2. Still trying to figure out the gcc2/gcc4 situation. Is it probably true that new apps will use ICU with gcc4?