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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A63AA7EE7C for ; Wed, 27 Apr 2016 11:49:46 +0200 (CEST) IronPort-PHdr: 9a23:5Eg/wRJQZIzAcwu7ZNmcpTZWNBhigK39O0sv0rFitYgULPvxwZ3uMQTl6Ol3ixeRBMOAu6IC27Od6vmocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC34LnjqvrotX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD88Qa6tVYXK7mU6M9RL1eRHR6YiFmrPHs4D3OSkOw5noAXy1ClhdPKwzd80unGJH8rn2pmPB63XygOsf7V6wzERijp4xsUxrvwHMdMDQ06n3QosBxh6VApRXnoAZwld2HKLqJPeZzK/uONegRQnBMC5oAWg== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=rdicosmo@gmail.com; spf=Pass smtp.mailfrom=rdicosmo@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f53.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of rdicosmo@gmail.com) identity=pra; client-ip=74.125.82.53; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rdicosmo@gmail.com"; x-sender="rdicosmo@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of rdicosmo@gmail.com designates 74.125.82.53 as permitted sender) identity=mailfrom; client-ip=74.125.82.53; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rdicosmo@gmail.com"; x-sender="rdicosmo@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f53.google.com) identity=helo; client-ip=74.125.82.53; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rdicosmo@gmail.com"; x-sender="postmaster@mail-wm0-f53.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DzAABRiiBXjzVSfUpegmxqNXcGBqkFiQ+CXocXhW2BNAc7EQEBAQEBAQEBEQEBAQEHCwsJIS+CLYIVAQEDARIRBBkBFBkLAQMBCwEFAwILGh0CAiISAQUBChIGExIQh3MDCggJBZYcj0GBMT4xizaEQYdeJwMKhGEBAQEBBgEBAQEBFQEFCgWFGoVDhA8RAUmCU4JWAQSGMwyBNZAchXyCeAWCZoI4gX43gimKM4dSBwyGDRIegQ4PJ2GBQw0bgU06MId5gTUBAQE X-IPAS-Result: A0DzAABRiiBXjzVSfUpegmxqNXcGBqkFiQ+CXocXhW2BNAc7EQEBAQEBAQEBEQEBAQEHCwsJIS+CLYIVAQEDARIRBBkBFBkLAQMBCwEFAwILGh0CAiISAQUBChIGExIQh3MDCggJBZYcj0GBMT4xizaEQYdeJwMKhGEBAQEBBgEBAQEBFQEFCgWFGoVDhA8RAUmCU4JWAQSGMwyBNZAchXyCeAWCZoI4gX43gimKM4dSBwyGDRIegQ4PJ2GBQw0bgU06MId5gTUBAQE X-IronPort-AV: E=Sophos;i="5.24,540,1454972400"; d="scan'208,217";a="175926739" Received: from mail-wm0-f53.google.com ([74.125.82.53]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 27 Apr 2016 11:49:45 +0200 Received: by mail-wm0-f53.google.com with SMTP id g17so7080773wme.0 for ; Wed, 27 Apr 2016 02:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=z7jIP2AUapDUvQNnrni3YSFGSpCyyTBoZSlzDtGjcmw=; b=pdAHXl/6jLPlSbu68SlWaMp1as0IxjpZHfpzjzhQmRiVKiEMSY73qy8iYj1nw8FGNn iZIzl/gNefdifZrKWwbR9tN2mq080mlpM+y1IrOTOZALayAPdWFnJ9e0r0nzFaoBJHGS Mc5uXBeaYne6Lm9DVwkO4UYybei6pgqMpSfdx6Tho7pfaEwdHNz8vEdI/TxcFmgFiFY7 7XhTQblNaSxwjX8uhodNkuJTiaqkJKBmQ3F9YSFXiLkFY3PFW0Gq3wEyBKvVWcQ2O//2 rcx/rJUYhCdu60j06IEB1U68zreiPUMizx+kLM4EiFcXX/KlXoxBy5NHxUkoicoHCNHF HCTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=z7jIP2AUapDUvQNnrni3YSFGSpCyyTBoZSlzDtGjcmw=; b=dXWBvg57vFgInLlLCId7xJMSI2z5QtHC6yz/1kFMVDxcjA7IVdyyPdB7q1OyBUM3Uz PTrCMF8HMCdX7SShwHVSaOlznh2bLguFrfPGmp79lBH+FJpXfUI2vWqEZqqS9R4hJGVG O7eqDwSNwrK0nbK6Ot5b+/uNVL1ZPoSUUNQN1NfnK1tL/Oaya8ltf9G8fZZkfsY3xO6k zKKGBCbp0gV6fc4v1qVCRXfBcguBUgSEF7YJMYPxMn+kPFvbAdDdrm6lAZk8oe/9f3kS FOk4TP4uwsixUy1HDaI1nGFwxj42ogqOQyG/2X9HmmGka7X1t+CIrBMQGygnI/Eb1qEV jO9w== X-Gm-Message-State: AOPr4FVpHYLYSDdd/RQxf0bz4Fge8W/yY8Np4xQD9snyCKhClXV429o3e19euP5lxPbCCg4i9zcrqvsOnXwwvQ== MIME-Version: 1.0 X-Received: by 10.28.14.2 with SMTP id 2mr5594246wmo.14.1461750585475; Wed, 27 Apr 2016 02:49:45 -0700 (PDT) Sender: rdicosmo@gmail.com Received: by 10.28.165.12 with HTTP; Wed, 27 Apr 2016 02:49:45 -0700 (PDT) In-Reply-To: <1461690983.2521722.590256673.26E0228E@webmail.messagingengine.com> References: <20160426143541.GB21686@pl-59055.rocqadm.inria.fr> <20160426162143.GA15142@traveler> <1461690983.2521722.590256673.26E0228E@webmail.messagingengine.com> Date: Wed, 27 Apr 2016 11:49:45 +0200 X-Google-Sender-Auth: omWr2I09VWSG9BmeabB4F5EDER0 Message-ID: From: Roberto Di Cosmo To: Leo White Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001a1144330665c9d5053174544d Subject: Re: [Caml-list] parmap package broken in opam switch 4.03.0 --001a1144330665c9d5053174544d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Indeed, after some more investigation (thanks to Francois Berenger), it seems that in 4.03 we can no longer just use a bare .mli file with the interface to some external code, as it was possible before. Now, we need to provide also an .ml file, in any case. The fix in parmap is underway, and it was a simple matter of moving setcore.mli to setcore.ml, without touching anything else. For the curious, the content of setcore.ml (ex setcore.mli) is the following: (* uses the native affinity interface to declare that the current process should be attached to core number n *) external numcores: unit -> int =3D "numcores" external setcore: int -> unit =3D "setcore" If you have similar patterns in your projects, take due notice :-) -- Roberto 2016-04-26 19:16 GMT+02:00 Leo White : > > It seems that in 4.03 one needs to add the -opaque flag when compiling > > such stubs, otherwise things go astray, and it seems ocamlbuild does not > > detect automatically such situations, so one needs to explicitly pass > > the -opaque option when compiling setcore.mli (and only it). > > I would not have thought that adding `-opaque` would be sufficient. It > should get you > past the compilation of modules which depend on `setcore.mli`, but I would > expect > linking to fail still. If that is not the case I guess it should be > considered a bug because > in 4.03 referencing an `external` is supposed to force linking of the > containing module. > The change was made because the existing behaviour was said to confuse > people -- > using a normal value from a module caused it to get linked whilst using an > external value > didn't. > > Regards, > > Leo > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --=20 Roberto Di Cosmo ------------------------------------------------------------------ Professeur (on leave at/detache a INRIA Roquencourt) IRIF email : roberto@dicosmo.org Universite Paris Diderot web : http://www.dicosmo.org Case 7014 Twitter : http://twitter.com/rdicosmo 5, Rue Thomas Mann F-75205 Paris Cedex 13 FRANCE ------------------------------------------------------------------ Office location: Paris Diderot INRIA Bureau 3020 (3rd floor) Bureau C123 Batiment Sophie Germain Batiment C 8 place Aur=C3=A9lie Nemours 2, Rue Simone Iff Tel: +33 1 57 27 92 20 Tel: +33 1 80 49 44 42 Metro Bibliotheque F. Mitterrand Ligne 6: Dugommier ligne 14/RER C Ligne 14/RER A: Gare de Lyon ------------------------------------------------------------------ GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 --001a1144330665c9d5053174544d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Indeed, after some more investigation (thanks to Francois = Berenger), it seems that in 4.03 we can no longer just use a bare .mli file= with the interface to some external code, as it was possible before.
<= br>
Now, we need to provide also an .ml file, in any case.
<= div>
The fix in parmap is underway, and it was a simple matte= r of moving setcore.mli to setcore.ml, wi= thout touching anything else.

For the curious, the= content of setcore.ml (ex setcore.mli) i= s the following:

(* uses the native affinity interface= to =C2=A0
=C2=A0=C2=A0declare that the current process should be
=C2=A0=C2=A0attached to core number n *)

external numcores: unit -> int =3D "numcores"
external setcore: int -> unit =3D "setcore"

If you have similar patterns in your projects, take d= ue notice :-)

--
Roberto

<= /div>

2016-0= 4-26 19:16 GMT+02:00 Leo White <leo@lpw25.net>:
> It seems that in 4.03 one needs to = add the -opaque flag when compiling
> such stubs, otherwise things go astray, and it seems ocamlbuild does n= ot
> detect automatically such situations, so one needs to explicitly pass<= br> > the -opaque option when compiling setcore.mli (and only it).

I would not have thought that adding `-opaque` would be sufficient. = It should get you
past the compilation of modules which depend on `setcore.mli`, but I would = expect
linking to fail still. If that is not the case I guess it should be conside= red a bug because
in 4.03 referencing an `external` is supposed to force linking of the conta= ining module.
The change was made because the existing behaviour was said to confuse peop= le --
using a normal value from a module caused it to get linked whilst using an = external value
didn't.

Regards,

Leo

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



--
=
=
Roberto Di = Cosmo

------------------------------------------------------------= ------
Professeur (on leave at/detache a INRIA Roquencourt)
IRIF =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 email : roberto@dicosmo.org
Universite Paris Diderot =C2=A0 =C2=A0 =C2=A0 =C2=A0 web : http://www.dicosmo.org
Case 7014 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0
Twi= tter :=C2=A0http://twitter.com/rdico= smo
5, Rue = Thomas Mann =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
F-75205 Paris Ced= ex 13 FRANCE =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
------------------------------------------------------------------
Office location:

Paris Diderot =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= INRIA
=C2=A0
Bureau 3020 (3rd floor) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Bureau C123
Batiment Sophie Germain =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0Batiment C
8 place Aur=C3=A9lie Nemours =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A02, Rue Simone Iff
Tel: +33 1 57 27 92 20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Tel: +33 1 80 49 44 42 =C2=A0

Metro
=C2=A0Bibliotheque F. Mitterrand =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0Ligne 6: Dugommier
=C2=A0ligne 14/RER C =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Ligne 14/= RER A: Gare de Lyon
------------------------------------------------------------------ =C2= =A0 =C2=A0=C2=A0
GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE= 39CB 12D3 =C2=A0 =C2=A0=C2=A0
--001a1144330665c9d5053174544d--