Closed Bug 617903 Opened 15 years ago Closed 15 years ago

nspr build error, vc71, unresolved external symbol __InterlockedIncrement

Categories

(NSPR :: NSPR, defect, P1)

4.8.7
x86
Windows XP
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 594738

People

(Reporter: KaiE, Assigned: wtc)

References

Details

(Keywords: regression)

NSPR 4.8.7 beta 1 fails to build on windows xp using msvc 7.1 Creating library libnspr4.lib and object libnspr4.exp prtpd.obj : error LNK2019: unresolved external symbol __InterlockedIncrement referenced in function _PR_NewThreadPrivateIndex pruthr.obj : error LNK2001: unresolved external symbol __InterlockedIncrement prinit.obj : error LNK2019: unresolved external symbol __InterlockedExchange referenced in function _PR_CallOnce libnspr4.dll : fatal error LNK1120: 2 unresolved externals make[4]: *** [libnspr4.dll] Error 96 make[4]: Leaving directory `/c/moz/nss/tbox/data/winxpt42_trunk_32_DBG/mozilla/nsprpub/WINNT5.1_DBG.OBJ/pr/src' make[3]: *** [export] Error 2 make[3]: Leaving directory `/c/moz/nss/tbox/data/winxpt42_trunk_32_DBG/mozilla/nsprpub/WINNT5.1_DBG.OBJ/pr/src' make[2]: *** [export] Error 2 make[2]: Leaving directory `/c/moz/nss/tbox/data/winxpt42_trunk_32_DBG/mozilla/nsprpub/WINNT5.1_DBG.OBJ/pr' make[1]: *** [export] Error 2 make[1]: Leaving directory `/c/moz/nss/tbox/data/winxpt42_trunk_32_DBG/mozilla/nsprpub/WINNT5.1_DBG.OBJ' make: *** [build_nspr] Error 2 See also http://tinderbox.mozilla.org/showlog.cgi?log=NSS/1291895976.1291896326.20988.gz&fulltext=1
Summary: nspr build error, vc71, → nspr build error, vc71, unresolved external symbol __InterlockedIncrement
Well, maybe this bug can be ignored. I haven't build on windows in a long time, and I was used to using vc71, which was once a recommended version for building any of firefox stable branches and trunk. However, according to https://developer.mozilla.org/en/Windows_Build_Prerequisites this has changed and vc8 is now the oldest support version. I just successfully build nspr using vc8.
This failure is seen on Sun Lab build tinderbox machine goride.
Kai, could you revert mozilla/nsprpub/pr/include/pratom.h to CVS rev. 3.16 and see if that fixes this compilation error? I wonder if this is a regression introduced by the patch in bug 594738? The code in pratom.h intends to support MSVC 7.1: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/pr/include/pratom.h&rev=3.17&mark=113-114#113 So we should try to fix this bug. Can you update pratom.h to the latest revision (3.17) and reverse these two blocks of code? http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/pr/include/pratom.h&rev=3.17&mark=116-121,123-126#113 I suspect that the function declaration must appear before the #pragma intrinsic, as shown in the sample code here: http://msdn.microsoft.com/en-us/library/f24ya7ct(VS.71).aspx Thanks a lot for your help.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → 4.8.7
Using VS2010 I am getting lots of warnings like this while building mozilla-central: nsEditorController.cpp c:\p\mc\ff-dbg\dist\include\pratom.h(117) : warning C4164: '_InterlockedIncrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(118) : warning C4164: '_InterlockedDecrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(119) : warning C4164: '_InterlockedExchange' : intrinsic functi on not declared c:\p\mc\ff-dbg\dist\include\pratom.h(120) : warning C4164: '_InterlockedExchangeAdd' : intrinsic fun ction not declared c:\p\mc\ff-dbg\dist\include\pratom.h(117) : warning C4164: '_InterlockedIncrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(118) : warning C4164: '_InterlockedDecrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(119) : warning C4164: '_InterlockedExchange' : intrinsic functi on not declared c:\p\mc\ff-dbg\dist\include\pratom.h(120) : warning C4164: '_InterlockedExchangeAdd' : intrinsic fun ction not declared c:\p\mc\ff-dbg\dist\include\pratom.h(117) : warning C4164: '_InterlockedIncrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(118) : warning C4164: '_InterlockedDecrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(119) : warning C4164: '_InterlockedExchange' : intrinsic functi on not declared c:\p\mc\ff-dbg\dist\include\pratom.h(120) : warning C4164: '_InterlockedExchangeAdd' : intrinsic fun ction not declared c:\p\mc\ff-dbg\dist\include\pratom.h(117) : warning C4164: '_InterlockedIncrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(118) : warning C4164: '_InterlockedDecrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(119) : warning C4164: '_InterlockedExchange' : intrinsic functi on not declared c:\p\mc\ff-dbg\dist\include\pratom.h(120) : warning C4164: '_InterlockedExchangeAdd' : intrinsic fun ction not declared c:\p\mc\ff-dbg\dist\include\pratom.h(117) : warning C4164: '_InterlockedIncrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(118) : warning C4164: '_InterlockedDecrement' : intrinsic funct ion not declared c:\p\mc\ff-dbg\dist\include\pratom.h(119) : warning C4164: '_InterlockedExchange' : intrinsic functi on not declared c:\p\mc\ff-dbg\dist\include\pratom.h(120) : warning C4164: '_InterlockedExchangeAdd' : intrinsic fun ction not declared
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Blocks: 599324
Keywords: regression
You need to log in before you can comment on or make changes to this bug.