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 8C2658239C for ; Fri, 23 Feb 2018 06:15:41 +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=3AoJPqNR/rxY2N3P9uRHKM819IXTAuvvDOBiVQ1KB2?= =?us-ascii?q?2ukcTK2v8tzYMVDF4r011RmVBd6ds6oMotGVmpioYXYH75eFvSJKW713fDhBt/?= =?us-ascii?q?8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1?= =?us-ascii?q?Ifn+FpLPg8it2O2+55Pebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+?= =?us-ascii?q?RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTF?= =?us-ascii?q?UACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMNboRr4oRzut86ZrSAfpiC?= =?us-ascii?q?gZMT457HrXgdF0gK5CvR6tuwBzz4vSbY6SKfR+Y7jdfcsESmVdQsZfWStBAoam?= =?us-ascii?q?YIsOCeoKIOJUoob5qlcLqxa1GAuiC/71yjJQhHD206003eoiHw/bwgIvA8kDv2?= =?us-ascii?q?7IoNjvLqoeTfy5wavOwD7eb/1WwzD96I3Qfx45oPGDQbVwcc7Tzkk0DwzLl1eQ?= =?us-ascii?q?ppL4MDyPzusArm2c7/B9Xu+ojW4nqh1+oj+rxsg2kYnFnIUVylLa+ipk2ok5P8?= =?us-ascii?q?a3R1RhYdO/FJtfqS6bN4p4QsMjWW1npCE6yrgftJO9YSMExpMnxxvFZPyGdYiF?= =?us-ascii?q?+hPjVOCLITd5nn1pYry/hwyq/Uivy+38Ssm00EtRoSZfjtbMsXUN2wTT68edSv?= =?us-ascii?q?t9+UCh1SyT2ADU7+FIOUc0laneK54gwL48jJ0TsV7MHiLwhU74j7eWe1059uWr?= =?us-ascii?q?6+nreLXrq56GO4Nqlg3zPb4il8KhDeggMAUDUHKX9fmi2LDj50H0Q6tGgucrnq?= =?us-ascii?q?Tbsp3XI9kQqLSjDA9PyIkj7g6yDze439QcmnkKNExFeAiAj4j0J1HCPez0Ae2/?= =?us-ascii?q?glu2kTZrxuvJMaf7DpXLMHfDjK/tfbd760FC1Ao+1c1T6pFUB70bIP/+W1X9uM?= =?us-ascii?q?LEAhI2KQC5zfjrBM141owEWGKPBqGZMLnVsV+N/u8vJeiMa5MSuDb5Mfcl/OTi?= =?us-ascii?q?jXg7mVADYKamx4EbZ2uiEfR8OEiZZWTjg9gAEWcEvwoyVvDliFqHUTJLfXa9Q7?= =?us-ascii?q?o85i0nCIKhFYrMWpqigLmF3CuiGp1WZ3tGCkyXHHfzd4SEXu8MZziILs9glDwE?= =?us-ascii?q?T7mhRJU72RGgrg/2079nLu3J9SIGrZ/jz9115/HLlRE16Dx0E5fV72bYamB/nm?= =?us-ascii?q?oFQ3cdlJ52p01w0B/X1LZxhf1VD/RY4ugPWQ4+KZPXz6p3B82kCSzbedLcblet?= =?us-ascii?q?RdEvGgYWTN89yugk71w1T9OjhRfH1jHsBL0Ym7XNDpUu2qbRz3n/JoB2zHOQh/?= =?us-ascii?q?pptEUvXsYabT7uvaV47QWGQtOQyhTLp+ORba0ZmRX12iKGxGuKsltfVVcqA6HI?= =?us-ascii?q?TXERZw3dqtGrvRqeHY/rMqwuN0568eDHMrFDM4e7iVhWRfnift/ZZjDpwjriNV?= =?us-ascii?q?Oz3rqJKbHSVSAd0SHaUhBWjRoU4GrfbU4vDzWgqWuYCjFyRwri?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0B4AQALo49ahyDMOLlcDgwBAQEBAQIBA?= =?us-ascii?q?QEBCAEBAQGENXAoCoNegTmIbI18ggITaBuBUIEbhRaOTRSCAgojhRACgicHGQs?= =?us-ascii?q?FKxgBAgEBAQEBAQEBARIBAQEKCwkIKC+COCSCRwEBAQMBIwRHCwULCwsNDR0CA?= =?us-ascii?q?iEBEgEFAQoSBhMSCYlwAw0IBAELnzNAjBeBbTomhxMDCoEMJoIeAQEBAQYBAQE?= =?us-ascii?q?BAQEBIYUYgieDPYJ3NoJqLQwLAgKBNwUBEgGDNoJlBYh5DJsGNQmIKYQIhFOFC?= =?us-ascii?q?4IfZ5E+ixyCcEiJQhQFIIEVAg8QgRlxcE8xBoIMCYISSYFTQHeKG4I+AQEB?= X-IPAS-Result: =?us-ascii?q?A0B4AQALo49ahyDMOLlcDgwBAQEBAQIBAQEBCAEBAQGENXA?= =?us-ascii?q?oCoNegTmIbI18ggITaBuBUIEbhRaOTRSCAgojhRACgicHGQsFKxgBAgEBAQEBA?= =?us-ascii?q?QEBARIBAQEKCwkIKC+COCSCRwEBAQMBIwRHCwULCwsNDR0CAiEBEgEFAQoSBhM?= =?us-ascii?q?SCYlwAw0IBAELnzNAjBeBbTomhxMDCoEMJoIeAQEBAQYBAQEBAQEBIYUYgieDP?= =?us-ascii?q?YJ3NoJqLQwLAgKBNwUBEgGDNoJlBYh5DJsGNQmIKYQIhFOFC4IfZ5E+ixyCcEi?= =?us-ascii?q?JQhQFIIEVAg8QgRlxcE8xBoIMCYISSYFTQHeKG4I+AQEB?= X-IronPort-AV: E=Sophos;i="5.47,382,1515452400"; d="scan'208,217";a="314943747" 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 06:15:30 +0100 Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout10.yaziba.net (mx10.yaziba.net) with ESMTPS id 3C11E5237A for ; Fri, 23 Feb 2018 06:15:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id 42F2F160243 for ; Fri, 23 Feb 2018 06:15:30 +0100 (CET) X-Virus-Scanned: amavisd-new at mtaout20.int.yaziba.net Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5OW-6EaIBee6 for ; Fri, 23 Feb 2018 06:15:30 +0100 (CET) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id B22A51601AA for ; Fri, 23 Feb 2018 06:15:29 +0100 (CET) Received: by mail-ot0-f177.google.com with SMTP id f18so6705337otf.6 for ; Thu, 22 Feb 2018 21:15:29 -0800 (PST) X-Gm-Message-State: APf1xPBPxjME5DUC4upqoWq/wyB90UPhC7+fcd4nxdpj/aS7RAFj3vjc NLhDBd85m8W7E+51lCjsYLmPusLJW5+ds/tYoRU= X-Google-Smtp-Source: AG47ELs17ZE25I9Ug5+3JnTqS8b2l+NYfXk5+uOtcMeyM7e9IulfwzpU6UP7kkVZcEaLI251OoLt5fJCxb99h3CcXWw= X-Received: by 10.157.55.182 with SMTP id x51mr275411otb.200.1519362928408; Thu, 22 Feb 2018 21:15:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.139.125 with HTTP; Thu, 22 Feb 2018 21:15:07 -0800 (PST) In-Reply-To: References: <7441c664-00ae-c125-9ce4-80e5a67fcd8e@cms.caltech.edu> <3f1c38bf-97e0-c887-c6b4-0c327aecae56@cms.caltech.edu> From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Fri, 23 Feb 2018 06:15:07 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Michael C Vanier Cc: caml-list Content-Type: multipart/alternative; boundary="001a113f3178a1fef30565da3f4e" X-DRWEB-SCAN: ok X-VRSPAM-SCORE: -51 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrheeggdejjecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepjghfhfffkffuvfgtsegrtderredttdejnecuhfhrohhmpefpihgtohhljohspgfqjhgvuggrpgeumohruceonhhitgholhgrshdrohhjvggurgdrsggrrheslhgvgihifhhirdgtohhmqeenucffohhmrghinhepihhnrhhirgdrfhhrpdhgihhthhhusgdrtghomhdphigrhhhoohdrtghomhdpohhkmhhijhdrohhrghenucfkphepjeegrdduvdehrdekvddrudejjeenucfrrghrrghmpehmohguvgepshhmthhpohhuth X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Has anybody gotten delimcc to work? --001a113f3178a1fef30565da3f4e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Mike, Indeed the opam-repository is just a bunch of metadata and the opam-publish tool is used to update this metadata. Typically this is done by the opam package maintainer which may or may not be the package author (the latter in this case). In order to submit a patch to the delimcc package you need to figure out the upstream repository. Typically you can do this by looking in the opam metadata. In this case, the opam package is maintained at https://github.com/zinid/delimcc, but there is no public repository of the upstream source, rather it is distributed as a tar file by the author (Oleg Kiselyov; see http://okmij.org/ftp/continuations/implementations.html#caml-shift). I went ahead and submitted a patch to the package maintainer ( https://github.com/zinid/delimcc/pull/1) and also sent it by email to Oleg so that the upstream sources can be amended. Best wishes, Nicol=C3=A1s On Fri, Feb 23, 2018 at 4:18 AM, Michael C Vanier wrote: > So... I was trying to figure out how to make a pull request on the delimcc > repo (if there is one) and it was an exercise in frustration. The > "opam-publish" tool doesn't seem to work anymore with recent ocaml builds > due to a nest of dependency issues: > > =3D=3D=3D=3D=3D > > > opam install opam-publish > The following dependencies couldn't be met: > - opam-publish -> opam-lib (=3D 1.2.0 | =3D 1.2.2) -> dose < 3.4.0 -> e= xtlib > < 1.7.0 > - opam-publish -> opam-lib (=3D 1.2.0 | =3D 1.2.2) -> dose < 3.4.0 -> > extlib-compat < 1.7.0 > - opam-publish -> opam-lib (=3D 1.2.0 | =3D 1.2.2) -> dose < 3.4.0 -> > ocamlgraph <=3D 1.8.5 > - opam-publish -> publish -> opam-publish > 0.3.4 -> opam-lib > 1.2.2 -> > jsonm -> uutf (<=3D 0.9.4 | >=3D 1.0.0) > - opam-publish -> publish -> opam-publish > 0.3.4 -> opam-lib > 1.2.2 -> > cmdliner <=3D 0.9.8 > - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> cmdliner= <=3D > 0.9.8 > - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> dose < > 3.4.0 -> ocamlgraph <=3D 1.8.5 > - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> dose < > 3.4.0 -> extlib-compat < 1.7.0 > - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> dose < > 3.4.0 -> extlib < 1.7.0 > - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> jsonm -> > uutf (<=3D 0.9.4 | >=3D 1.0.0) > Your request can't be satisfied: > - cmdliner.0.9.4 is in conflict with uutf.1.0.1 > - extlib-compat<1.7.0 is not available because your system doesn't > comply with ocaml-version < "4.05.0". > - extlib<1.7.0 is not available because your system doesn't comply with > ocaml-version < "4.05.0". > - ocamlgraph.1.8.5 is not available because your system doesn't comply > with ocaml-version < "4.06.0". > - ocamlgraph<=3D1.8.5 is not available because your system doesn't comp= ly > with ocaml-version < "4.06.0". > - uutf<=3D0.9.4 is not available because your system doesn't comply with > ocaml-version >=3D "4.00.0" & ocaml-version < "4.06.0". > > No solution found, exiting > > =3D=3D=3D=3D=3D > > I tried forking the opam-repository repo but there is only metadata about > the various packages and not the actual code to make a patch on. Is there > some documentation on how to submit a bug fix to a package? Sorry if this > is a dumb question. > > Mike > > On 2/22/18 3:58 PM, Michael C Vanier wrote: > > It works! Thank you so much Nicolas! > > Mike > > On 2/22/18 3:42 PM, Nicol=C3=A1s Ojeda B=C3=A4r wrote: > > 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 < > mvanier@cms.caltech.edu> 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 fa= ils. >> >> 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 >> > > > > --001a113f3178a1fef30565da3f4e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Mike,

Indeed the opam-repository = is just a bunch of metadata and the opam-publish tool is used to update thi= s metadata. Typically this is done by the opam package maintainer which may= or may not be the package author (the latter in this case).

=
In order to submit a patch to the delimcc package you need to fi= gure out the upstream repository. Typically you can do this by looking in t= he opam metadata. In this case, the opam package is maintained at=C2=A0https://github.com/zinid/delimcc, but there is no public repository of the upstream source, rather it is = distributed as a tar file by the author (Oleg Kiselyov; see http://okmi= j.org/ftp/continuations/implementations.html#caml-shift).
I went ahead and submitted a patch to the package maintainer (<= a href=3D"https://github.com/zinid/delimcc/pull/1">https://github.com/zinid= /delimcc/pull/1) and also sent it by email to Oleg so that the upstream= sources can be amended.

Best wishes,
Ni= col=C3=A1s


On Fri, Feb 23, 2018 at 4:18 AM, Michael C Vanier <m= vanier42@gmail.com> wrote:
=20=20 =20=20=20=20 =20=20

So... I was trying to figure out how to make a pull request on the delimcc repo (if there is one) and it was an exercise in frustration.=C2=A0 The "opam-publish" tool doesn't seem= to work anymore with recent ocaml builds due to a nest of dependency issues:

=3D=3D=3D=3D=3D

> opam install opam-publish
The following dependencies couldn't be met:
=C2=A0 - opam-publish -> opam-lib (=3D 1.2.0 | =3D 1.2.2) -> do= se < 3.4.0 -> extlib < 1.7.0
=C2=A0 - opam-publish -> opam-lib (=3D 1.2.0 | =3D 1.2.2) -> do= se < 3.4.0 -> extlib-compat < 1.7.0
=C2=A0 - opam-publish -> opam-lib (=3D 1.2.0 | =3D 1.2.2) -> do= se < 3.4.0 -> ocamlgraph <=3D 1.8.5
=C2=A0 - opam-publish -> publish -> opam-publish > 0.3.4 -&g= t; opam-lib > 1.2.2 -> jsonm -> uutf (<=3D 0.9.4 | >=3D 1.0.0)
=C2=A0 - opam-publish -> publish -> opam-publish > 0.3.4 -&g= t; opam-lib > 1.2.2 -> cmdliner <=3D 0.9.8
=C2=A0 - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> cmdliner <=3D 0.9.8
=C2=A0 - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> dose < 3.4.0 -> ocamlgraph <=3D 1.8.5
=C2=A0 - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> dose < 3.4.0 -> extlib-compat < 1.7.0
=C2=A0 - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> dose < 3.4.0 -> extlib < 1.7.0
=C2=A0 - opam-publish -> publish -> opam-lib (=3D 1.2.2 | > 1.2.2) -> jsonm -> uutf (<=3D 0.9.4 | >=3D 1.0.0)
Your request can't be satisfied:
=C2=A0 - cmdliner.0.9.4 is in conflict with uutf.1.0.1
=C2=A0 - extlib-compat<1.7.0 is not available because your system doesn't comply with ocaml-version < "4.05.0".
=C2=A0 - extlib<1.7.0 is not available because your system doesn&#= 39;t comply with ocaml-version < "4.05.0".
=C2=A0 - ocamlgraph.1.8.5 is not available because your system doesn&= #39;t comply with ocaml-version < "4.06.0".
=C2=A0 - ocamlgraph<=3D1.8.5 is not available because your system doesn't comply with ocaml-version < "4.06.0".
=C2=A0 - uutf<=3D0.9.4 is not available because your system doesn&= #39;t comply with ocaml-version >=3D "4.00.0" & ocaml-vers= ion < "4.06.0".

No solution found, exiting

=3D=3D=3D=3D=3D

I tried forking the opam-repository repo but there is only metadata about the various packages and not the actual code to make a patch on.=C2=A0 Is there some documentation on how to submit a bug fix to a package?=C2=A0 Sorry if this is a dumb question.

Mike


On 2/22/18 3:58 PM= , Michael C Vanier wrote:
=20=20=20=20=20=20

It works!=C2=A0 Thank you so much Nicolas!

Mike


On 2/22/18 3:42 = PM, Nicol=C3=A1s Ojeda B=C3=A4r wrote:
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:

=C2=A0 opam source delimcc
=C2=A0 cd delimcc.(version)
=C2=A0 (apply patch)
=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/stacks.c
@@ -203,13 +203,13 @@ value copy_stack_fragment(const value vek1)
=C2=A0#endif
=C2=A0
=C2=A0 =C2=A0if (size < 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(&Field(block, i), tp2= [i]);
+ =C2=A0 =C2=A0 =C2=A0caml_initialize(&Field(block, i)= , tp2[i]);
=C2=A0 =C2=A0}
=C2=A0
=C2=A0 =C2=A0/* We check the invariants after the allocati= on of block, which may
@@ -382,4 +382,3 @@ value dbg_note(const value message)
=C2=A0 =C2=A0fprintf(stderr,"%s\n",String_v= al(message));
=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 <mvanier@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'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/dlldeli= mcc.so: dlopen(/Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelim= cc.so, 10): Symbol not found: _alloc
=C2=A0 Referenced from: /Users/mvanier/.opam/4.06.1/lib/= stublibs/dlldelimcc.so
=C2=A0 Expected in: flat namespace
=C2=A0in /Users/mvanier/.opam/4.06.1/lib/stublibs/dlldel= imcc.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/dlldeli= mcc.so: dlopen(/Users/mvanier/.opam/4.06.1/lib/stublibs/dlldelim= cc.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 functi= onal. Compiling from the delimcc source also appears to work, but gcc warns about implicit declarations of "alloc"= ;, "alloc_shr" and "initialize" when compili= ng 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/ca= ml-list
Beginner's list: http://groups.ya= hoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-= bugs




--001a113f3178a1fef30565da3f4e--