From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 45CEF7EEBF for ; Wed, 8 Jul 2015 20:24:26 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.177 as permitted sender) identity=mailfrom; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f177.google.com) identity=helo; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ie0-f177.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D0AgCjaZ1Vm7HfVdFCGoMxNWAGgxq5OwZGgh2FfAKBVQdMAQEBAQEBEgEBAQEBBgsLCSEuhCQBAQMBEhEdARsdAQMBCwYDAgs3AgIhAQERAQUBDg4GEyKHdgEDCggNOpl/jz+BLD4xiz+Ba4J5iygKGScNV4R8AQEBAQEBAQMBAQEBAQEBAQETAQUOgSeKFoJNgjUEB4JoEoExBYVdhzSHEoRnhTGBZoIAjzQOhVYSI4EVEQaCGxyBYi8xAYJKAQEB X-IPAS-Result: A0D0AgCjaZ1Vm7HfVdFCGoMxNWAGgxq5OwZGgh2FfAKBVQdMAQEBAQEBEgEBAQEBBgsLCSEuhCQBAQMBEhEdARsdAQMBCwYDAgs3AgIhAQERAQUBDg4GEyKHdgEDCggNOpl/jz+BLD4xiz+Ba4J5iygKGScNV4R8AQEBAQEBAQMBAQEBAQEBAQETAQUOgSeKFoJNgjUEB4JoEoExBYVdhzSHEoRnhTGBZoIAjzQOhVYSI4EVEQaCGxyBYi8xAYJKAQEB X-IronPort-AV: E=Sophos;i="5.15,433,1432591200"; d="scan'208";a="169437069" Received: from mail-ie0-f177.google.com ([209.85.223.177]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Jul 2015 20:24:25 +0200 Received: by iecvh10 with SMTP id vh10so161584007iec.3 for ; Wed, 08 Jul 2015 11:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pHUz4h0yvv578UU4cRu+1YwgklpLt4FT5SdvIrytiM8=; b=MTHtcWVrE32yRJrImWQBK31exR+L06lvCTxugY7pZkSIvhmeUcF5r6Tm1LPh1mOTKe L+YIQJaf/0dSW1m8Vqa7NCJ93UGl2rBPYKEsBmlB6MQwazUVIXIjGQKS+IVHtVYdw3zN O7EpD/XA21AqWLx2Ke8nacNB6A2zczyvhZUZSexXXLocP5XW2pwVj9zXVlFlGFaTXcNp mpPOABnFhZcSkFdWiihSyfFzgWYSzQcekjMgSqH8d9uFF/DIXOyRou5U4XfdUxfuZRRU ID1eDz3zo6++Mp/uhwNZZNgM++tef8+RLF6yCvlkJJUyQla0unpnhwUNijedDGaCBp/m 0S8Q== X-Received: by 10.107.6.194 with SMTP id f63mr19081334ioi.61.1436379864109; Wed, 08 Jul 2015 11:24:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.68.132 with HTTP; Wed, 8 Jul 2015 11:23:44 -0700 (PDT) In-Reply-To: References: From: Gabriel Scherer Date: Thu, 9 Jul 2015 03:23:44 +0900 Message-ID: To: Shayne Fletcher Cc: "caml-list@inria.fr users" Content-Type: multipart/alternative; boundary=001a113fc4429017ad051a613f92 Subject: Re: [Caml-list] Build failures under Visual Studio 2015 solved --001a113fc4429017ad051a613f92 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Could you submit the patch, in patch format, on the bugtracker ( http://caml.inria.fr/mantis/view_all_bug_page.php ) or github ( https://github.com/ocaml/ocaml ), so that it can be kept track of? Or is this not a proposal for inclusion in the codebase, because you are waiting for an actual release of msvc? On Thu, Jul 9, 2015 at 1:23 AM, Shayne Fletcher < shayne.fletcher.50@gmail.com> wrote: > 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 > # if(MSC_VER < 1900) > # define isnan _isnan > # define isfinite _finite > # endif/*(MSC_VER <=3D 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-univers= al-crt.aspx > ): > > EXTRALIBS=3Dlegacy_stdio_wide_specifiers.lib legacy_stdio_definitions.l= ib > vcruntime.lib ucrt.lib > > =E2=80=8B(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 > =E2=80=8B > -- > Shayne Fletcher > --001a113fc4429017ad051a613f92 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Could you submit the patch, in patch format, on the bugtra= cker ( http:/= /caml.inria.fr/mantis/view_all_bug_page.php ) or github ( https://github.com/ocaml/ocaml ), so that= it can be kept track of? Or is this not a proposal for inclusion in the co= debase, because you are waiting for an actual release of msvc?

On Thu, Jul 9, 2015 = at 1:23 AM, Shayne Fletcher <shayne.fletcher.50@gmail.com&g= t; wrote:
Microsoft Visual Studio 2015 release candidate. This bundle conta= ins msvc-14.0 for which `_MSC_VER` has the value 1900.

(1) Patches to = byterun/floats.c

(a)
=C2=A0 #if defined (_MSC_VER)=C2=A0
=C2=A0 #= =C2=A0include <float.h>
=C2=A0 # =C2=A0if(MSC_VER < 1900)<= /div>
=C2=A0 = # =C2=A0 =C2=A0define isnan _isnan
=C2=A0 # =C2=A0 =C2=A0define isfinite _f= inite
=C2=A0 # =C2=A0endif/*(MSC_VER <=3D 1900)*/
=C2=A0 #endif /*define= d(_MSC_VER)*/

(b)
=C2=A0 void caml_i= nit_ieee_floats(void)
=C2=A0 {
=C2=A0 =C2=A0 ...
=C2=A0 #if defined(_MSC_VER) &&_MSC_VER < 1900
=C2=A0 =C2=A0 _set_output_format(_TWO_DIGIT_EXPONENT);
=C2=A0 #endif/*defined(_MSC_VER) &&= ;_MSC_VER < 1900*/
=C2=A0 }

(2) Patch to byterun/misc.h

=C2=A0 /* snprintf emulation for Win32= */

=C2=A0 #if defined(_WIN32) && defined(_MSC_VER) &&= _MSC_VER < 1900
=C2=A0 extern int caml_snprintf(char * buf, size_t size= , const char * format, ...);
=C2=A0 # =C2=A0define snprintf caml_snprintf
= =C2=A0 #endif /*defined (_WIN32) && defined (_MSC_VER)&& _M= SC_VER < 1900 */

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

=C2=A0 cl.exe /nolog= o /MD -D_CRT_SECURE_NO_DEPRECATE /GS- /DMSVC =C2=A0-c /Fo"flexdll_msvc= 64.obj" flexdll.c
=C2=A0 cl.exe /nologo /MD -D_CRT_SECURE_NO_DEPRECAT= E /GS- /DMSVC -c /Fo"flexdll_initer_msvc64.obj" flexdll_initer.c<= /font>
=

=C2=A0 EXTRALIBS=3Dlegacy_stdio_wide_sp= ecifiers.lib legacy_stdio_definitions.lib vcruntime.lib ucrt.lib

=E2=80=8B(5) Build the system=

=C2=A0 =C2=A0 =C2=A0 =C2=A0 make -f Ma= kefile.nt world
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 make -f Makefile.nt bootstrap
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 make -f Makefile.nt opt
=C2=A0 =C2=A0 =C2=A0 =C2=A0 make -f Makefile.nt opt.opt
=C2=A0 =C2=A0 =C2=A0 =C2=A0 make -f Makefile.nt install<= /div>=E2=80=8B
--=
Shayne Fletcher

--001a113fc4429017ad051a613f92--