Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Roberto Di Cosmo <roberto@dicosmo.org>
To: Leo White <leo@lpw25.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] parmap package broken in opam switch 4.03.0
Date: Wed, 27 Apr 2016 11:49:45 +0200	[thread overview]
Message-ID: <CAJBwKuVv-mTR0ikz74N0rqbGumfGn43GHPqk_q-97yrOTtmh8g@mail.gmail.com> (raw)
In-Reply-To: <1461690983.2521722.590256673.26E0228E@webmail.messagingengine.com>

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

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 = "numcores"
external setcore: int -> unit = "setcore"

If you have similar patterns in your projects, take due notice :-)

--
Roberto


2016-04-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 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
>



-- 
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élie 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

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

  reply	other threads:[~2016-04-27  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 14:35 Sébastien Hinderer
2016-04-26 16:21 ` Roberto Di Cosmo
2016-04-26 17:16   ` Leo White
2016-04-27  9:49     ` Roberto Di Cosmo [this message]
2016-04-27 11:24       ` Sébastien Hinderer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJBwKuVv-mTR0ikz74N0rqbGumfGn43GHPqk_q-97yrOTtmh8g@mail.gmail.com \
    --to=roberto@dicosmo.org \
    --cc=caml-list@inria.fr \
    --cc=leo@lpw25.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox