Last Comment Bug 687225 - configure does not detect MSVC 2011 compiler
: configure does not detect MSVC 2011 compiler
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All Windows 8
: -- normal (vote)
: mozilla10
Assigned To: Gregory Szorc [:gps]
Depends on: 696422
Blocks: VC11 707021
  Show dependency treegraph
Reported: 2011-09-16 22:41 PDT by Gregory Szorc [:gps]
Modified: 2011-12-01 16:09 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Detect MSVC2011 Compiler in configure (2.09 KB, patch)
2011-09-16 23:10 PDT, Gregory Szorc [:gps]
ted: review+
Details | Diff | Review
Detect MSVC2011 Compiler in configure, v2 (5.67 KB, patch)
2011-10-02 17:10 PDT, Gregory Szorc [:gps]
ted: review+
Details | Diff | Review
Detect MSVC2011 in configure, v3 (6.23 KB, patch)
2011-10-03 21:57 PDT, Gregory Szorc [:gps]
bugspam.Callek: review+
Details | Diff | Review

Description Gregory Szorc [:gps] 2011-09-16 22:41:34 PDT
I'm trying to build mozilla-central on Windows 8 with the Visual Studio 2011 toolchain and am getting the following error when running configure:

checking for strip... no
checking for windres... no
checking for midl... midl
configure: error: This version (17.00.40825.2) of the MSVC compiler is unsupport
ed. See
*** Fix above errors and then restart with               "c:/mozilla-build/pytho
n/python.exe c:/dev/mozilla-central/build/pymake/pymake/../ -f
c:\dev\mozilla-central\ command 'cd obj-i686-pc-mingw32 &&   c:/
dev/mozilla-central/configure  \
  || ( echo "*** Fix above errors and then restart with\
               \"c:/mozilla-build/python/python.exe c:/dev/mozilla-central/build
/pymake/pymake/../ -f build\"" && exit 1 )' failed, return code

I'll likely have a patch in a few minutes...
Comment 1 Gregory Szorc [:gps] 2011-09-16 23:10:56 PDT
Created attachment 560677 [details] [diff] [review]
Detect MSVC2011 Compiler in configure

This (trivial) patch detects the MSVC 2011 compiler in configure.

When applied, ` -f configure` works! (Although, there still might be a few warnings related to Windows 8/MSVC 2011 in there.) But, at least this patch unblocks on Windows 8 compiling.
Comment 2 Mike Hommey [:glandium] 2011-09-17 01:56:22 PDT
You also need to fix
for the corresponding CRT.
Comment 3 Mike Hommey [:glandium] 2011-09-17 01:57:18 PDT
And I forgot toolkit/mozapps/installer/, too
Comment 4 Gregory Szorc [:gps] 2011-09-17 10:03:47 PDT
Ahh, good catch. I didn't realize those existed.

My compilation hasn't yet reached the installer phase. I could incorporate those into the patch easily enough or I can create a part 2 once compilation gets that far.
Comment 5 Mike Hommey [:glandium] 2011-09-17 10:15:46 PDT
Oh, and you made me remember of yet another one: build/win32/ Man, we really need to group that.
Comment 6 Gregory Szorc [:gps] 2011-09-17 10:40:55 PDT
OK, I'll upload a new patch shortly.

In the meantime, the output from ` -f configure` without an existing objdir is at I don't know enough about our build system (yet) to determine if there is anything fishy.
Comment 7 Mike Hommey [:glandium] 2011-09-17 10:44:25 PDT
Nothing seems wrong at first (quick) glance.
Note that for the CRT to be installed, you need to manually set the WIN32_REDIST_DIR variable.
Comment 8 Ted Mielczarek [:ted.mielczarek] 2011-09-23 08:00:17 PDT
Comment on attachment 560677 [details] [diff] [review]
Detect MSVC2011 Compiler in configure

Review of attachment 560677 [details] [diff] [review]:

@@ +731,5 @@
> +        elif test "$_CC_MAJOR_VERSION" = "17"; then
> +            _CC_SUITE=11

I wonder if we shouldn't just fold these three blocks together now, like:
elif test $_CC_MAJOR_VERSION -ge 15; then

What do you think?
Comment 9 Gregory Szorc [:gps] 2011-09-23 10:46:58 PDT
Actually, I should have canceled the review since there were some missing files per comment #2.

As for rolling everything together, it is very tempting. We run the risk of something in the future not following convention. But, I suppose we can cross that bridge if it comes to that.

I'll upload a new patch when I have access to the computer it is on.
Comment 10 Gregory Szorc [:gps] 2011-10-02 17:10:47 PDT
Created attachment 564093 [details] [diff] [review]
Detect MSVC2011 Compiler in configure, v2

This version adds checks to files that were missed in the first iteration. I confirmed that detection and compilation works in both x86 and x64 modes.
Comment 11 Ted Mielczarek [:ted.mielczarek] 2011-10-03 06:35:12 PDT
Comment on attachment 564093 [details] [diff] [review]
Detect MSVC2011 Compiler in configure, v2

Review of attachment 564093 [details] [diff] [review]:

::: build/win32/
@@ +97,5 @@
> +ifeq (1700,$(_MSC_VER))
> +	msvcp110.dll \
> +	msvcr110.dll \
> +	$(NULL)

Please use two-space indent here. Apparently I've been bad about enforcing that in this file. Feel free to fix the rest of them to match if you'd like.
Comment 12 Gregory Szorc [:gps] 2011-10-03 21:57:27 PDT
Created attachment 564458 [details] [diff] [review]
Detect MSVC2011 in configure, v3

This is the same as the last patch (which received r+) except it corrects whitespace in build/win32/, as suggested by reviewer.

I don't have checkin privileges, so on r+, please check it in for me.
Comment 13 Justin Wood (:Callek) 2011-10-03 21:59:15 PDT
Comment on attachment 564458 [details] [diff] [review]
Detect MSVC2011 in configure, v3

I verified this has no other changes, and meets ted's review requirement. Saving him the trouble and setting checkin-needed. Someone will get this into the tree shortly.
Comment 14 Justin Wood (:Callek) 2011-10-03 22:00:05 PDT
r+=ted for posterity for checkin
Comment 15 Ted Mielczarek [:ted.mielczarek] 2011-10-04 04:15:03 PDT
Comment 16 Kyle Huey [:khuey] ( 2011-10-11 05:21:38 PDT

Note You need to log in before you can comment on or make changes to this bug.