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 4848D7FEE5 for ; Tue, 18 Apr 2017 09:21:16 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=paul.lachat@edu.univ-fcomte.fr; spf=SoftFail smtp.mailfrom=paul.lachat@edu.univ-fcomte.fr; spf=None smtp.helo=postmaster@ufc-sortie.univ-fcomte.fr Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of paul.lachat@edu.univ-fcomte.fr) identity=pra; client-ip=194.57.91.199; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="paul.lachat@edu.univ-fcomte.fr"; x-sender="paul.lachat@edu.univ-fcomte.fr"; x-conformance=sidf_compatible Received-SPF: SoftFail (mail2-smtp-roc.national.inria.fr: domain of paul.lachat@edu.univ-fcomte.fr is inclined to not designate 194.57.91.199 as permitted sender) identity=mailfrom; client-ip=194.57.91.199; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="paul.lachat@edu.univ-fcomte.fr"; x-sender="paul.lachat@edu.univ-fcomte.fr"; 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@ufc-sortie.univ-fcomte.fr) identity=helo; client-ip=194.57.91.199; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="paul.lachat@edu.univ-fcomte.fr"; x-sender="postmaster@ufc-sortie.univ-fcomte.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3ApHtxxBSgl9LLAWdV/r2VIwIFddpsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa6yZhON2/xhgRfzUJnB7Loc0qyN4vymATRIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q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AqqdMK/LtV+I5/kvI/WXaY8OuDf9LuAl6OT0?= =?us-ascii?q?gX84n18dZ6ip0oENZHC2BPQ1a3meNHHlh9NEFWYRoiI/SvbrgRuMS219fXG3Cr?= =?us-ascii?q?o1+zV9DIutDY7fbo2hnfqc2ialW5NdYWVaBxaCCyS7P76YUusBPXrBavRqlSYJ?= =?us-ascii?q?AOCs?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BiAAAjvfVYmMdbOcJcHAEBCgEBBAEBF?= =?us-ascii?q?wELAQUBgkSBRoELB4NfiwiQS5gPIQEOhXSECkIVAQEBAQEBAQEBAQESAQEBAQE?= =?us-ascii?q?ICwsGKC+CMyCCbGgBMRkCBEcBD4oyCpo2kAiCJotFD4hkgi+DTIE+gwcVFYI1B?= =?us-ascii?q?YkxjQGGaYN+gwaONoELjWeLP4hLNYEnZ4VLgXFzAQEBiAsBgQwBAQE?= X-IPAS-Result: =?us-ascii?q?A0BiAAAjvfVYmMdbOcJcHAEBCgEBBAEBFwELAQUBgkSBRoE?= =?us-ascii?q?LB4NfiwiQS5gPIQEOhXSECkIVAQEBAQEBAQEBAQESAQEBAQEICwsGKC+CMyCCb?= =?us-ascii?q?GgBMRkCBEcBD4oyCpo2kAiCJotFD4hkgi+DTIE+gwcVFYI1BYkxjQGGaYN+gwa?= =?us-ascii?q?ONoELjWeLP4hLNYEnZ4VLgXFzAQEBiAsBgQwBAQE?= X-IronPort-AV: E=Sophos;i="5.37,218,1488841200"; d="scan'208,217";a="269369510" Received: from ufc-sortie.univ-fcomte.fr ([194.57.91.199]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Apr 2017 09:21:15 +0200 Received: from ufc204.univ-fcomte.fr (ufc204.univ-fcomte.fr [194.57.91.204]) by ufc-sortie.univ-fcomte.fr (Postfix) with ESMTP id EAB4E603AD for ; Tue, 18 Apr 2017 09:21:14 +0200 (CEST) Received: from zstore04.univ-fcomte.fr (localhost.localdomain [127.0.0.1]) by ufc204.univ-fcomte.fr (Postfix) with ESMTP id CEA4620300A7 for ; Tue, 18 Apr 2017 09:21:14 +0200 (CEST) Date: Tue, 18 Apr 2017 09:21:14 +0200 (CEST) From: paul.lachat@edu.univ-fcomte.fr To: caml-list@inria.fr Message-ID: <36405058.13728179.1492500074563.JavaMail.zimbra@edu.univ-fcomte.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_13728175_422548251.1492500074561" X-Originating-IP: [194.167.45.25] X-Mailer: Zimbra 8.6.0_GA_1200 (ZimbraWebClient - FF52 (Win)/8.6.0_GA_1200) Thread-Topic: Compile a custom toplevel on Windows Thread-Index: JKnVWkcGXJTNeA25EOHyMkzMveVfBA== Subject: [Caml-list] [Question] Compile a custom toplevel on Windows ------=_Part_13728175_422548251.1492500074561 Content-Type: multipart/alternative; boundary="----=_Part_13728176_1363203652.1492500074561" ------=_Part_13728176_1363203652.1492500074561 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hello, I've change the toplevel of Ocaml to replace the standard input and output by named pipes on Windows. To achieve this, I've change the toploop.ml (https://github.com/ocaml/ocaml/blob/trunk/toplevel/toploop.ml) to include the named pipes of Ocamlnet (http://projects.camlcity.org/projects/dl/ocamlnet-4.1.2/doc/html-main/Netsys_win32.html#1_Supportfornamedpipes). After that, I tried to understand how I could compile this custom toplevel. I want to compile the toplevel to have a .exe, so I could avoid using Cygwin to launch the application. I've run the makefile of the git repository of Ocaml and tried to follow the sequence of compilation for the toplevel. I use ocamlopt to have a native aplication and ocamlfind to link toploop.ml with the library ocamlnet (via the package netsys where the win32 named pipe are defined) and unix for catching exceptions. I use Opam : 1.3.0~dev, Ocaml : 4.03.0 and Cygwin on Windows 7. So I write a Makefile (see the attachement) and when I launch it, I get this : ______________________________________________________________________ ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c genprintval.mli ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c genprintval.ml ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c toploop.mli ocamlfind ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c toploop.ml -linkpkg -package netsys -package unix File "C:\OCaml64\home\Zar\toplevel_custom\_none_", line 1: Warning 58: no cmx file was found in path for module Netsys_win32, and its interface was not compiled with -opaque ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c trace.mli ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c trace.ml ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topdirs.mli ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topdirs.ml ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topmain.mli ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topmain.ml ocamlopt -g -I +compiler-libs -a -o tmp_ocamltoplevel.cmxa genprintval.cmx toploop.cmx trace.cmx topdirs.cmx topmain.cmx ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topstart.ml ocamlfind ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -linkall -o toplevel_custom.exe tmp_ocamltoplevel.cmxa topstart.cmx tmp_ocamltoplevel.a -linkpkg -package netsys -package unix ** Cannot resolve symbols for tmp_ocamltoplevel.a(topdirs.o): caml_get_current_environment File "caml_startup", line 1: Error: Error during linking ______________________________________________________________________ But I don't know how to resolve this error. I find that "caml_get_current_environment" is defined in meta.c (and used in topdirs.ml) (https://github.com/ocaml/ocaml/search?utf8=%E2%9C%93&q=caml_get_current_environment+&type=) But I think that meta.c is in the ocamlbytecomp.cmxa library, so I don't know why the linker don't find the symbols. Someone know how to resolve this problem ? Thank you in advance ! ------=_Part_13728176_1363203652.1492500074561 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
<= div>
Hello,

I've = change the toplevel of Ocaml to replace the standard input and output by na= med pipes on Windows.

To achieve this, I've c= hange the toploop.ml (https://github.com/ocaml/ocaml/blob/trunk/toplevel/to= ploop.ml) to include the named pipes
of Ocamlnet (http://proj= ects.camlcity.org/projects/dl/ocamlnet-4.1.2/doc/html-main/Netsys_win32.htm= l#1_Supportfornamedpipes).

After that, I tried to underst= and how I could compile this custom toplevel.
I want to compi= le the toplevel to have a .exe, so I could avoid using Cygwin to launch the= application.

I've run the makefile of the gi= t repository of Ocaml and tried to follow the sequence of compilation for t= he toplevel.
I use ocamlopt to have a native aplication and ocaml= find to link toploop.ml with the library ocamlnet
(via the packag= e netsys where the win32 named pipe are defined) and unix for catching exce= ptions.

<= div>I use Opam : 1.3.0~dev, Ocaml : 4.03.0 and Cygwin on Windows 7.

So I write a Makefile (see the attac= hement) and when I launch it, I get this :
__________________= ____________________________________________________
ocamlopt= -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a oca= mlbytecomp.a -c genprintval.mli
ocamlopt -g -I +compiler-libs ocamlcommo= n.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c genprintval.mlocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlco= mmon.a ocamlbytecomp.a -c toploop.mli
ocamlfind ocamlopt -g -I +compiler= -libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c = toploop.ml -linkpkg -package netsys -package unix
File "C:\OCaml64\home\= Zar\toplevel_custom\_none_", line 1:
Warning 58: no cmx file was found i= n path for module Netsys_win32, and its interface was not compiled with -op= aque
ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa o= camlcommon.a ocamlbytecomp.a -c trace.mli
ocamlopt -g -I +compiler-libs = ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c trace.= ml
ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa oca= mlcommon.a ocamlbytecomp.a -c topdirs.mli
ocamlopt -g -I +compiler-libs = ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topdir= s.ml
ocamlopt -g -I +compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa o= camlcommon.a ocamlbytecomp.a -c topmain.mli
ocamlopt -g -I +compiler-lib= s ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -c topm= ain.ml
ocamlopt -g -I +compiler-libs -a -o tmp_ocamltoplevel.cmxa genpri= ntval.cmx toploop.cmx trace.cmx topdirs.cmx topmain.cmx
ocamlopt -g -I += compiler-libs ocamlcommon.cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbyteco= mp.a -c topstart.ml
ocamlfind ocamlopt -g -I +compiler-libs ocamlcommon.= cmxa ocamlbytecomp.cmxa ocamlcommon.a ocamlbytecomp.a -linkall -o toplevel_= custom.exe tmp_ocamltoplevel.cmxa topstart.cmx tmp_ocamltoplevel.a -linkpkg= -package netsys -package unix
** Cannot resolve symbols for tmp_ocamlto= plevel.a(topdirs.o):
caml_get_current_environment
File "caml_startup= ", line 1:
Error: Error during linking
______________________= ________________________________________________

But I do= n't know how to resolve this error.
I find that "caml_get_cur= rent_environment" is defined in meta.c (and used in topdirs.ml)
(https://github.com/ocaml/ocaml/search?utf8=3D%E2%9C%93&q=3Dcaml_get= _current_environment+&type=3D)
But I think that meta.c is= in the ocamlbytecomp.cmxa library, so I don't know why the linker don't fi= nd the symbols.

Someone know how to resolve this problem = ?

Thank you in advance !<= br>
= ------=_Part_13728176_1363203652.1492500074561-- ------=_Part_13728175_422548251.1492500074561 Content-Type: text/x-makefile; name=Makefile Content-Disposition: attachment; filename=Makefile Content-Transfer-Encoding: base64 Q0M9b2NhbWxvcHQNCg0KU1JDRklMRVM9Z2VucHJpbnR2YWwubWwgdG9wbG9v cC5tbCB0cmFjZS5tbCB0b3BkaXJzLm1sIHRvcG1haW4ubWwNCkNNWEZJTEVT PSQoU1JDRklMRVM6Lm1sPS5jbXgpDQoNClRPUExJQk5BTUU9dG1wX29jYW1s dG9wbGV2ZWwNClRPUExJQkE9JChhZGRzdWZmaXggLmEsICR7VE9QTElCTkFN RX0pDQpUT1BMSUJDTVhBPSQoYWRkc3VmZml4IC5jbXhhLCAke1RPUExJQk5B TUV9KQ0KDQpPVEhFUkxJQj1vY2FtbGNvbW1vbiBvY2FtbGJ5dGVjb21wDQpP VEhFUkxJQkNNWEE9JChhZGRzdWZmaXggLmNteGEsICR7T1RIRVJMSUJ9KQ0K T1RIRVJMSUJBPSQoYWRkc3VmZml4IC5hLCAke09USEVSTElCfSkNCg0KR0VO RVJBTEZMQUdTPS1nIC1JICtjb21waWxlci1saWJzDQpDRkxBR1M9LXN0cmlj dC1zZXF1ZW5jZSAtcHJpbmNpcGFsIC1hYnNuYW1lIC1iaW4tYW5ub3QgLXNh ZmUtc3RyaW5nIC1zdHJpY3QtZm9ybWF0cw0KDQpUQVJHRVQ9dG9wbGV2ZWxf Y3VzdG9tLmV4ZQ0KDQphbGw6ICR7VE9QTElCQ01YQX0gdG9wc3RhcnQuY214 DQoJb2NhbWxmaW5kICR7Q0N9ICR7R0VORVJBTEZMQUdTfSAke09USEVSTElC Q01YQX0gJHtPVEhFUkxJQkF9IC1saW5rYWxsIC1vICR7VEFSR0VUfSAkXiAk e1RPUExJQkF9IC1saW5rcGtnIC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