Closed Bug 434532 Opened 16 years ago Closed 16 years ago

Link errors building JS shell on WinXP

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 313059

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #433083 +++

The following was copied from bug 433083 comment 1:

Building JavaScript Shell on WinXP seems to simply not work.  I followed the
directions for using Visual Studio 2003 (that is, I installed Microsoft
Platform SDK for Windows Server 2003 R2, which took hours).  And I got link
errors, starting out like this:
Targeting Windows XP 32 RETAIL


Microsoft (R) Program Maintenance Utility   Version 7.00.8882
Copyright (C) Microsoft Corp 1988-2000. All rights reserved.

        link.exe @C:\DOCUME~1\WARREN~1\LOCALS~1\Temp\nm5.tmp
   Creating library .\Release/js32.lib and object .\Release/js32.exp
jsapi.obj : error LNK2001: unresolved external symbol _js_GeneratorClass
jsapi.obj : error LNK2001: unresolved external symbol _js_IteratorClass
jsapi.obj : error LNK2001: unresolved external symbol _js_StopIterationClass
jsapi.obj : error LNK2001: unresolved external symbol _js_InitIteratorClasses
jsobj.obj : error LNK2001: unresolved external symbol _js_InitIteratorClasses

I've had mercy and not given you all the error messages.  At the very least,
you shouldn't give build instructions that don't work.
Fred, I'm sorry for your frustration here.  I can't tell from your comment, but maybe you're looking at the build instructions in README.html, the ones that say "Use MSGC 4.2 or 5.0." and so on?  If so, those are a little out of date.

Admittedly, continuing to offer those obsolete build instructions is a big, dumb bug.  For the workaround, try this page instead:

http://developer.mozilla.org/en/docs/SpiderMonkey_Build_Documentation

The fact that the Platform SDK takes hours to install, while lamentable, is not something I know how to fix... :-)
Severity: enhancement → normal
Come to look at it, I did use the README.html, as they are the only instrucions to use nmake.  I have cygwin make, but that is for building in the cygwin environment, but that is for the older versions.

I used the command prompt from Visual Studio 2003, as modified by the SDK for windows server 2003, as specified:
---
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)

>type build.cmd
call setenv.cmd /XP32 /RETAIL
nmake -f js.mak CFG="js - Win32 Release"
---
I read page
http://developer.mozilla.org/en/docs/Introduction_to_the_JavaScript_shell

Following directions, I got the source via the wget command on page
http://developer.mozilla.org/en/docs/SpiderMonkey_Build_Documentation

The windows link at the top of the Build_Documentation page says go to:
http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites

This page tells me to download: "Microsoft Windows Server 2003 R2 Platform SDK"

Do I also need to install the Vista SDK?  The page now seems ambiguous to me.  I am running XP, not Vista.  

Do I have to also install the MozillaBuild package?  I'll try it.

The page mentions using the "--disable-vista-sdk-requirements" option.  It doesn't say where to put this.  On the command line?  It doesn't work as an option to nmake.

I used nmake as I wasn't building in a cygwin environment.  The out-of-date instructions suggest this. I didn't realize they were out-of-date, somehow.

Any further comments would be gratefully appreciated.

It was after I installed the 'R2 Platform SDK' that I ran the nmake and got the link errors..
I've downloaded mozilla_build and run start-msvc71.bat, it brought up a MINGW32:~ window that seems to be running bash.  It starts with error messages:

Mozilla build environment: MSVC version 7.1.
bash: ${SSH_ENV}: ambiguous redirect
chmod: cannot access `/c/Documents': No such file or directory
chmod: cannot access `and': No such file or directory
chmod: cannot access `Settings/Fred': No such file or directory
chmod: cannot access `Seltzer/Application': No such file or directory
chmod: cannot access `Data/.ssh/environment': No such file or directory
bash: /c/Documents: No such file or directory
Could not open a connection to your authentication agent.

It's bash:

$ pwd
/c/Documents and Settings/Fred Seltzer/Application Data

Do I need to put the mozilla/js/src tree into Application Data ?

I moved over to where the source was, ran the makefile.ref as instructed, and it has produced a js.exe:

>js.exe
js> 5+5
10

So I guess it works.  And the perfect.js test works.

But there is no directory ../tests, so the test suite cannot run.  I'll poke around for it on the web.

Thank You for your support.

P.S. The font in the bash window is like 6 point.  Teeny Tiny.

Fred
(In reply to comment #4)
> Do I need to put the mozilla/js/src tree into Application Data ?

No.  Bash starts you out in your home directory, that's all.

> But there is no directory ../tests, so the test suite cannot
> run.  I'll poke around for it on the web.

Another bug in our documentation.  Thanks for reporting it.

The tests didn't ship with the SpiderMonkey 1.7 source distribution.  Maybe they should ship with SpiderMonkey 1.8.  I hadn't thought about it.  You can get them from CVS.  I just edited the page to say so:

http://developer.mozilla.org/en/docs/index.php?title=SpiderMonkey_Build_Documentation&diff=71672&oldid=68083

> P.S. The font in the bash window is like 6 point.  Teeny Tiny.

Please search Bugzilla to see if this and the other minor problems you ran across have been reported.  If not, they're minor but worth filing.  (Product: mozilla.org, Component: MozillaBuild.)
Unable to find component MozzilaBuild in the new-bug pages.  I'll look in category SpiderMonkey as that's what the Build Documentation is under:
http://developer.mozilla.org/en/docs/SpiderMonkey_Build_Documentation

I looked in page:
https://bugzilla.mozilla.org/enter_bug.cgi?full=1&format=guided

The patch removes the obsolete build instructions (CodeWarrior, for heaven's sake!) and points readers to the MDC page.

The patch also adds other links to MDC pages and updates the news: links to point to the "new" URLs for those newsgroups.

This patch removes basic code samples that I have copied into:
http://developer.mozilla.org/en/docs/JSAPI_User_Guide
which is the place to start learning about the JSAPI.  The first four sections of that document are as good as I can make them for now.  Much of the rest is left over from an older document.
Assignee: general → jorendorff
Status: NEW → ASSIGNED
Attachment #321783 - Flags: review?(brendan)
Fred, it's under "mozilla.org".
Comment on attachment 321783 [details] [diff] [review]
v1 - partial update of README.html

SpiderMonkey is old -- it goes back to the days of Windows 3.1 and Win95, which meant CodeWarrior for Mac OS 8 and 9!

Thanks for updating this file. Out of sight out of mind is my excuse. I wrote it so long ago that it slipped my mind to update it, after some number of years.

/be
Attachment #321783 - Flags: review?(brendan) → review+
lets dupe this against bug 313059 and I'll deal with it this month.
Pushed changeset a635d0f85cf2 to mozilla-central (the README.html patch).

Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: