[m-rev.] for review: fix build problems with Visual Studio 2013

Julien Fischer jfischer at opturion.com
Tue Jan 28 15:43:50 AEDT 2014


Hi,

On Tue, 28 Jan 2014, Paul Bone wrote:

> On Mon, Jan 27, 2014 at 04:38:40AM +1100, Julien Fischer wrote:
>>
>> For review by anyone -- the main thing that needs to reviewed here is the
>> changes to README.MS-VisualC.
>>
>> @@ -21,19 +21,15 @@ has been installed.
>>  To make MSVC and its supporting tools available under the Cygwin or MSYS shells
>>  do the following:
>>
>> -(1) Open the Windows Command Prompt.
>> -    (Start -> All Programs -> Accessories -> Command Prompt on Windows XP)
>> -    (Start -> Accessories -> Command Prompt on Windows 7)
>> +(1) Open the Visual Studio Command Prompt.
>> +    This can typically be found in
>> + +         Start -> Visual Studio YYYY -> Visual Studio Tools
>>
>
> Is that a problem in your e-mail or in your file?  I know gmail does weird
> things so it's hard for me to tell (maybe use mutt ;-) )

It's not a problem with the file.  It doesn't appear to be a problem
with alpine, so I'm not sure what's doing that.
(I don't like mutt.)

>> -(2) Enter the following command:
>> +    although the name and location vary between different versions and editions
>> +    of Visual Studio.  (YYYY is the year.)
>>
>> -       C:\> "%VS90COMNTOOLS%"\vsvars32.bat
>> - -    This command sets up the environment for MSVC version 9.0 (2008).
>> -    For MSVC version 10.0 (2010) the corresponding environment variable
>> -    is VS100COMNTOOLS.
>> -
>> -(3) Enter the following command to start the MSYS shell:
>> +(2) Enter the following command to start the MSYS shell:
>>
>>          C:\> C:\MinGW\MSYS\1.0\msys.bat
>>
>> @@ -47,6 +43,22 @@ In order to install the C#, Erlang or Java grades you will require a C#,
>>  Erlang or Java compiler to be included in the Windows PATH.
>>  (See the relevant README files for further details, e.g. README.Java etc)
>>
>> +
>> +*** IMPORTANT NOTE FOR USERS OF VISUAL STUDIO 2013 ***
>> +
>> +The Makefile for the Boehm garbage collector requires the files NtWin32.Mak and
>> +Win32.Mak to be present in the build environment.  These files are *not*
>> +included with Visual Studio 2013 and must be copied or included from the
>> +Windows 7 (or 7.1) SDK.
>> +
>
> is 7.x sufficient?

There are only 7.0 and 7.1.  (Given that Windows has changed version
now, there are unlikely to be any more versions of the Windows 7 SDK.)

>
>> +To include the above files, append the SDK directory to the end of the INCLUDE
>> +environment variable, for example (with the Windows 7.1 SDK):
>> +
>> +   C:\> set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1a\Include
>> +
>
> is that line too long?  Is it possible to break up a line on the windows
> shell by using a backslash?

In the Windows command interpreter you have to use '^' to do that.
In this case, given that the path contains significant whitespace and
other special characters, I think it's clearer and less error prone to
keep it all on a single line.

...

>>  -----------------------------------------------------------------------------
>>
>>  CONFIGURATION AND INSTALLATION
>> @@ -135,6 +147,14 @@ The MSVC port currently has a number of limitation:
>>
>>  * Creation of shared libraries (DLLs) is not currently supported.
>>
>> +* The '--c-debug' option currently has no effect with MSVC since enabling
>> +  it disables some C compiler optimizations and also breaks parallel builds.
>> +
>
> Reorder these two reasons.  Things breaking is (usually) more important than
> disabling some optimisations.

Done.

>> +  If you *really* want to enable support for C level debugging, then enable the
>> +  commented out definition of DEBUG_OPTS in scripts/mgnuc.in (in the "cl" case)
>> +  and also enable the commented out definition of CFLAGS_FOR_DEBUG in
>> +  configure.ac (in the "msvc*" case).
>> +
>
> Will the readers know that they may need to run autoconf, configure and
> rebuild Mercury after these steps?

I've added a line saying that this needs to be done and pointing the
reader to the instructions in INSTALL.git that describe how to do that.

Cheers,
Julien.



More information about the reviews mailing list