From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 39E657EEFA for ; Wed, 24 Jun 2015 15:39:41 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of shayne.fletcher.50@gmail.com) identity=pra; client-ip=209.85.216.44; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="shayne.fletcher.50@gmail.com"; x-sender="shayne.fletcher.50@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of shayne.fletcher.50@gmail.com designates 209.85.216.44 as permitted sender) identity=mailfrom; client-ip=209.85.216.44; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="shayne.fletcher.50@gmail.com"; x-sender="shayne.fletcher.50@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-vn0-f44.google.com) identity=helo; client-ip=209.85.216.44; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="shayne.fletcher.50@gmail.com"; x-sender="postmaster@mail-vn0-f44.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CfCgDHsopVmyzYVdEaQYMwNV8GgxivKYwshz4HTAEBAQEBARIBAQEBAQYLCwkhLhsBAYQeER0BGx4DEgMNNwIkAREBBQEOFDWHdwEDEg2ZVI06gzE+MYs/gWuCeYsmChknDVeFLgEFDoEnkgoSgTEFhVqOKQKLUZZtEiOBDQkXghoCG4FuIjGCSAEBAQ X-IPAS-Result: A0CfCgDHsopVmyzYVdEaQYMwNV8GgxivKYwshz4HTAEBAQEBARIBAQEBAQYLCwkhLhsBAYQeER0BGx4DEgMNNwIkAREBBQEOFDWHdwEDEg2ZVI06gzE+MYs/gWuCeYsmChknDVeFLgEFDoEnkgoSgTEFhVqOKQKLUZZtEiOBDQkXghoCG4FuIjGCSAEBAQ X-IronPort-AV: E=Sophos;i="5.13,671,1427752800"; d="scan'208";a="167063593" Received: from mail-vn0-f44.google.com ([209.85.216.44]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jun 2015 15:39:40 +0200 Received: by vnbg129 with SMTP id g129so6362021vnb.2 for ; Wed, 24 Jun 2015 06:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=/OgbKJWSUZnbzc1CZz7JXQi9QhzYgUxF4AO2FCTyYME=; b=L3fN7kTtLjiELnnSagx0x5vmGiZVH7zXx/aemNFmBppGPWRDem5GticXvVWl65V85f RNJ+/oIBOH6GMOfmHupxN7bSa57v5RH5GnLrS+JB76OqINCj4Cx+7tA02BzwpOwuUh7h 1EoRZh5H2KiPvgkbCeDABBXnH5qQT7AvA7nZwia8QO9AXsjmKhecLyJQGBLRwd9qAFet XEizJ8V0DTrc2qTyJbi4tbq1NriU8mBRVOSkuTvtVxHEHiXKE0Dl2AS2KepwCcXe/LSg cn0HfLwyDcBa7N/lwrJxO6nj9mIoVMQxoR40KxURetSwvVajf0RMKiK16I1JvITvqzis dpvQ== X-Received: by 10.52.3.42 with SMTP id 10mr37003379vdz.10.1435153179250; Wed, 24 Jun 2015 06:39:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.92.134 with HTTP; Wed, 24 Jun 2015 06:39:19 -0700 (PDT) From: Shayne Fletcher Date: Wed, 24 Jun 2015 09:39:19 -0400 Message-ID: To: "caml-list@inria.fr users" Content-Type: multipart/alternative; boundary=485b397dd613729816051943a343 Subject: [Caml-list] Build failure under Visual Studio 2015 --485b397dd613729816051943a343 Content-Type: text/plain; charset=UTF-8 I decided to experiment with the Microsoft Visual Studio 2015 release candidate. This bundle contains msvc-14.0 for which `_MSC_VER` has the value 1900. Some warnings are silenced with this patch to byterun/floats.c #if defined (_MSC_VER) # include # if(MSC_VER < 1900) # define isnan _isnan # define isfinite _finite # endif/*(MSC_VER <= 1400)*/ #endif /*defined(_MSC_VER)*/ There is a problem though that comes about here in the production of 'ocamlrun.exe': link -lib -nologo -machine:AMD64 /out:libcamlrun.lib interp.obj misc.obj stacks.obj fix_code.obj startup_aux.obj startup.obj freelist.obj major_gc.obj minor_gc.obj memory.obj alloc.obj roots.obj globroots.obj fail.obj signals.obj signals_byt.obj printexc.obj backtrace.obj compare.obj ints.obj floats.obj str.obj array.obj io.obj extern.obj intern.obj hash.obj sys.obj meta.obj parsing.obj gc_ctrl.obj terminfo.obj md5.obj obj.obj lexing.obj callback.obj debugger.obj weak.obj compact.obj finalise.obj custom.obj dynlink.obj win32.obj main.obj cl -nologo -D_CRT_SECURE_NO_DEPRECATE -DOCAML_STDLIB_DIR='"C:/ocaml-msvc14/lib"' -I"C:\Program Files (x86)\flexdll" -O2 -Gy- -MD -c -o prims.obj prims.c cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release prims.c flexlink -x64 -merge-manifest -stack 33554432 -exe -o ocamlrun.exe prims.obj ws2_32.lib \ libcamlrun.lib ** Cannot resolve symbols for descriptor object: __iob_func sprintf Makefile.nt:23: recipe for target 'ocamlrun.exe' failed The second of those missing symbols 'sprintf' can be resolved with this addition to config/Makefile, line 99 EXTRALIBS=legacy_stdio_wide_specifiers.lib legacy_stdio_definitions.lib so that the flexlink step reads flexlink -x64 -merge-manifest -stack 33554432 -v -exe -o ocamlrun.exe prims.obj ws2_32.lib legacy_stdio_wide_specifiers.lib legacy_stdio_definitions.lib libcamlrun.lib but the issue with '__iob_func' remains. I've always associated this sort of problem in the past with mismatch between /MD and /MT. Research also indicates that this error can manifest when linking under msvc-14 against objects built with an older version of the compiler. In any case, after scratching around on it for an hour or two, I haven't yet found a way to overcome the link failure. I don't know for sure whether we are looking at a problem with the release candidate or, a problem with the build system with this new compiler. I do have a lead or two left to follow - if I have any success at overcoming this problem, I'll post here. -- Shayne Fletcher --485b397dd613729816051943a343 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I decided to expe= riment with the Microsoft Visual Studio 2015 release candidate. This bundle= contains msvc-14.0 for which `_MSC_VER` has the value 1900.

=
Some warnings are silenced with this patch to byterun/floats.c

=C2=A0 #if defined (_MSC_VER)=C2=A0
=C2=A0 # =C2=A0includ= e <float.h>
=C2=A0 # =C2=A0if(MSC_VER < 1900)
=C2=A0 #= =C2=A0 =C2=A0define isnan _isnan
=C2=A0 # =C2=A0 =C2=A0define isfini= te _finite
=C2=A0 # =C2=A0endif/*(MSC_VER <=3D 1400)*/
=C2= =A0 #endif /*defined(_MSC_VER)*/

There is a problem though= that comes about here in the production of 'ocamlrun.exe':<= /div>
<= br>
link -lib -nologo -machine:AMD64 /out:libcamlrun.lib interp.obj m= isc.obj stacks.obj fix_code.obj startup_aux.obj startup.obj freelist.obj ma= jor_gc.obj minor_gc.obj memory.obj alloc.obj roots.obj globroots.obj fail.o= bj signals.obj signals_byt.obj printexc.obj backtrace.obj compare.obj ints.= obj floats.obj str.obj array.obj io.obj extern.obj intern.obj hash.obj sys.= obj meta.obj parsing.obj gc_ctrl.obj terminfo.obj md5.obj obj.obj lexing.ob= j callback.obj debugger.obj weak.obj compact.obj finalise.obj custom.obj dy= nlink.obj win32.obj main.obj
cl -nologo -D_CRT_SECURE_NO_DEPRECATE -D= OCAML_STDLIB_DIR=3D'"C:/ocaml-msvc14/lib"' -I"C:\Pro= gram Files (x86)\flexdll" -O2 -Gy- -MD -c -o prims.obj prims.c<= /div>
c= l : Command line warning D9035 : option 'o' has been deprecated and= will be removed in a future release
prims.c
flexlink -x64 -m= erge-manifest -stack 33554432 -exe -o ocamlrun.exe prims.obj ws2_32.lib \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libcamlrun.lib
** Cannot reso= lve symbols for descriptor object:
=C2=A0__iob_func
=C2=A0sprin= tf
Makefile.nt:23: recipe for target 'ocamlrun.exe' failed

The second of those missing symbols 'sprintf' can be= resolved with this addition to config/Makefile, line 99

<= /div>
= =C2=A0 EXTRALIBS=3Dlegacy_stdio_wide_specifiers.lib legacy_stdio_definition= s.lib

so that the flexlink step reads

= =C2=A0 flexlink -x64 -merge-manifest -stack 33554432 -v -exe -o ocamlrun.ex= e prims.obj ws2_32.lib legacy_stdio_wide_specifiers.lib legacy_stdio_defini= tions.lib libcamlrun.lib

but the issue with '__iob_fun= c' remains.

I've always associated this sort of = problem in the past with mismatch between /MD and /MT. Research also indica= tes that this error can manifest when linking under msvc-14 against objects= built with an older version of the compiler. In any case, after scratching= around on it for an hour or two, I haven't yet found a way to overcome= the link failure.=C2=A0

I don't know for sure whether= we are looking at a problem with the release candidate or, a problem with = the build system with this new compiler. I do have a lead or two left to fo= llow - if I have any success at overcoming this problem, I'll post here= .

--
Sh= ayne Fletcher
--485b397dd613729816051943a343--