Closed Bug 928091 Opened 11 years ago Closed 11 years ago

libopus fails to build using Visual Studio 2013 RTM and 2012

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: emk, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 3 obsolete files)

/nss -MD -FI ../../dist/include/mozilla-config.h -DMOZILLA_CLIE NT -TC -nologo -W3 -Gy -Fdgenerated.pdb -FS -wd4244 -wd4819 -we4553 -DNDEBUG - DTRIMMED -Zi -UDEBUG -DNDEBUG -O1 -Oy h:/m/mozilla-central/media/libopus/silk/f loat/schur_FLP.c' failed, return code 1 21:05.90 sort_FLP.c 21:05.90 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'inline' : マクロが再定義されました。 21:05.91 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(65) : warning C4005: 'inline' : マクロが再定義されました。 21:05.91 コマンド ラインの引数 : 'inline' の前の定義を確認してください 21:05.91 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'restrict' : マクロが再定義されました。 21:05.92 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(69) : warning C4005: 'restrict' : マクロが再定義されました。 21:05.92 コマンド ラインの引数 : 'restrict' の前の定義を確認してください 21:05.92 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(87) : fatal error C1189: #error : The C Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. 21:05.92 2 21:05.93 h:\m\mozilla-central\config\rules.mk:1109:0: command 'h:/m/mozilla-cent ral/obj-i686-pc-mingw32/_virtualenv/Scripts/python.exe -O h:/m/mozilla-central/b uild/cl.py cl -Fosort_FLP.obj -c -DOPUS_BUILD -DOPUS_VERSION='"v1.1-beta-23-gf2 446c2-mozilla"' -DUSE_ALLOCA -Drestrict= -Dinline=__inline -DNO_NSPR_10_SUPPORT -Ih:/m/mozilla-central/media/libopus/include -Ih:/m/mozilla-central/media/libop us/celt -Ih:/m/mozilla-central/media/libopus/silk -Ih:/m/mozilla-central/media/l ibopus/src -Ih:/m/mozilla-central/media/libopus/silk/float -Ih:/m/mozilla-centr al/media/libopus -I. -I../../dist/include -Ih:/m/mozilla-central/obj-i686-pc-mi ngw32/dist/include/nspr -Ih:/m/mozilla-central/obj-i686-pc-mingw32/dist/include/ nss -MD -FI ../../dist/include/mozilla-config.h -DMOZILLA_CLIEN T -TC -nologo -W3 -Gy -Fdgenerated.pdb -FS -wd4244 -wd4819 -we4553 -DNDEBUG -D TRIMMED -Zi -UDEBUG -DNDEBUG -O1 -Oy h:/m/mozilla-central/media/libopus/silk/fl oat/sort_FLP.c' failed, return code 1 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.94 <opus.lib.desc>: Found error 21:05.95 <opus.lib.desc>: Found error 21:05.95 <opus.lib.desc>: Found error 21:05.95 <opus.lib.desc>: Found error 21:05.95 <opus.lib.desc>: Found error 21:05.95 <opus.lib.desc>: Found error 21:05.95 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.96 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.97 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.98 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:05.99 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.00 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.01 <opus.lib.desc>: Found error 21:06.02 <opus.lib.desc>: Found error 21:06.02 <opus.lib.desc>: Found error 21:06.02 <opus.lib.desc>: Found error 21:06.02 <opus.lib.desc>: Found erroranalysis.c 21:06.02 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'inline' : マクロが再定義されました。 21:06.02 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(65) : warning C4005: 'inline' : マクロが再定義されました。 21:06.02 コマンド ラインの引数 : 'inline' の前の定義を確認してください 21:06.03 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'restrict' : マクロが再定義されました。 21:06.03 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(69) : warning C4005: 'restrict' : マクロが再定義されました。 21:06.03 コマンド ラインの引数 : 'restrict' の前の定義を確認してください 21:06.03 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(87) : fatal error C1189: #error : The C Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. 21:06.04 21:06.04 <opus.lib.desc>: Found error 21:06.04 <opus.lib.desc>: Found error 21:06.04 <opus.lib.desc>: Found error 21:06.04 <opus.lib.desc>: Found error 21:06.04 <opus.lib.desc>: Found error 21:06.04 <opus.lib.desc>: Found error 21:06.04 <opus.lib.desc>: Found error 21:06.05 <opus.lib.desc>: Found error 21:06.05 <opus.lib.desc>: Found error 21:06.05 <opus.lib.desc>: Found error 21:06.05 <opus.lib.desc>: Found error 21:06.05 <opus.lib.desc>: Found error 21:06.05 <opus.lib.desc>: Found error 21:06.06 <opus.lib.desc>: Found error 21:06.06 <opus.lib.desc>: Found error 21:06.06 <opus.lib.desc>: Found error 21:06.06 <opus.lib.desc>: Found error 21:06.07 <opus.lib.desc>: Found error 21:06.08 <opus.lib.desc>: Found error2 21:06.09 21:06.10 <opus.lib.desc>: Found error 21:06.10 <opus.lib.desc>: Found error 21:06.10 <opus.lib.desc>: Found error 21:06.10 <opus.lib.desc>: Found error 21:06.10 <opus.lib.desc>: Found error 21:06.10 <opus.lib.desc>: Found error 21:06.11 <opus.lib.desc>: Found error 21:06.11 <opus.lib.desc>: Found error 21:06.11 <opus.lib.desc>: Found error 21:06.11 <opus.lib.desc>: Found error 21:06.11 <opus.lib.desc>: Found error 21:06.12 <opus.lib.desc>: Found error 21:06.13 <opus.lib.desc>: Found error 21:06.13 <opus.lib.desc>: Found error 21:06.15 <opus.lib.desc>: Found error 21:06.15 <opus.lib.desc>: Found error 21:06.15 h:\m\mozilla-central\config\rules.mk:1109:0: command 'h:/m/mozilla-cent ral/obj-i686-pc-mingw32/_virtualenv/Scripts/python.exe -O h:/m/mozilla-central/b uild/cl.py cl -Foanalysis.obj -c -DOPUS_BUILD -DOPUS_VERSION='"v1.1-beta-23-gf2 446c2-mozilla"' -DUSE_ALLOCA -Drestrict= -Dinline=__inline -DNO_NSPR_10_SUPPORT -Ih:/m/mozilla-central/media/libopus/include -Ih:/m/mozilla-central/media/libop us/celt -Ih:/m/mozilla-central/media/libopus/silk -Ih:/m/mozilla-central/media/l ibopus/src -Ih:/m/mozilla-central/media/libopus/silk/float -Ih:/m/mozilla-centr al/media/libopus -I. -I../../dist/include -Ih:/m/mozilla-central/obj-i686-pc-mi ngw32/dist/include/nspr -Ih:/m/mozilla-central/obj-i686-pc-mingw32/dist/include/ nss -MD -FI ../../dist/include/mozilla-config.h -DMOZILLA_CLIEN T -TC -nologo -W3 -Gy -Fdgenerated.pdb -FS -wd4244 -wd4819 -we4553 -DNDEBUG -D TRIMMED -Zi -UDEBUG -DNDEBUG -O1 -Oy h:/m/mozilla-central/media/libopus/src/ana lysis.c' failed, return code 1 21:06.16 <opus.lib.desc>: Found error 21:06.23 mlp.c 21:06.23 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'inline' : マクロが再定義されました。 21:06.23 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(65) : warning C4005: 'inline' : マクロが再定義されました。 21:06.24 コマンド ラインの引数 : 'inline' の前の定義を確認してください 21:06.24 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'restrict' : マクロが再定義されました。 21:06.25 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(69) : warning C4005: 'restrict' : マクロが再定義されました。 21:06.25 コマンド ラインの引数 : 'restrict' の前の定義を確認してください 21:06.25 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(87) : fatal error C1189: #error : The C Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. 21:06.25 2 21:06.25 h:\m\mozilla-central\config\rules.mk:1109:0: command 'h:/m/mozilla-cent ral/obj-i686-pc-mingw32/_virtualenv/Scripts/python.exe -O h:/m/mozilla-central/b uild/cl.py cl -Fomlp.obj -c -DOPUS_BUILD -DOPUS_VERSION='"v1.1-beta-23-gf2446c2 -mozilla"' -DUSE_ALLOCA -Drestrict= -Dinline=__inline -DNO_NSPR_10_SUPPORT -Ih: /m/mozilla-central/media/libopus/include -Ih:/m/mozilla-central/media/libopus/ce lt -Ih:/m/mozilla-central/media/libopus/silk -Ih:/m/mozilla-central/media/libopu s/src -Ih:/m/mozilla-central/media/libopus/silk/float -Ih:/m/mozilla-central/me dia/libopus -I. -I../../dist/include -Ih:/m/mozilla-central/obj-i686-pc-mingw32 /dist/include/nspr -Ih:/m/mozilla-central/obj-i686-pc-mingw32/dist/include/nss -MD -FI ../../dist/include/mozilla-config.h -DMOZILLA_CLIENT -T C -nologo -W3 -Gy -Fdgenerated.pdb -FS -wd4244 -wd4819 -we4553 -DNDEBUG -DTRIMM ED -Zi -UDEBUG -DNDEBUG -O1 -Oy h:/m/mozilla-central/media/libopus/src/mlp.c' f ailed, return code 1 21:06.25 <opus.lib.desc>: Found error 21:06.30 mlp_data.c 21:06.30 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'inline' : マクロが再定義されました。 21:06.30 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(65) : warning C4005: 'inline' : マクロが再定義されました。 21:06.30 コマンド ラインの引数 : 'inline' の前の定義を確認してください 21:06.31 Warning: C4005 in C:\Program Files (x86)\Microsoft Visual Studio 12.0\V C\INCLUDE\xkeycheck.h: 'restrict' : マクロが再定義されました。 21:06.31 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(69) : warning C4005: 'restrict' : マクロが再定義されました。 21:06.31 コマンド ラインの引数 : 'restrict' の前の定義を確認してください 21:06.31 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xkeychec k.h(87) : fatal error C1189: #error : The C Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. 21:06.31 2 21:06.31 h:\m\mozilla-central\config\rules.mk:1109:0: command 'h:/m/mozilla-cent ral/obj-i686-pc-mingw32/_virtualenv/Scripts/python.exe -O h:/m/mozilla-central/b uild/cl.py cl -Fomlp_data.obj -c -DOPUS_BUILD -DOPUS_VERSION='"v1.1-beta-23-gf2 446c2-mozilla"' -DUSE_ALLOCA -Drestrict= -Dinline=__inline -DNO_NSPR_10_SUPPORT -Ih:/m/mozilla-central/media/libopus/include -Ih:/m/mozilla-central/media/libop us/celt -Ih:/m/mozilla-central/media/libopus/silk -Ih:/m/mozilla-central/media/l ibopus/src -Ih:/m/mozilla-central/media/libopus/silk/float -Ih:/m/mozilla-centr al/media/libopus -I. -I../../dist/include -Ih:/m/mozilla-central/obj-i686-pc-mi ngw32/dist/include/nspr -Ih:/m/mozilla-central/obj-i686-pc-mingw32/dist/include/ nss -MD -FI ../../dist/include/mozilla-config.h -DMOZILLA_CLIEN T -TC -nologo -W3 -Gy -Fdgenerated.pdb -FS -wd4244 -wd4819 -we4553 -DNDEBUG -D TRIMMED -Zi -UDEBUG -DNDEBUG -O1 -Oy h:/m/mozilla-central/media/libopus/src/mlp _data.c' failed, return code 1 21:06.32 <opus.lib.desc>: Found error 21:06.32 <libs>: Found error 21:06.32 evaluation from h:\m\mozilla-central\config\recurse.mk:186:53:7:0: comm and 'c:/mozilla-build/python/python.exe h:/m/mozilla-central/build/pymake/pymake /../make.py -C ../../media/libopus libs' failed, return code 2 21:06.32 evaluation from h:\m\mozilla-central\config\recurse.mk:186:53:12:0: com mand 'c:/mozilla-build/python/python.exe h:/m/mozilla-central/build/pymake/pymak e/../make.py ../../db/sqlite3/src_libs ../../media/libjpeg_libs ../../modules/li bbz2_libs ../../media/libvorbis_libs ../../media/libopus_libs ../../media/libnes tegg_libs ../../media/libvpx_libs ../../media/libogg_libs ../../media/libtheora_ libs ../../media/libspeex_resampler_libs ../../media/libsoundtouch_libs ../../me dia/libcubeb_libs ../../media/libpng_libs ../../media/kiss_fft_libs' failed, ret urn code 2 21:06.32 h:\m\mozilla-central\config\recurse.mk:159:0: command 'c:/mozilla-build /python/python.exe h:/m/mozilla-central/build/pymake/pymake/../make.py -C config /external libs' failed, return code 2 21:06.33 h:\m\mozilla-central\config\rules.mk:697:0: command 'c:/mozilla-build/p ython/python.exe h:/m/mozilla-central/build/pymake/pymake/../make.py libs' faile d, return code 2 21:06.33 h:\m\mozilla-central\client.mk:394:0: command 'c:/mozilla-build/python/ python.exe h:/m/mozilla-central/build/pymake/pymake/../make.py -j4 -C obj-i686-p c-mingw32' failed, return code 2 21:06.33 h:\m\mozilla-central\client.mk:179:0: command 'c:/mozilla-build/python/ python.exe h:/m/mozilla-central/build/pymake/pymake/../make.py -f h:/m/mozilla-c entral/client.mk realbuild' failed, return code 2 21:06.36 From ./dist/sdk: Kept 0 existing; Added/updated 0; Removed 0 files and 1 directories. 21:06.36 From ./dist/public: Kept 0 existing; Added/updated 0; Removed 0 files a nd 1 directories. 21:06.36 From ./dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 1 directories. 21:06.37 From ../../dist/idl: Kept 1165 existing; Added/updated 0; Removed 0 fil es and 0 directories. 21:06.37 From ./dist/idl: Kept 0 existing; Added/updated 1165; Removed 0 files a nd 0 directories. 21:06.37 From ./dist/bin: Kept 0 existing; Added/updated 0; Removed 0 files and 1 directories. 21:06.37 From _tests: Kept 11 existing; Added/updated 11428; Removed 0 files and 0 directories. 21:06.37 From ./dist/include: Kept 1617 existing; Added/updated 1966; Removed 0 files and 0 directories. 21:06.51 421 compiler warnings present. 2
VC2013 doesn't support "inline" while it forbids macroizing "inline"! WTF!?
Blocks: VC12
Attached patch Stop MSVC 2013 madness (obsolete) (deleted) — Splinter Review
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #818698 - Flags: review?(ted)
I also get this error in VS2012. :(
Interesting. I wonder why we haven't seen this before?
Current theory (#media just now): [10:52] abr cpearce: It looks like this would be sensitive to inclusion of standard library constructs -- the xkeycheck.h file apparently does not perform this check except as included by standard libraries. [10:53] ehsan cpearce: https://bugzilla.mozilla.org/show_bug.cgi?id=928091 [10:53] abr cpearce: And the switchover to char16_t may well have move standard library includes into the compilation for this file
Depends on: 928132
Attached patch Patch (obsolete) (deleted) — Splinter Review
Fix build with MSVC 2012 as well as 2013.
Attachment #818698 - Attachment is obsolete: true
Attachment #818698 - Flags: review?(ted)
Attachment #818728 - Flags: review?(ted)
Summary: libopus fails to build using Visual Studio 2013 RTM → libopus fails to build using Visual Studio 2013 RTM and 2012
I also get the same error building netwerk/srtp/src/crypto/cipher/aes.c and a bunch of files in netwerk/srtp/src/crypto/hash/
Maybe we should add _ALLOW_KEYWORD_MACROS to configure rather than local Makefiles? https://mxr.mozilla.org/mozilla-central/source/configure.in?rev=0df04ffc2246#432
Worth trying. That would probably be easier than playing whackamole with all these bustages as they happen.
Build also fails in /media/mtransport/third_party/nICEr
Attached patch Patch: always define _ALLOW_KEYWORD_MACROS (obsolete) (deleted) — Splinter Review
Always define _ALLOW_KEYWORD_MACROS, so that we don't get build failures when building with VS2012 and VS2013. r? glandium, seeing as he's more likely to be awake...
Assignee: VYV03354 → cpearce
Attachment #818806 - Flags: review?(mh+mozilla)
Attachment #818806 - Flags: review?(mh+mozilla) → review+
Perhaps it's better to add -D_ALLOW_KEYWORD_MACROS to CFLAGS because MSVC supports "inline" in C++ mode. This error should be C mode specific.
Build errors on try, WinXP debug (Win7 builder): https://tbpl.mozilla.org/php/getParsedLog.php?id=29286540 ArrayBufferInputStream.cpp c:\tools\msvs10\vc\include\yvals.h(12) : error C2220: warning treated as error - no 'object' file generated c:\tools\msvs10\vc\include\yvals.h(12) : warning C4005: '_ALLOW_KEYWORD_MACROS' : macro redefinition e:\builds\moz2_slave\try-w32-d-00000000000000000000\build\obj-firefox\ipc\ipdl\_ipdlheaders\../../../dist/include/mozilla-config.h(137) : see previous definition of '_ALLOW_KEYWORD_MACROS' e:\builds\moz2_slave\try-w32-d-00000000000000000000\build\config\rules.mk:1141:0: command 'e:/builds/moz2_slave/try-w32-d-00000000000000000000/build/obj-firefox/_virtualenv/Scripts/python.exe -O e:/builds/moz2_slave/try-w32-d-00000000000000000000/build/build/cl.py cl -FoArrayBufferInputStream.obj -c -D_HAS_EXCEPTIONS=0 -I../../../dist/stl_wrappers -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DNO_NSPR_10_SUPPORT -DUNICODE -D_UNICODE -DNOMINMAX -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DOS_WIN=1 -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DCOMPILER_MSVC -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/dom/base -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/ipc/chromium/src -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/ipc/glue -I../../../ipc/ipdl/_ipdlheaders -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/netwerk/base/src -I. -I../../../dist/include -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/obj-firefox/dist/include/nspr -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/obj-firefox/dist/include/nss -MDd -FI ../../../dist/include/mozilla-config.h -DMOZILLA_CLIENT -wd4099 -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4251 -wd4244 -wd4345 -wd4351 -wd4482 -wd4800 -wd4819 -we4553 -GR- -DDEBUG -D_DEBUG -DTRACING -Zi -O1 -Oy- -WX e:/builds/moz2_slave/try-w32-d-00000000000000000000/build/netwerk/base/src/ArrayBufferInputStream.cpp' failed, return code 1 e:\builds\moz2_slave\try-w32-d-00000000000000000000\build\config\rules.mk:1141:0$ e:/builds/moz2_slave/try-w32-d-00000000000000000000/build/obj-firefox/_virtualenv/Scripts/python.exe -O e:/builds/moz2_slave/try-w32-d-00000000000000000000/build/build/cl.py cl -FoLoadContextInfo.obj -c -D_HAS_EXCEPTIONS=0 -I../../../dist/stl_wrappers -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DNO_NSPR_10_SUPPORT -DUNICODE -D_UNICODE -DNOMINMAX -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DOS_WIN=1 -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DCOMPILER_MSVC -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/dom/base -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/ipc/chromium/src -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/ipc/glue -I../../../ipc/ipdl/_ipdlheaders -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/netwerk/base/src -I. -I../../../dist/include -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/obj-firefox/dist/include/nspr -Ie:/builds/moz2_slave/try-w32-d-00000000000000000000/build/obj-firefox/dist/include/nss -MDd -FI ../../../dist/include/mozilla-config.h -DMOZILLA_CLIENT -wd4099 -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4251 -wd4244 -wd4345 -wd4351 -wd4482 -wd4800 -wd4819 -we4553 -GR- -DDEBUG -D_DEBUG -DTRACING -Zi -O1 -Oy- -WX e:/builds/moz2_slave/try-w32-d-00000000000000000000/build/netwerk/base/src/LoadContextInfo.cpp 2
(In reply to Masatoshi Kimura [:emk] from comment #13) > Perhaps it's better to add -D_ALLOW_KEYWORD_MACROS to CFLAGS because MSVC > supports "inline" in C++ mode. This error should be C mode specific. Testing this to see if it fixes the previous build errors on Try, they were in CPP files: https://tbpl.mozilla.org/?tree=Try&rev=e66572b3e3f2
Still failing in the .c files: https://tbpl.mozilla.org/php/getParsedLog.php?id=29289380&tree=Try#error0 punycode.c c:\tools\msvs10\vc\include\yvals.h(12) : error C2220: warning treated as error - no 'object' file generated c:\tools\msvs10\vc\include\yvals.h(12) : warning C4005: '_ALLOW_KEYWORD_MACROS' : macro redefinition command-line arguments : see previous definition of '_ALLOW_KEYWORD_MACROS' nameprep.c c:\tools\msvs10\vc\include\yvals.h(12) : error C2220: warning treated as error - no 'object' file generated c:\tools\msvs10\vc\include\yvals.h(12) : warning C4005: '_ALLOW_KEYWORD_MACROS' : macro redefinition command-line arguments : see previous definition of '_ALLOW_KEYWORD_MACROS' race.c c:\tools\msvs10\vc\include\yvals.h(12) : error C2220: warning treated as error - no 'object' file generated c:\tools\msvs10\vc\include\yvals.h(12) : warning C4005: '_ALLOW_KEYWORD_MACROS' : macro redefinition command-line arguments : see previous definition of '_ALLOW_KEYWORD_MACROS'
Then the next try would be CFLAGS += -FIyvals.h.
Sounds like we want a conditional #ifndef _ALLOW_KEYWORD_MACROS #define _ALLOW_KEYWORD_MACROS #endif But I don't know a way to do that on the compiler command line.
(In reply to Ralph Giles (:rillian) from comment #19) > Sounds like we want a conditional > > #ifndef _ALLOW_KEYWORD_MACROS > #define _ALLOW_KEYWORD_MACROS > #endif > > But I don't know a way to do that on the compiler command line. Is this something that could be decided as a configure.in check, perhaps?
(In reply to Ralph Giles (:rillian) from comment #19) > Sounds like we want a conditional > > #ifndef _ALLOW_KEYWORD_MACROS > #define _ALLOW_KEYWORD_MACROS > #endif > > But I don't know a way to do that on the compiler command line. It wouldn't help because the -D command line switch would be evaluated *before* any other source files. The offending code is in yvals.h which we have no control over.
(In reply to Alex Vincent [:WeirdAl] from comment #20) > (In reply to Ralph Giles (:rillian) from comment #19) > > Sounds like we want a conditional > > > > #ifndef _ALLOW_KEYWORD_MACROS > > #define _ALLOW_KEYWORD_MACROS > > #endif > > > > But I don't know a way to do that on the compiler command line. > > Is this something that could be decided as a configure.in check, perhaps? We already tried AC_DEFINE(_ALLOW_KEYWORD_MACROS) and failed. (comment 14)
(In reply to Masatoshi Kimura [:emk] from comment #22) > We already tried AC_DEFINE(_ALLOW_KEYWORD_MACROS) and failed. (comment 14) That's not what I meant. The configure script can compile a small C++ program as a test to see if the compiler will work with the command-line macro definition. If so, then configure adds it to DEFINES.
(In reply to Alex Vincent [:WeirdAl] from comment #23) > That's not what I meant. The configure script can compile a small C++ > program as a test to see if the compiler will work with the command-line > macro definition. If so, then configure adds it to DEFINES. I don't think it's worth the complexity because this is very specific to MSVC anyway. Even worse, some .c codes require _ALLOW_KEYWORD_MACROS while some others reject. Maybe we will have to changing local Makefiles...
This may indeed have been caused by the char16_t change, since that pulls in yvals.h everywhere.
FWIW I'm looking into this guys, I have an idea of a fix... Building locally right now.
Assignee: cpearce → ehsan
even with the current patch, my build is still busted. windows 8.0, vaio, today's m-c with a clobber. :(
There are two problems here: 1. Char16.h pulls in yvals.h where it doesn't really need to. See this from yvals.h: #ifndef _HAS_CHAR16_T_LANGUAGE_SUPPORT #define _HAS_CHAR16_T_LANGUAGE_SUPPORT 0 #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */ /* uchar PROPERTIES */ #if _HAS_CHAR16_T_LANGUAGE_SUPPORT #else /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */ #if !defined(_CHAR16T) #define _CHAR16T typedef unsigned short char16_t; typedef unsigned int char32_t; #endif /* !defined(_CHAR16T) */ #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */ In order to prevent that header to screw with char16_t, all we need to do is to #define _CHAR16T. 2. Char16.h also #defines char16_t, which the xkeycheck.h which comes with VC11 and above checks. We can easily fix that to use a typedef. Patch upcoming.
Component: Build Config → MFBT
Blocks: 895047
No longer blocks: VC12
Attached patch Patch (v1) (deleted) — Splinter Review
Attachment #818728 - Attachment is obsolete: true
Attachment #818806 - Attachment is obsolete: true
Attachment #819228 - Flags: review?(Pidgeot18)
Comment on attachment 819228 [details] [diff] [review] Patch (v1) Review of attachment 819228 [details] [diff] [review]: ----------------------------------------------------------------- I don't feel comfortable reviewing this change.
Attachment #819228 - Flags: review?(Pidgeot18) → review?(jwalden+bmo)
I decided to land this patch pending the review, and address the review comments later. https://hg.mozilla.org/integration/mozilla-inbound/rev/f5052f28644e
Comment on attachment 819228 [details] [diff] [review] Patch (v1) Review of attachment 819228 [details] [diff] [review]: ----------------------------------------------------------------- Sure, why not. I have no idea how we're going to address the mingw situation, or the situation if (when?) MS makes char16_t a distinct type from anything else, including wchar_t. This seems to make that worse. Pfui. Maybe someone will come up with a magical fix even after these changes.
Attachment #819228 - Flags: review?(jwalden+bmo) → review+
Comment on attachment 819228 [details] [diff] [review] Patch (v1) Review of attachment 819228 [details] [diff] [review]: ----------------------------------------------------------------- Approach seems sound to me, thanks for looking at this, ehsan. ::: mfbt/Char16.h @@ +21,5 @@ > * C++11 says char16_t is a distinct builtin type, but Windows's yvals.h > * typedefs char16_t as an unsigned short. We would like to alias char16_t > * to Windows's 16-bit wchar_t so we can declare UTF-16 literals as constant > + * expressions (and pass char16_t pointers to Windows APIs). We #define > + * _CHAR16T here in order to prevent yvals.h to override our char16_t This should be "...to prevent yvals.h from overriding our char16_t" @@ +32,3 @@ > */ > # define MOZ_UTF16_HELPER(s) L##s > +# define _CHAR16T I'm confused that you removed the yvals.h include. Was it not needed before for wchar_t?
Attachment #819228 - Flags: review?(jwalden+bmo)
Attachment #819228 - Flags: review+
Attachment #819228 - Flags: feedback+
(In reply to Ralph Giles (:rillian) from comment #33) > @@ +32,3 @@ > > */ > > # define MOZ_UTF16_HELPER(s) L##s > > +# define _CHAR16T > > I'm confused that you removed the yvals.h include. Was it not needed before > for wchar_t? We didn't need yvals.h for wchar_t. (I think we compile with wchar_t or __wchar_t as a builtin type.) yvals.h was included to ensure that Microsoft's char16_t typedef was defined before we override it with #define char16_t. If we didn't include yvals.h here, then some Windows header file will include it later and fail to compile because our #define chart16_t would stomp on yvals.h's typedef definition. (I wrote the original Char16.h, but I haven't been following how the current version works.)
Great, that makes sense. Thanks for clarifying, Chris.
Comment on attachment 819228 [details] [diff] [review] Patch (v1) I think Ralph's f+ accidentally stomped on jwalden's r+.
Attachment #819228 - Flags: review?(jwalden+bmo) → review+
(In reply to Chris Peterson (:cpeterson) from comment #36) > I think Ralph's f+ accidentally stomped on jwalden's r+. Yes.
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #28) > 1. Char16.h pulls in yvals.h where it doesn't really need to. See this from > yvals.h: > ... > In order to prevent that header to screw with char16_t, all we need to do is > to #define _CHAR16T. Ehsan: is Char16.h always included after yvals.h? Otherwise, Char16.h's #define _CHAR16T will be too late to prevent yval's typedef. I have a fuzzy memory of some .cpp files including windows.h before some std headers, so Char16.h had to handle both the before and after case (and thus the `#define char16_t` instead of a typedef).
(In reply to Chris Peterson (:cpeterson) from comment #38) > (In reply to :Ehsan Akhgari (needinfo? me!) from comment #28) > > 1. Char16.h pulls in yvals.h where it doesn't really need to. See this from > > yvals.h: > > ... > > In order to prevent that header to screw with char16_t, all we need to do is > > to #define _CHAR16T. > > Ehsan: is Char16.h always included after yvals.h? No, it will always be #included as the very first header (well, the second header to be precise), see <http://mxr.mozilla.org/mozilla-central/source/mozilla-config.h.in#38>. > Otherwise, Char16.h's > #define _CHAR16T will be too late to prevent yval's typedef. Nope, see comment 28, specifically the |#if !defined(_CHAR16T)| part. > I have a fuzzy memory of some .cpp files including windows.h before some std > headers, so Char16.h had to handle both the before and after case (and thus > the `#define char16_t` instead of a typedef). See above. :-)
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #32) > I have no idea how we're going to address the mingw situation, Me neither yet. > or the > situation if (when?) MS makes char16_t a distinct type from anything else, > including wchar_t. This seems to make that worse. Microsoft will have a hard time doing that with the mess that is the Win32 API. If they just make char16_t a normal built-in type, it will not be useful to anybody.
(In reply to Ralph Giles (:rillian) from comment #33) > ::: mfbt/Char16.h > @@ +21,5 @@ > > * C++11 says char16_t is a distinct builtin type, but Windows's yvals.h > > * typedefs char16_t as an unsigned short. We would like to alias char16_t > > * to Windows's 16-bit wchar_t so we can declare UTF-16 literals as constant > > + * expressions (and pass char16_t pointers to Windows APIs). We #define > > + * _CHAR16T here in order to prevent yvals.h to override our char16_t > > This should be "...to prevent yvals.h from overriding our char16_t" https://hg.mozilla.org/integration/mozilla-inbound/rev/97d51d6ae2b7
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
\o/ Thanks ehsan, chris, and all the troubleshooters.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: