caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michael C Vanier <mvanier@cms.caltech.edu>
To: "Nicolás Ojeda Bär" <nicolas.ojeda.bar@lexifi.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Has anybody gotten delimcc to work?
Date: Thu, 22 Feb 2018 15:58:06 -0800	[thread overview]
Message-ID: <3f1c38bf-97e0-c887-c6b4-0c327aecae56@cms.caltech.edu> (raw)
In-Reply-To: <CADK7aFPghmw7bLdnHaPKp0wqcFOO9WXKJF=V6Uf=bq1aPjxgOw@mail.gmail.com>

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

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 <mailto: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
>     <https://sympa.inria.fr/sympa/arc/caml-list>
>     Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>     <http://groups.yahoo.com/group/ocaml_beginners>
>     Bug reports: http://caml.inria.fr/bin/caml-bugs
>     <http://caml.inria.fr/bin/caml-bugs>
>
>


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

  reply	other threads:[~2018-02-22 23:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 23:18 Michael C Vanier
2018-02-22 23:42 ` Nicolás Ojeda Bär
2018-02-22 23:58   ` Michael C Vanier [this message]
2018-02-23  3:18     ` Michael C Vanier
2018-02-23  5:15       ` Nicolás Ojeda Bär
2018-02-23  5:56         ` Michael C Vanier
2018-02-26  5:42         ` Oleg

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=3f1c38bf-97e0-c887-c6b4-0c327aecae56@cms.caltech.edu \
    --to=mvanier@cms.caltech.edu \
    --cc=caml-list@inria.fr \
    --cc=nicolas.ojeda.bar@lexifi.com \
    /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;
as well as URLs for NNTP newsgroup(s).