Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to build JS 1.8.0 using MSVC 6.0 (win32)

36 views
Skip to first unread message

Rajesh N

unread,
Nov 18, 2009, 9:59:16 AM11/18/09
to dev-tech-...@lists.mozilla.org
Hi,

How can we build Spidermonkey JS 1.8.0 in Windows (32-bit) using Microsoft
Visual C++ 6.0 compiler (even using the command line build methods)?

I tried to follow the same approach as that for JS 1.5, but came across
multiple issues:

Issue1: js.mak not available.

I tried to use the js.mak provided at http://blog.endflow.net/?p=55
<http://blog.endflow.net/?p=55&lang=en> &lang=en

Issue2: jsparse.c compilation issues related to static asserts:

jsparse.c(93) : error C2057 : expected constant expression

jsparse.c(93) : error C2466 : cannot allocate an array of constant size 0

Issue3: jsscan.c compilation issues related to jsautokw.h

jsscan.c(112) : fatal error C1083 : Cannot open include file 'jsautokw.h':
No such file or directory

Can someone suggest the correct way of building JS 1.8 on Win32 MSVC 6.0 ?

Thanks

Rajesh

Wes Garland

unread,
Nov 18, 2009, 12:34:08 PM11/18/09
to Rajesh N, dev-tech-...@lists.mozilla.org
Rajesh;

I think you want to google up "mozilla build". IIUC, the old js.mak stuff
hasn't been supported since js1.7 (although should be relatively easy to
make work).

Off the top of my head, from your errors, you want to include your obj dir
in your include path, and you need to look at and examine the reason for
your that assert in jsparse.c on line 93.

You might also want to google up "mozilla build" on the moz developer wiki.

Wes

> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>

--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Puneet Sharma

unread,
Nov 18, 2009, 3:13:36 PM11/18/09
to Wes Garland, Rajesh N, dev-tech-...@lists.mozilla.org
Hi,

Thanks for response.
Pls find inline comments.

Regards
Puneet

On Nov 18, 10:34 pm, Wes Garland <w...@page.ca> wrote:
> Rajesh;
>
> I think you want to google up "mozilla build". IIUC, the old js.mak stuff
> hasn't been supported since js1.7 (although should be relatively easy to
> make work).
>
> Off the top of my head, from your errors, you want to include your obj dir
> in your include path, and you need to look at and examine the reason for
> your that assert in jsparse.c on line 93.

We have corrected our build. Now Issue 2 and Issue 3 are resolved.
jsparse.c assert is gone once we ported to VC2005, probably it is problem in VC6.
Mozilla build document was useful in this case.

But, we were facing some linking issue related to _js_FreeStack and lot of linking errors, we have included jsinvoke.c in our build but now we are getting another linking error,
jsiter.obj : error : LNK2019: unresolved external symbol _js_Interpret in referenced in function _SendToGenerator
jsinterp.obj : error : LNK2001: unresolved external symbol _js_Interpret

Defination of js_Interpret is present in jsinterp.c with condition js_invoke__c not defined. But, when we exclude jsinvoke.c which defines js_invoke__c we get other linking errors related to _js_FreeStack(as below).

jsapi.obj : error LNK2019: unresolved external symbol _js_FreeStack reference in function _Js_PushArgumentsVA
jsarray.obj : error: LNK2001 : unresolved external symbol _js_FreeStack
jsfun.obj : error: LNK2001 : unresolved external symbol _js_FreeStack
jsstr.obj : error: LNK2001 : unresolved external symbol _js_FreeStack
jsapi.obj : error: LNK2001 : unresolved external symbol _js_AllocStack
...
...


>
> You might also want to google up "mozilla build" on the moz developer wiki.
>
> Wes
>
>
>
> On Wed, Nov 18, 2009 at 9:59 AM, Rajesh N <raje...@huawei.com> wrote:
> > Hi,
>
> > How can we build Spidermonkey JS 1.8.0 in Windows (32-bit) using Microsoft
> > Visual C++ 6.0 compiler (even using the command line build methods)?
>
> > I tried to follow the same approach as that for JS 1.5, but came across
> > multiple issues:
>
> > Issue1: js.mak not available.
>
> > I tried to use the js.mak provided athttp://blog.endflow.net/?p=55

> > <http://blog.endflow.net/?p=55〈=en> &lang=en


>
> > Issue2: jsparse.c compilation issues related to static asserts:
>
> > jsparse.c(93) : error C2057 : expected constant expression
>
> > jsparse.c(93) : error C2466 : cannot allocate an array of constant size 0
>
> > Issue3: jsscan.c compilation issues related to jsautokw.h
>
> > jsscan.c(112) : fatal error C1083 : Cannot open include file 'jsautokw.h':
> > No such file or directory
>
> > Can someone suggest the correct way of building JS 1.8 on Win32 MSVC 6.0 ?
>
> > Thanks
>
> > Rajesh
>
> > _______________________________________________
> > dev-tech-js-engine mailing list

> > dev-tech-js-eng...@lists.mozilla.org

Colin Fraser

unread,
Nov 20, 2009, 10:00:26 AM11/20/09
to
Hi Puneet,

"Puneet Sharma" <pune...@huawei.com> wrote in message
news:mailman.1415.1258575222...@lists.mozilla.org...


> We have corrected our build. Now Issue 2 and Issue 3 are resolved.
> jsparse.c assert is gone once we ported to VC2005, probably it is problem
> in VC6.
> Mozilla build document was useful in this case.

This blog has links to a VS 2005 solution file that I have successfully used
to build spider monkey 1.8.1:

http://bindzus.wordpress.com/2008/02/08/spidermonkey-solution-file-for-microsoft-visual-studio-2005/

I'm sure I read somewhere on one of the Mozilla wiki pages that VS6 was no
longer supported as a build platform so I gave up and moved to VS 2005 which
seems to work fine.

Colin


0 new messages