caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Shayne Fletcher <shayne.fletcher.50@gmail.com>
To: "caml-list@inria.fr users" <caml-list@inria.fr>
Subject: [Caml-list] Build failures under Visual Studio 2015 solved
Date: Wed, 8 Jul 2015 12:23:59 -0400	[thread overview]
Message-ID: <CAMsAzy-VHwK5+2NZ8xkORhnbxy1z17tBosOoq27Oxc8jPhb+0A@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

Microsoft Visual Studio 2015 release candidate. This bundle contains
msvc-14.0 for which `_MSC_VER` has the value 1900.

(1) Patches to byterun/floats.c

(a)
  #if defined (_MSC_VER)
  #  include <float.h>
  #  if(MSC_VER < 1900)
  #    define isnan _isnan
  #    define isfinite _finite
  #  endif/*(MSC_VER <= 1900)*/
  #endif /*defined(_MSC_VER)*/

(b)
  void caml_init_ieee_floats(void)
  {
    ...
  #if defined(_MSC_VER) &&_MSC_VER < 1900
    _set_output_format(_TWO_DIGIT_EXPONENT);
  #endif/*defined(_MSC_VER) &&_MSC_VER < 1900*/
  }

(2) Patch to byterun/misc.h

  /* snprintf emulation for Win32 */

  #if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1900
  extern int caml_snprintf(char * buf, size_t size, const char * format,
...);
  #  define snprintf caml_snprintf
  #endif /*defined (_WIN32) && defined (_MSC_VER)&& _MSC_VER < 1900 */

(3) Rebuild flexdll objects with msvc-14.0 (in my case I am interested only
in the 64-bit variants)

  cl.exe /nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS- /DMSVC  -c
/Fo"flexdll_msvc64.obj" flexdll.c
  cl.exe /nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS- /DMSVC -c
/Fo"flexdll_initer_msvc64.obj" flexdll_initer.c

(4) Patches to config/Makefile.msvc64 (refer
http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
):

  EXTRALIBS=legacy_stdio_wide_specifiers.lib legacy_stdio_definitions.lib
vcruntime.lib ucrt.lib

​(5) Build the system

        make -f Makefile.nt world
        make -f Makefile.nt bootstrap
        make -f Makefile.nt opt
        make -f Makefile.nt opt.opt
        make -f Makefile.nt install
​
-- 
Shayne Fletcher

[-- Attachment #2: Type: text/html, Size: 5028 bytes --]

             reply	other threads:[~2015-07-08 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 16:23 Shayne Fletcher [this message]
2015-07-08 18:23 ` Gabriel Scherer
2015-07-08 21:11   ` Shayne Fletcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMsAzy-VHwK5+2NZ8xkORhnbxy1z17tBosOoq27Oxc8jPhb+0A@mail.gmail.com \
    --to=shayne.fletcher.50@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).