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 2B6A38239C for ; Fri, 23 Feb 2018 00:42:30 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=nicolas.ojeda.bar@lexifi.com; spf=SoftFail smtp.mailfrom=nicolas.ojeda.bar@lexifi.com; spf=None smtp.helo=postmaster@vrout10.yaziba.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of nicolas.ojeda.bar@lexifi.com) identity=pra; client-ip=185.56.204.32; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.ojeda.bar@lexifi.com"; x-sender="nicolas.ojeda.bar@lexifi.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (mail2-smtp-roc.national.inria.fr: domain of nicolas.ojeda.bar@lexifi.com is inclined to not designate 185.56.204.32 as permitted sender) identity=mailfrom; client-ip=185.56.204.32; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.ojeda.bar@lexifi.com"; x-sender="nicolas.ojeda.bar@lexifi.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@vrout10.yaziba.net) identity=helo; client-ip=185.56.204.32; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.ojeda.bar@lexifi.com"; x-sender="postmaster@vrout10.yaziba.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3ACnzr0BOacbnccS2f5HIl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0I/n6rarrMEGX3/hxlliBBdydt6ofzbKO+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZLebxlGiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPde?= =?us-ascii?q?RWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbY?= =?us-ascii?q?UwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0vRz+s87lkRwPpiC?= =?us-ascii?q?cfNj427mfXitBrjKlGpB6tvgFzz5LIbI2QMvdxeb7Tfc4BRWpZQMleSzBBDI27?= =?us-ascii?q?b4sKFeUBPOBYpJT5q1YBqRayAA+hD/7txDBVnH/7xa810+ohHw/I3wIuAswAv2?= =?us-ascii?q?jPodrvKKsfS/q4wLXUwTjBaf5dxDfz6JLPchAkufyCRbNwftbWyUkrFQTFlU2f?= =?us-ascii?q?p5XnPzyLy+sCqXCU4vdlUuK1lmUqrAdxojmzyccrjonGnJkVxkrD9SV73ok6OM?= =?us-ascii?q?e3RFRgbtG+CptdrCWaOJV5Q8MjTWFouTw2xaEBuZ6+ZSUHzoksyRDYa/yCaYeI?= =?us-ascii?q?4xTjWf6QITd+nnJleaiwiwy88Ui60uH9VtO70FZNripCiNXDqncN1xnV58OaSf?= =?us-ascii?q?V95l+s1SuM2g3T8O1JIUE5mbDFJ5I9zbM8jJQevVrbEiPohEn7iLWae0Yk9+Sy?= =?us-ascii?q?9ejrf7brqoWTOoJ1jAz1L74gldalAesiNwgDR2ib9vq41L3k5UD5Xq9Kjvorkq?= =?us-ascii?q?nFrZzWOd4Xp66jDA5U04Ys8AywAy2g0NsGgXkLNFNFeBSZgIj1I1zCPfP1APel?= =?us-ascii?q?j1mskTpn3e7KMqHuD5nXIHXPjq/tfbNn5E5dzAozw8pf55VRCrwZJvLzW1P+tN?= =?us-ascii?q?vcDhAjKAy42eHnCNdj2YwDQ22DGLSWP7nIsVKT4uIgPeaNZI4buDb8MfQq+/nu?= =?us-ascii?q?jXohlV8HYaapxYcXaGy/Hvl+P0qWe3/sgtMYHWcOvwo+V/DqhUaZUT9TYnayR7?= =?us-ascii?q?gz6is6CIKgF4fDR5qijKaP3CehBpFWY2dGBU2SHnrwbIWEXusMaDqVIs98jjxX?= =?us-ascii?q?HYSmHqog3hGnuQuy4PJZJ+zV9zdQ4Zf93d506vf7nhQpszd9C9iQ2GHLQm1pyD?= =?us-ascii?q?AmXTgziYZ+qkt5Q0y09qp1j/VvP1BJr6dPUww9MZfHiet4Btz7HAjIZP+NRUan?= =?us-ascii?q?TNTgCjY0GIFii+QSalpwTo3xxivI2DCnVvpIzuXaVqxxybrV2j3KH+g4zn/H0K?= =?us-ascii?q?c7iFx/GJlLOH2niK85/A/WVdWQzxep0p2yfKFZ5xbjsX+ZxDPU7kVVQA9+UOPO?= =?us-ascii?q?WnVNPhKL/+S83VvLSvqVMZpiMgZFzpTaeLVQbcD11A0AVf7xOd7XJWS8hzXoCA?= =?us-ascii?q?=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BwAwBmVI9ahyDMOLldDg0BAQEBAwEBA?= =?us-ascii?q?QkBAQGENXAoBAaDXoE5iGyNfIICE2gbgVCBG44FhV4UggIKI4URAoInBxkLBSs?= =?us-ascii?q?YAQIBAQEBAQEBAQESAQEBCgsJCCgvgjgkgkgBBAEjSwsFCwsLGh0CAiISAQUBC?= =?us-ascii?q?hIGExKJeQMNCAQBC58gQIwXgieHOAOBFiaCHgEBAQEBBQEBAQEBASKFGYIngz6?= =?us-ascii?q?CeDaDJYFGg0+CZQEEiHkMmzoJiCiNZoMHkT2ODIoKFAUggRUCDxCCCnBPMQaCD?= =?us-ascii?q?AmCEkmBU0B3jGgBAQE?= X-IPAS-Result: =?us-ascii?q?A0BwAwBmVI9ahyDMOLldDg0BAQEBAwEBAQkBAQGENXAoBAa?= =?us-ascii?q?DXoE5iGyNfIICE2gbgVCBG44FhV4UggIKI4URAoInBxkLBSsYAQIBAQEBAQEBA?= =?us-ascii?q?QESAQEBCgsJCCgvgjgkgkgBBAEjSwsFCwsLGh0CAiISAQUBChIGExKJeQMNCAQ?= =?us-ascii?q?BC58gQIwXgieHOAOBFiaCHgEBAQEBBQEBAQEBASKFGYIngz6CeDaDJYFGg0+CZ?= =?us-ascii?q?QEEiHkMmzoJiCiNZoMHkT2ODIoKFAUggRUCDxCCCnBPMQaCDAmCEkmBU0B3jGg?= =?us-ascii?q?BAQE?= X-IronPort-AV: E=Sophos;i="5.47,381,1515452400"; d="scan'208,217";a="314930370" Received: from vrout10.yaziba.net ([185.56.204.32]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Feb 2018 00:42:28 +0100 Received: from mtaout10.int.yaziba.net (mtaout10.int.yaziba.net [10.4.20.36]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout10.yaziba.net (mx10.yaziba.net) with ESMTPS id 103CF52510 for ; Fri, 23 Feb 2018 00:42:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mtaout10.int.yaziba.net (Postfix) with ESMTP id 04B641604A2 for ; Fri, 23 Feb 2018 00:42:28 +0100 (CET) X-Virus-Scanned: amavisd-new at Received: from mtaout10.int.yaziba.net ([127.0.0.1]) by localhost (mtaout10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nwcKF5UwIN7K for ; Fri, 23 Feb 2018 00:42:27 +0100 (CET) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mtaout10.int.yaziba.net (Postfix) with ESMTPSA id 92E6F160492 for ; Fri, 23 Feb 2018 00:42:27 +0100 (CET) Received: by mail-oi0-f46.google.com with SMTP id x10so2482331oig.2 for ; Thu, 22 Feb 2018 15:42:27 -0800 (PST) X-Gm-Message-State: APf1xPAz/zS0+ot6ikqJOoUoV5EMGsSl2nE/YTWhBron1OSPESFokEJN KAuzQrG5t3L+CAZIg2Rs7PRPbIm659l1kRAfpDo= X-Google-Smtp-Source: AH8x226FN63CBQoJrzsoWUuHuwOyrvJLIF0fI852LPO9f9KZzHsAoSByN5zWLvEHl3B9AhuEJMYu8UTQxJbA5eUREaM= X-Received: by 10.202.26.8 with SMTP id a8mr5398011oia.305.1519342946312; Thu, 22 Feb 2018 15:42:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.139.125 with HTTP; Thu, 22 Feb 2018 15:42:05 -0800 (PST) In-Reply-To: <7441c664-00ae-c125-9ce4-80e5a67fcd8e@cms.caltech.edu> References: <7441c664-00ae-c125-9ce4-80e5a67fcd8e@cms.caltech.edu> From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Fri, 23 Feb 2018 00:42:05 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Michael C Vanier Cc: caml-list Content-Type: multipart/alternative; boundary="f4f5e808ed4c9b68120565d598c2" X-DRWEB-SCAN: ok X-VRSPAM-SCORE: -51 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrheeggddtlecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepjghfhfffkffuvfgtsegrtderredttdejnecuhfhrohhmpefpihgtohhljohspgfqjhgvuggrpgeumohruceonhhitgholhgrshdrohhjvggurgdrsggrrheslhgvgihifhhirdgtohhmqeenucffohhmrghinhepihhnrhhirgdrfhhrpdihrghhohhordgtohhmnecukfhppedvtdelrdekhedrvddukedrgeeinecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Has anybody gotten delimcc to work? --f4f5e808ed4c9b68120565d598c2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Mike, I was able to successfully load delimcc into the toplevel after applying the tiny patch below. You can give it a try by doing: opam source delimcc cd delimcc.(version) (apply patch) opam pin add . (you have to replace the stuff between parentheses by whatever is correct in your setup.) diff --git a/stacks.c b/stacks.c index fdab2a7..5765710 100644 --- a/stacks.c +++ b/stacks.c @@ -203,13 +203,13 @@ value copy_stack_fragment(const value vek1) #endif if (size < Max_young_wosize) { - block =3D alloc(size, 0); + block =3D caml_alloc(size, 0); memcpy(&Field(block, 0), tp2, size * sizeof(value)); } else { - block =3D alloc_shr(size, 0); + block =3D caml_alloc_shr(size, 0); mlsize_t i; for (i =3D 0; i < size; i++) - initialize(&Field(block, i), tp2[i]); + caml_initialize(&Field(block, i), tp2[i]); } /* We check the invariants after the allocation of block, which may @@ -382,4 +382,3 @@ value dbg_note(const value message) fprintf(stderr,"%s\n",String_val(message)); return Val_unit; } Hope it helps, Nicol=C3=A1s On Fri, Feb 23, 2018 at 12:18 AM, Michael C Vanier wrote: > I've been trying to use the delimcc delimited continuation library, but so > far I've been unsuccessful. I'm using OCaml 4.06.1 and I've tried it on > both Mac OS X (High Sierra) and Ubuntu MATE 17.10. I'm fine sticking to > bytecode. The opam package installs correctly but when you try to run it > you get errors from the dynamically-linked libraries. On Mac OS X I get > this: > > # #require "delimcc";; > Cannot load required shared library dlldelimcc. > Reason: /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so: > dlopen(/Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so, 10): > Symbol not found: _alloc > Referenced from: /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so > Expected in: flat namespace > in /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so. > > And on Ubuntu I get this: > > # #require "delimcc";; > /home/mvanier/.opam/4.06.1/lib/delimcc: added to search path > /home/mvanier/.opam/4.06.1/lib/delimcc/delimcc.cma: loaded > Cannot load required shared library dlldelimcc. > Reason: /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so: > dlopen(/Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so, 10): > Symbol not found: initialize. > > However, in either case I can do: > > # open Delimcc;; > > and it reports no errors, but then if I try e.g.: > > # shift;; > Reference to undefined global `Delimcc` > > so it appears the library isn't there or isn't functional. Compiling from > the delimcc source also appears to work, but gcc warns about implicit > declarations of "alloc", "alloc_shr" and "initialize" when compiling > stacks.c, which makes sense. Compiling any of the test programs also fai= ls. > > So it appears that this library no longer works. Does anyone know any way > to make it work? > > Thanks in advance, > > Mike > > > -- > 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 > --f4f5e808ed4c9b68120565d598c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Mike,

I was able to successfully l= oad delimcc into the toplevel after applying the tiny patch below.
You can give it a try by doing:

=C2=A0 opam sour= ce delimcc
=C2=A0 cd delimcc.(version)
=C2=A0 (apply pa= tch)
=C2=A0 opam pin add .

(you have to = replace the stuff between parentheses by whatever is correct in your setup.= )

diff --git a/stacks.c b/stacks.c
= index fdab2a7..5765710 100644
--- a/stacks.c
+++ b/stac= ks.c
@@ -203,13 +203,13 @@ value copy_stack_fragment(const value = vek1)
=C2=A0#endif
=C2=A0
=C2=A0 =C2=A0if (si= ze < Max_young_wosize) {
- =C2=A0 =C2=A0block =3D alloc(size, = 0);
+ =C2=A0 =C2=A0block =3D caml_alloc(size, 0);
=C2= =A0 =C2=A0 =C2=A0memcpy(&Field(block, 0), tp2, size * sizeof(value));
=C2=A0 =C2=A0} else {
- =C2=A0 =C2=A0block =3D alloc_shr= (size, 0);
+ =C2=A0 =C2=A0block =3D caml_alloc_shr(size, 0);
=C2=A0 =C2=A0 =C2=A0mlsize_t i;
=C2=A0 =C2=A0 =C2=A0for (i = =3D 0; i < size; i++)
- =C2=A0 =C2=A0 =C2=A0initialize(&Fi= eld(block, i), tp2[i]);
+ =C2=A0 =C2=A0 =C2=A0caml_initialize(&am= p;Field(block, i), tp2[i]);
=C2=A0 =C2=A0}
=C2=A0
=
=C2=A0 =C2=A0/* We check the invariants after the allocation of block,= which may
@@ -382,4 +382,3 @@ value dbg_note(const value message= )
=C2=A0 =C2=A0fprintf(stderr,"%s\n",String_val(me= ssage));
=C2=A0 =C2=A0return Val_unit;
=C2=A0}

Hope it helps,
Nicol=C3=A1s

=


On Fri, Feb 23, 2018 at 12:18 AM, Michael C Vanier <mvanie= r@cms.caltech.edu> wrote:
I= 've been trying to use the delimcc delimited continuation library, but = so far I've been unsuccessful.=C2=A0 I'm using OCaml 4.06.1 and I&#= 39;ve tried it on both Mac OS X (High Sierra) and Ubuntu MATE 17.10. I'= m fine sticking to bytecode.=C2=A0 The opam package installs correctly but = when you try to run it you get errors from the dynamically-linked libraries= .=C2=A0 On Mac OS X I get this:

# #require "delimcc";;
Cannot load required shared library dlldelimcc.
Reason: /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so: dlopen= (/Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so, 10): Sym= bol not found: _alloc
=C2=A0 Referenced from: /Users/mvanier/.opam/4.06.1/lib/stublibs/dllde= limcc.so
=C2=A0 Expected in: flat namespace
=C2=A0in /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so.

And on Ubuntu I get this:

# #require "delimcc";;
/home/mvanier/.opam/4.06.1/lib/delimcc: added to search path
/home/mvanier/.opam/4.06.1/lib/delimcc/delimcc.cma: loaded
Cannot load required shared library dlldelimcc.
Reason: /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so: dlopen= (/Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelimcc.so, 10): Sym= bol not found: initialize.

However, in either case I can do:

# open Delimcc;;

and it reports no errors, but then if I try e.g.:

# shift;;
Reference to undefined global `Delimcc`

so it appears the library isn't there or isn't functional. Compilin= g from the delimcc source also appears to work, but gcc warns about implici= t declarations of "alloc", "alloc_shr" and "initia= lize" when compiling stacks.c, which makes sense.=C2=A0 Compiling any = of the test programs also fails.

So it appears that this library no longer works.=C2=A0 Does anyone know any= way to make it work?

Thanks in advance,

Mike


--
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/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--f4f5e808ed4c9b68120565d598c2--