Closed Bug 391145 Opened 17 years ago Closed 17 years ago

failed to build Spidermonkey: inresolved symbol ( prmjtime.c PRMJ_Now _SetCriticalSectionSpinCount _InitializeCriticalSectionAndSpinCount )

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9alpha8

People

(Reporter: soubok, Assigned: robarnold)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Spidermonkey trunk

I failed to build the trunk of SpiderMonkey (2007.08.07). JS_THREADSAFE enabled.

error message:

...
cl -FoWINNT5.1_DBG.OBJ/ -c -MD -Od -Zi -FdWINNT5.1_DBG.OBJ/
prmjtime.pdb -D_X86_=1 -DXP_WIN -DXP_WIN32 -DWIN32 -D_WINDOWS -D_WIN32
-nologo -W3   -DDEBUG -DDEBUG_ -DJS_THREADSAFE -IWINNT5.1_DBG.OBJ -
I../../nspr/include/nspr /D_CRT_SECURE_NO_DEPRECATE=1 /MDd -fp:precise
-DEXPORT_JS_API prmjtime.c
prmjtime.c
prmjtime.c(235) : warning C4013:
'InitializeCriticalSectionAndSpinCount' undefined; assuming extern
returning int
prmjtime.c(388) : warning C4013: 'SetCriticalSectionSpinCount'
undefined; assuming extern returning int
link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib oldnames.lib
winmm.lib -nologo -subsystem:windows -dll -debug -pdb:WINNT5.1_DBG.OBJ/
js32.pdb -machine:I386 -opt:ref -opt:noicf /base:0x61000000 ../../nspr/
lib/libnspr4.lib \
            /out:"WINNT5.1_DBG.OBJ/js32.dll" /pdb:none\
            /implib:"WINNT5.1_DBG.OBJ/js32.lib" WINNT5.1_DBG.OBJ/jsapi.obj
WINNT5.1_DBG.OBJ/jsarena.obj WINNT5.1_DBG.OBJ/jsarray.obj
WINNT5.1_DBG.OBJ/jsatom.obj WINNT5.1_DBG.OBJ/jsbool.obj
WINNT5.1_DBG.OBJ/jscntxt.obj WINNT5.1_DBG.OBJ/jsdate.obj
WINNT5.1_DBG.OBJ/jsdbgapi.obj WINNT5.1_DBG.OBJ/jsdhash.obj
WINNT5.1_DBG.OBJ/jsdtoa.obj WINNT5.1_DBG.OBJ/jsemit.obj
WINNT5.1_DBG.OBJ/jsexn.obj WINNT5.1_DBG.OBJ/jsfun.obj WINNT5.1_DBG.OBJ/
jsgc.obj WINNT5.1_DBG.OBJ/jshash.obj WINNT5.1_DBG.OBJ/jsinterp.obj
WINNT5.1_DBG.OBJ/jsiter.obj WINNT5.1_DBG.OBJ/jslock.obj
WINNT5.1_DBG.OBJ/jslog2.obj WINNT5.1_DBG.OBJ/jslong.obj
WINNT5.1_DBG.OBJ/jsmath.obj WINNT5.1_DBG.OBJ/jsnum.obj
WINNT5.1_DBG.OBJ/jsobj.obj WINNT5.1_DBG.OBJ/jsopcode.obj
WINNT5.1_DBG.OBJ/jsparse.obj WINNT5.1_DBG.OBJ/jsprf.obj
WINNT5.1_DBG.OBJ/jsregexp.obj WINNT5.1_DBG.OBJ/jsscan.obj
WINNT5.1_DBG.OBJ/jsscope.obj WINNT5.1_DBG.OBJ/jsscript.obj
WINNT5.1_DBG.OBJ/jsstr.obj WINNT5.1_DBG.OBJ/jsutil.obj
WINNT5.1_DBG.OBJ/jsxdrapi.obj WINNT5.1_DBG.OBJ/jsxml.obj
WINNT5.1_DBG.OBJ/prmjtime.obj
   Creating library WINNT5.1_DBG.OBJ/js32.lib and object
WINNT5.1_DBG.OBJ/js32.exp
prmjtime.obj : error LNK2019: unresolved external symbol
_SetCriticalSectionSpinCount referenced in function _PRMJ_Now
prmjtime.obj : error LNK2019: unresolved external symbol
_InitializeCriticalSectionAndSpinCount referenced in function _NowInit
WINNT5.1_DBG.OBJ/js32.dll : fatal error LNK1120: 2 unresolved
externals

Environment: Windows XP SP2, Visual Studio Express 2005, Cygwin. 

Reproducible: Always

Steps to Reproduce:
set path=C:\tools\cygwin\bin
call "C:\Program Files\Microsoft Platform SDK\SetEnv.Cmd" /XP32 /DEBUG
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
set XCFLAGS=/D_CRT_SECURE_NO_DEPRECATE=1 /MDd
make -f Makefile.ref clean all JS_THREADSAFE=1 JS_DIST=../../nspr

Actual Results:  
fatal error LNK1120: 2 unresolved externals


Environment: Windows XP SP2, Visual Studio Express 2005, Cygwin. 
JS_THREADSAFE enabled.
NSPR: from nspr-4.6.7.tar.gz
Short answer:
Added the following preprocessor definitions to your build:
WINVER = 0x500
_WIN32_WINNT = 0x500

Long answer:
Windows #ifdefs out some functions based on the minimum version you are targeting when you build. See http://msdn2.microsoft.com/en-us/library/aa383745.aspx

I'll look into changing the makefile to target Windows 2000 as the minimum version.
Assignee: general → robarnold
Status: UNCONFIRMED → NEW
Ever confirmed: true
I noticed that spidermonkey does not build on Vista, so I copied the config file from winnt5.2.
Attachment #275662 - Flags: review?(brendan)
Comment on attachment 275662 [details] [diff] [review]
Fixes build errors, adds config file for vista

rs=me, would like bsmedberg or luser to testify.

/be
Attachment #275662 - Flags: review?(brendan)
Attachment #275662 - Flags: review?(benjamin)
Attachment #275662 - Flags: review+
Comment on attachment 275662 [details] [diff] [review]
Fixes build errors, adds config file for vista

Well, I haven't ever used the Makefile.ref build system, but this doesn't look obviously wrong.
Attachment #275662 - Flags: review?(benjamin) → review+
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: