caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Build failures under Visual Studio 2015 solved
@ 2015-07-08 16:23 Shayne Fletcher
  2015-07-08 18:23 ` Gabriel Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: Shayne Fletcher @ 2015-07-08 16:23 UTC (permalink / raw)
  To: caml-list@inria.fr users

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Build failures under Visual Studio 2015 solved
  2015-07-08 16:23 [Caml-list] Build failures under Visual Studio 2015 solved Shayne Fletcher
@ 2015-07-08 18:23 ` Gabriel Scherer
  2015-07-08 21:11   ` Shayne Fletcher
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Scherer @ 2015-07-08 18:23 UTC (permalink / raw)
  To: Shayne Fletcher; +Cc: caml-list@inria.fr users

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

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 <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: 5619 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Build failures under Visual Studio 2015 solved
  2015-07-08 18:23 ` Gabriel Scherer
@ 2015-07-08 21:11   ` Shayne Fletcher
  0 siblings, 0 replies; 3+ messages in thread
From: Shayne Fletcher @ 2015-07-08 21:11 UTC (permalink / raw)
  To: Gabriel Scherer; +Cc: caml-list@inria.fr users

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

On Jul 8, 2015 2:24 PM, "Gabriel Scherer" <gabriel.scherer@gmail.com> wrote:
>
> 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?

Done. PR#215.

-- 
Shayne Fletcher

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-08 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 16:23 [Caml-list] Build failures under Visual Studio 2015 solved Shayne Fletcher
2015-07-08 18:23 ` Gabriel Scherer
2015-07-08 21:11   ` Shayne Fletcher

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).