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

building spidermonkey on Win2008/x64

231 views
Skip to first unread message

Steven Erat

unread,
Apr 3, 2013, 1:02:48 PM4/3/13
to
Greetings!

I am new to the mozilla dev forums. This is my first post.

Recently I have successfully built spidermonkey, v8, and JSC on Mac, and v8 on Windows. However, after many tries I have been unable to build spidermonkey on Windows and I'd like to request your assistance please.

Environment:
- Window 2008 R2 x64
- Visual Studio 2012
- Mozilla Build (start-msvc11-x64.bat)

I began with these instructions:
https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Windows_Prerequisites
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Build_Documentation

After cloning mozilla-central, I ran configure as such from the MINGW32 console:

build@MYMACHINE /c/repos/jsengines/mozilla-central/js/src/build-release
$ ../configure --target=x86_64-pc-mingw32

My first attempts at make resulted in "fatal error C1083: Cannot open include file: 'pratom.h'" which I quickly learned is provided by NSPR. A search for NSPR turned up this document: https://developer.mozilla.org/en-US/docs/NSPR_build_instructions
Following the instructions there I was unable to grab source with cvs on the specified host/port, which I found was a previously reported issue, so I added my comments: https://bugzilla.mozilla.org/show_bug.cgi?id=226412

Later I found that nspr is included in mozilla-central, so I did a configure/make/make install there which appears to have completed successfully based in a cursory examination of /usr/local:

build@MYMACHINE /c/repos/jsengines/mozilla-central/nsprpub
$ find /usr/local -name nspr*
/usr/local/bin/nspr-config
/usr/local/include/nspr
/usr/local/include/nspr/nspr.h
/usr/local/lib/pkgconfig/nspr.pc
/usr/local/share/aclocal/nspr.m4

From there I returned to rerun configure from js/src with ../configure --target=x86_64-pc-mingw32, however make then yielded the same result as before for a missing pratom.h. So I am left scratching my head. The details of all this have been captured here: http://pastebin.com/esme1D1g

I've done a good bit of research, including general searches and here on this forum, but have been unable to find clear instructions about the build procedure for this environment. I would be very grateful for your assistance. Note: If recommending such and such flags be passed to configure and/or make, it would be most helpful if you could provide explicit examples since I'm not as skilled as many of you in that aspect.

Thank you,
Steven Erat

Josh Matthews

unread,
Apr 3, 2013, 1:17:08 PM4/3/13
to
You probably want to configure spidermonkey with --enable-system-nspr.

Cheers,
Josh

steve...@gmail.com

unread,
Apr 3, 2013, 1:28:36 PM4/3/13
to
Thanks for the reply. The result is the same: http://pastebin.com/HZSCMD9U

BTW, I found another user report of the same issue of missing pratom.h here: http://pastebin.com/aG7rPhv8

Josh Matthews

unread,
Apr 3, 2013, 3:47:11 PM4/3/13
to
Sorry, it's --with-system-nspr. I always get it wrong.

steve...@gmail.com

unread,
Apr 3, 2013, 4:54:35 PM4/3/13
to
That got a bit further: http://pastebin.com/n0kCtga8

But failed with this (abbreviated):


c:\repos\jsengines\mozilla-central\js\src\assembler\assembler\MacroAssemblerX86.
h(80) : error C2660: 'JSC::X86Assembler::addl_im' : function does not take 2 arg
uments
c:\repos\jsengines\mozilla-central\js\src\assembler\assembler\MacroAssemblerX86.
h(85) : error C2039: 'adcl_im' : is not a member of 'JSC::X86Assembler'
c:\repos\jsengines\mozilla-central\js\src\assembler\assembler\X86Assembl
er.h(140) : see declaration of 'JSC::X86Assembler'
...
...
...
c:\repos\jsengines\mozilla-central\js\src\jscntxt.h(1371) : warning C4267: '=' :
conversion from 'size_t' to 'int32_t', possible loss of data
make[1]: *** [jsalloc.obj] Error 2
make[1]: Leaving directory `/c/repos/jsengines/mozilla-central/js/src/build-rele
ase'
make: *** [default] Error 2

dvander

unread,
Apr 3, 2013, 9:06:30 PM4/3/13
to
Weird. It looks like both WTF_CPU_X86 and WTF_CPU_X86_64 are defined. Is JS_CPU_X64 #defined in objdir\js-confdefs.h?

-David

Steven Erat

unread,
Apr 4, 2013, 11:05:02 AM4/4/13
to
Thank you for taking a look.

I cleaned out everything under build-release and restarted the MINGW32 from start-msvc11-x64.bat. I ran: ../configure --target=x86_64-pc-mingw32 --enable-system-nspr

and I'm back to the build failure on pratom.h:


c:\repos\jsengines\mozilla-central\js\src\jslock.h(13) : fatal error C1083: Cann
ot open include file: 'pratom.h': No such file or directory

Steven Erat

unread,
Apr 4, 2013, 1:16:42 PM4/4/13
to
Issue resolved. For a sanity check I removed and recloned the repo and tried again. This time it built on the first try. Not sure what happened, but all set.


Thank you Josh and dvander for the assistance.
0 new messages