1

I am trying to build and use SpiderMonkey I compiled (for my academic research) with firefox 5 on a windows machine, but when I try to run firefox I get "missing JS_InitCTypesClass function in mozjs.dll" error.

I downloaded SpiderMonkey code and I built it (without any changes) using MozillaBuild. Than I copied to new DLL to the firefox directory (renaming the DLL name to mozjs.dll) and tried to execute firefox. At this point I got the error I wrote.

Also, checking using exported function viewer I noticed that the original mozjs.dll has 777 exported functions, while the one I compiled has only 771 functions, so I guess the function is really missing.

Any ideas how can I build a custom SpiderMonkey and use it with FF5 ?

Thanks a lot for your help!

TCS
  • 5,790
  • 5
  • 54
  • 86

2 Answers2

0

I haven't heard of anyone successfully replacing spidermonkey in a release Firefox build like that; the sure way to get your own version of SpiderMonkey used in Firefox would be to make your own Firefox build.

Anyway, where did you get the Spidermonkey source? You should at least use the one corresponding to the Firefox release you're using, e.g.: http://hg.mozilla.org/releases/mozilla-release/rev/3ded311d93ad

Nickolay
  • 31,095
  • 13
  • 107
  • 185
  • Hmm... maybe you're right, maybe I didn't get the right version (I downloaded it from their Mercurial). I'll recheck it. If it won't work I guess I will rebuild FF... – TCS Jul 17 '11 at 16:12
  • Seems like I got the right SpiderMonkey version. I really don't know why it doesn't work :-\. I don't want to get into building the whole FF, but I guess I won't have any other choice... – TCS Jul 17 '11 at 16:44
0

You probably just want to make sure that the way you configure SpiderMonkey matches what happens at http://hg.mozilla.org/mozilla-central/file/a0372b031aac/configure.in#l9484

Boris Zbarsky
  • 34,758
  • 5
  • 52
  • 55
  • Took me a while. It turned out I was building the nightly version (although I didn't take the code from nightly.mozillla.com but mozilla-central). Anyway, Got the right version, build it like you said (I Also needed to build NSPR) and worked like a charm. Thanks :-). – TCS Jul 22 '11 at 13:10