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 DD6288239C for ; Fri, 23 Feb 2018 06:56:23 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mvanier42@gmail.com; spf=Pass smtp.mailfrom=mvanier42@gmail.com; spf=None smtp.helo=postmaster@mail-io0-f181.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mvanier42@gmail.com) identity=pra; client-ip=209.85.223.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mvanier42@gmail.com"; x-sender="mvanier42@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mvanier42@gmail.com designates 209.85.223.181 as permitted sender) identity=mailfrom; client-ip=209.85.223.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mvanier42@gmail.com"; x-sender="mvanier42@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-io0-f181.google.com) identity=helo; client-ip=209.85.223.181; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mvanier42@gmail.com"; x-sender="postmaster@mail-io0-f181.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3Awz7jxx/iUunj/v9uRHKM819IXTAuvvDOBiVQ1KB2?= =?us-ascii?q?1u4cTK2v8tzYMVDF4r011RmVBd6ds6oMotGVmpioYXYH75eFvSJKW713fDhBt/?= =?us-ascii?q?8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1?= =?us-ascii?q?Ifn+FpLPg8it2O2+55Pebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+?= =?us-ascii?q?RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTF?= =?us-ascii?q?UACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMsrrQ7ApQjSi97lkRwP0iC?= =?us-ascii?q?kJMD459XvYis12jKlGpB6sqBhyz4vSbYqINvRxY7ndcMsaS2RcQMhRWS9PDI2y?= =?us-ascii?q?YIQADeUOIf1VoJPhq1YUtxayGQehCeHpxzRVhnH2x6o60+E5HA/B3QwvA9IOv2?= =?us-ascii?q?7Ko9XxKawfT/2+w6bSwjXFbvNZxy3945XPfxAkv/GDR7RwccvPxkk1GA7JkE6d?= =?us-ascii?q?qYPgPzyP1+QNt3KX4PZnVeKqkmMqrRx6rDaoxscpkIbJh4QVx0jF9SV/2oY1JM?= =?us-ascii?q?e3RFR1Yd6+CJdQuCCaN5d2QsM/WG5kojo1yroDuZKjfCkF0pQnxxnYa/Cdb4eI?= =?us-ascii?q?5RfjWP6WITd7gXJlebC/iwy18Ui6xe3xUNS/3lVSriddjNXAqnQA2wbQ58WHUP?= =?us-ascii?q?dx4Fmt1DiV2wzO6exIPFg4mbTaJpI93rI9k4cfvEbfEiPqnUj7jLKZe0Y49uWt?= =?us-ascii?q?9uvrf67pqoOZOoJ3kA7yL6Ejl8KwDOsjMwUDWmmW9Oei2LL/+ED2XqhFguMona?= =?us-ascii?q?TfrZvUP94UprSjDA9Qyosj6wiwDzOh0NkAmHkINlNFeBaeg4joPFHCPOn0Dfmi?= =?us-ascii?q?j1mvjTtn3f/GPrrmApXCKnjMjq3tcqp6605Z0AYzzNZf6IxICrwZPv7/Rkv8uM?= =?us-ascii?q?bbAxI5KQC43fjrBdtn2o8DWm+DH7eVMKbIvl+J4uIvLfOMZIgQuDvlLvgl+eTh?= =?us-ascii?q?jXk4mVADZ6mk0oUbZWu3HvRjOUqZYH7sjs0dHmcNuwoyVPbqh0GaUT5Pe3ayWL?= =?us-ascii?q?ox6S0hB4KjCYfPX4StgL2a3CenBZBWfWBHClWUEXjybYmEWvEMaDiTIsB7iDAE?= =?us-ascii?q?W6KhGMcd0kSItQT9zzN8Gc3W9yERgrhvzpAh4ezYkhU77npzDcmR2ieHRntcmm?= =?us-ascii?q?4YRjE3mqt4pBou5E2E1P1dgvdYHNFXr9gBbA48NJPGh7h/Fdn0Ww/bIo2hR1Ov?= =?us-ascii?q?Q9HgCjY0GIFii+QSalpwTo3xxivI2DCnVuNEzu3ZNNkP6qvZmkPJCYN4wnfC2r?= =?us-ascii?q?MmigB/EMRKPGyiwKV48lqKXtKbowCij6+vMJ8k8mvV7m7alDiBuUhZVEh7VqCX?= =?us-ascii?q?BSlCNHuTlszw4wb5d5HrCbkjNVEfm8uLK68Pa9qxyFsfFK6lN9PZbGa83Wy3AE?= =?us-ascii?q?TQyw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DcAQA2rI9ahrXfVdFcGgEBAQEBAgEBA?= =?us-ascii?q?QEIAQEBAYJ8gTmBGINomCGBUDJ7G4FQhimOaYICCiOFEAKCLhkHBDMVAQIBAQE?= =?us-ascii?q?BAQEBAQESAQEBCAsLCCgvgjgMgl8BAQEDASMEGQEbEgsBAwELBgUYDRMHAwICI?= =?us-ascii?q?QIRAQUBCgERBg0GAgEBDgmJbwEDDQgBD58uQIwXgW0YBQEcJoJlBYNfChknAwp?= =?us-ascii?q?ZWYIeAQEBAQEFAQEBAQEBAQEYAgYJAQiFBoE1coM9KYJONoJqLQwLAgKBNwUBE?= =?us-ascii?q?gFMgmqCZQWBLQEBh0oMimWQITQBBwEBgXMKhiyECIRThypniSKIHIscgnBIiSk?= =?us-ascii?q?CBAIEBQIGFCWBFzWBA3FNI0+BHYEmCYISKh+CM1eKG4I+AQEB?= X-IPAS-Result: =?us-ascii?q?A0DcAQA2rI9ahrXfVdFcGgEBAQEBAgEBAQEIAQEBAYJ8gTm?= =?us-ascii?q?BGINomCGBUDJ7G4FQhimOaYICCiOFEAKCLhkHBDMVAQIBAQEBAQEBAQESAQEBC?= =?us-ascii?q?AsLCCgvgjgMgl8BAQEDASMEGQEbEgsBAwELBgUYDRMHAwICIQIRAQUBCgERBg0?= =?us-ascii?q?GAgEBDgmJbwEDDQgBD58uQIwXgW0YBQEcJoJlBYNfChknAwpZWYIeAQEBAQEFA?= =?us-ascii?q?QEBAQEBAQEYAgYJAQiFBoE1coM9KYJONoJqLQwLAgKBNwUBEgFMgmqCZQWBLQE?= =?us-ascii?q?Bh0oMimWQITQBBwEBgXMKhiyECIRThypniSKIHIscgnBIiSkCBAIEBQIGFCWBF?= =?us-ascii?q?zWBA3FNI0+BHYEmCYISKh+CM1eKG4I+AQEB?= X-IronPort-AV: E=Sophos;i="5.47,382,1515452400"; d="scan'208,217";a="255837044" Received: from mail-io0-f181.google.com ([209.85.223.181]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Feb 2018 06:56:21 +0100 Received: by mail-io0-f181.google.com with SMTP id l12so8608522ioc.10 for ; Thu, 22 Feb 2018 21:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=KSEdRybBNHrannOLKWmsl+AiQsNOgsKvxBnZaoOpc9M=; b=DXiGQ8866KZnOX4hfmmgn6ZEcpTQ3YIigGR6hC2KeUuYTS2dayDdsiei4wH7+IxKDi Bmzj3ry0gg+Ctp5IznE9o4G5QqdHY8J0i7MYUdZGoAp4IIl4nm10Cwl+kxza8xzHWPD4 lGU0U3Zf6pmkK+7AwtpGwXJu73gFDGRuLf8Ch2mg4pe70tqTtgqCN5uJvtSAAB+qa5OA +ooKeoxyiBcrDdB4u4NiWFYsEE53ze87invVTs6xvvS2/vn5LfFpON583iWfdLz6FqQr Z/BpqCmmE3+VtZp58UPBGK6dkyHX1DwLIDa43rTFl82ZcmBCnwQ2SRHXaKdPk2Ajhrsu 8ymA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=KSEdRybBNHrannOLKWmsl+AiQsNOgsKvxBnZaoOpc9M=; b=YK1R2FmWmSscwygEDG7kC/bsr/0bdXTtWMa+lTQAYpawfnItNB6Qc+y8NCgcFLNKou Jw2U4c6y/rdH5oGKDdaRB4i/GrJlnoLY52fza4vyn6JRi3B/20rFTu1G+RXEyiyYbDN5 E+24krAoFRCPhEMcC4nQoypcs8OOB07RzW3Sxp5Y3yDU6DrQ99fn+jKmkKI1DztbL0e+ Az0uaHj8PQ6t3wIYf9kjTh67yrRKm9D5Y0sPjwKByXN/9ro3ByPNLNyLcKtpUGHJLcc/ x5JK8cmXn3SKGG4wcETImyffi/Byyss0CitgJgiWx1EcO59zII+C/MheXx56leNyZB0x 20fQ== X-Gm-Message-State: APf1xPCD79JK3Zhw1Nv/VPj1jhmTgUtSfLQMHtiENVUFyRcELREix479 ZTvLYscpnzP68jPxCRLpYEZB4QrE X-Google-Smtp-Source: AG47ELvGCMIUYlMxs0joMVjv2awkBN5coFvKncncG6njqPf3tCVdGHwdPkBWUo78/0/8/3HSKmdaOw== X-Received: by 10.107.11.77 with SMTP id v74mr589725ioi.28.1519365379874; Thu, 22 Feb 2018 21:56:19 -0800 (PST) Received: from MICHAELs-Pro.attlocal.net ([2600:1700:5d80:d1b0:8a1:34b6:682c:ed2e]) by smtp.gmail.com with ESMTPSA id j130sm742061ita.33.2018.02.22.21.56.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 21:56:18 -0800 (PST) From: Michael C Vanier X-Google-Original-From: Michael C Vanier To: =?UTF-8?Q?Nicol=c3=a1s_Ojeda_B=c3=a4r?= Cc: caml-list References: <7441c664-00ae-c125-9ce4-80e5a67fcd8e@cms.caltech.edu> <3f1c38bf-97e0-c887-c6b4-0c327aecae56@cms.caltech.edu> Message-ID: <321eca40-e0df-a38f-6c17-a258dc2360c3@cms.caltech.edu> Date: Thu, 22 Feb 2018 21:56:17 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------27FD8C0E11C655F21C3BD1C3" Content-Language: en-US X-Validation-by: mvanier42@gmail.com Subject: Re: [Caml-list] Has anybody gotten delimcc to work? This is a multi-part message in MIME format. --------------27FD8C0E11C655F21C3BD1C3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Thanks again, Nicolas! Mike On 2/22/18 9:15 PM, Nicolás Ojeda Bär wrote: > 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ás > > > 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: > > ===== > > > opam install opam-publish > The following dependencies couldn't be met: >   - opam-publish -> opam-lib (= 1.2.0 | = 1.2.2) -> dose < 3.4.0 > -> extlib < 1.7.0 >   - opam-publish -> opam-lib (= 1.2.0 | = 1.2.2) -> dose < 3.4.0 > -> extlib-compat < 1.7.0 >   - opam-publish -> opam-lib (= 1.2.0 | = 1.2.2) -> dose < 3.4.0 > -> ocamlgraph <= 1.8.5 >   - opam-publish -> publish -> opam-publish > 0.3.4 -> opam-lib > > 1.2.2 -> jsonm -> uutf (<= 0.9.4 | >= 1.0.0) >   - opam-publish -> publish -> opam-publish > 0.3.4 -> opam-lib > > 1.2.2 -> cmdliner <= 0.9.8 >   - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> > cmdliner <= 0.9.8 >   - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> > dose < 3.4.0 -> ocamlgraph <= 1.8.5 >   - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> > dose < 3.4.0 -> extlib-compat < 1.7.0 >   - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> > dose < 3.4.0 -> extlib < 1.7.0 >   - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> > jsonm -> uutf (<= 0.9.4 | >= 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<=1.8.5 is not available because your system doesn't > comply with ocaml-version < "4.06.0". >   - uutf<=0.9.4 is not available because your system doesn't > comply with ocaml-version >= "4.00.0" & ocaml-version < "4.06.0". > > No solution found, exiting > > ===== > > 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ás Ojeda Bär 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 = alloc(size, 0); >>> +    block = caml_alloc(size, 0); >>>      memcpy(&Field(block, 0), tp2, size * sizeof(value)); >>>    } else { >>> -    block = alloc_shr(size, 0); >>> +    block = caml_alloc_shr(size, 0); >>>      mlsize_t i; >>>      for (i = 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ás >>> >>> >>> >>> 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 fails. >>> >>> 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 >>> >>> >>> >> > > --------------27FD8C0E11C655F21C3BD1C3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Thanks again, Nicolas!

Mike


On 2/22/18 9:15 PM, Nicolás Ojeda Bär wrote:
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ás


On Fri, Feb 23, 2018 at 4:18 AM, Michael C Vanier <mvanier42@gmail.com> 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:

=====

> opam install opam-publish
The following dependencies couldn't be met:
  - opam-publish -> opam-lib (= 1.2.0 | = 1.2.2) -> dose < 3.4.0 -> extlib < 1.7.0
  - opam-publish -> opam-lib (= 1.2.0 | = 1.2.2) -> dose < 3.4.0 -> extlib-compat < 1.7.0
  - opam-publish -> opam-lib (= 1.2.0 | = 1.2.2) -> dose < 3.4.0 -> ocamlgraph <= 1.8.5
  - opam-publish -> publish -> opam-publish > 0.3.4 -> opam-lib > 1.2.2 -> jsonm -> uutf (<= 0.9.4 | >= 1.0.0)
  - opam-publish -> publish -> opam-publish > 0.3.4 -> opam-lib > 1.2.2 -> cmdliner <= 0.9.8
  - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> cmdliner <= 0.9.8
  - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> dose < 3.4.0 -> ocamlgraph <= 1.8.5
  - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> dose < 3.4.0 -> extlib-compat < 1.7.0
  - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> dose < 3.4.0 -> extlib < 1.7.0
  - opam-publish -> publish -> opam-lib (= 1.2.2 | > 1.2.2) -> jsonm -> uutf (<= 0.9.4 | >= 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<=1.8.5 is not available because your system doesn't comply with ocaml-version < "4.06.0".
  - uutf<=0.9.4 is not available because your system doesn't comply with ocaml-version >= "4.00.0" & ocaml-version < "4.06.0".

No solution found, exiting

=====

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ás Ojeda Bär 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 = alloc(size, 0);
+    block = caml_alloc(size, 0);
     memcpy(&Field(block, 0), tp2, size * sizeof(value));
   } else {
-    block = alloc_shr(size, 0);
+    block = caml_alloc_shr(size, 0);
     mlsize_t i;
     for (i = 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ás



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 fails.

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





--------------27FD8C0E11C655F21C3BD1C3--