Closed Bug 691132 Opened 13 years ago Closed 13 years ago

Windows compile error C2766: explicit specialization; 'js::tl::IsPodType<unsigned short>' has already been defined


(Core :: JavaScript Engine, defect)

Other Branch
Windows 7
Not set





(Reporter: InvisibleSmiley, Unassigned)



Trying to compile current SeaMonkey trunk on Windows 7 with MozillaBuild 1.5.1 (building x86 on x64) I get (only since recently):

e:/mozilla-build/python/python2.6.exe -O e:/mozilla-src/comm-central/mozilla/js/src/build/ cl -Fojsalloc.obj -c   -DOSTYPE=\"WINNT6.1\" -DOSARCH=WINNT -DEXPORT_JS_API -DIMPL_MFBT -DJS_HAS_CTYPES -DDLL_PREFIX=\"\" -DDLL_SUFFIX=\".dll\"
-Ictypes/libffi/include -I.  -I/e/mozilla-src/comm-central/mozilla/js/src -I. -I./../../dist/include -I./../../dist/include/nsprpub  -Ie:/mozilla-src/seamonkey-central/mozilla/dist/include/nspr  -I/e/mozilla-src/comm-central/mozilla/js/src
-I/e/mozilla-src/comm-central/mozilla/js/src/assembler -I/e/mozilla-src/comm-central/mozilla/js/src/yarr    -GR- -TP -nologo -wd4345 -D_CRT_SECURE_NO_WARNINGS -W3 -Gy -Fdgenerated.pdb -wd4244 -wd4800 -we4553  -DNDEBUG -DTRIMMED -Zi -Zi -UDEBUG -DNDEBUG -O2 -GAFT -GS- -Gs -Zc:wchar_t- -fp:fast -arch:SSE2 -Oy -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -MD            -FI ./js-confdefs.h -DMOZILLA_CLIENT /e/mozilla-src/comm-central/mozilla/js/src/jsalloc.cpp
e:\mozilla-src\comm-central\mozilla\js\src\jstl.h(170) : error C2766: explicit specialization; 'js::tl::IsPodType<unsigned short>' has already been defined
        e:\mozilla-src\comm-central\mozilla\js\src\jstl.h(161) : see previous definition of 'IsPodType<unsigned short>'
e:\mozilla-src\comm-central\mozilla\js\src\ds/LifoAlloc.h(68) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
e:\mozilla-src\comm-central\mozilla\js\src\ds/LifoAlloc.h(83) : warning C4355: 'this' : used in base member initializer list
e:\mozilla-src\comm-central\mozilla\js\src\jscntxt.h(688) : warning C4351: new behavior: elements of array 'JSRuntime::GCData::info' will be default initialized
make[5]: *** [jsalloc.obj] Error 2
make[5]: Leaving directory `/e/mozilla-src/seamonkey-central/mozilla/js/src'
make[4]: *** [libs_tier_js] Error 2
make[4]: Leaving directory `/e/mozilla-src/seamonkey-central/mozilla'
make[3]: *** [tier_js] Error 2
make[3]: Leaving directory `/e/mozilla-src/seamonkey-central/mozilla'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/e/mozilla-src/seamonkey-central/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/e/mozilla-src/seamonkey-central'
make: *** [build] Error 2

The same source compiles fine on my Linux VM.

I'm currently building with:

ac_add_options --disable-angle
# cannot use L after -G, see bug 600023
ac_add_options --enable-optimize="-O2 -GAFT -GS- -Gs -Zc:wchar_t- -fp:fast -arch:SSE2"
export LDFLAGS="-ltcg"
mk_add_options LDFLAGS="-ltcg"
export MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
mk_add_options MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
Looks like wchar_t is typedef'd to unsigned short on your system.
Blocks: 684039
Bah, missed this:

Gecko 7.0 note
(Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)

Starting with Gecko 7.0, you should no longer include "-Zc:wchar_t-" in the command line when building on Windows. If you're using Visual Studio, go to Project Properties > C/C++ > Language > Treat wchar_t as Built-in Type and set it to "yes".

I wonder where this was communicated. Surely people are not expected to regularly check these pages, are they?
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.