caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: oleg@okmij.org
To: omeragacan@gmail.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] MetaOCaml error while running generated code that
Date: Thu, 14 May 2015 07:43:01 -0400 (EDT)	[thread overview]
Message-ID: <20150514114301.656F4C3854@www1.g3.pair.com> (raw)
In-Reply-To: <CAMQQO3njz9GmUcK47EgHcBFd81CGRz5_L_Krda8npC=tAY5wbA@mail.gmail.com>


[I have trouble posting on the caml-list at the moment. If you don't
see this message appearing on the Caml-list, could you forward it
please?]

> I just tried this on my program and now it's failing with this error:
>
>   ./unlambda_metaocaml programs/Hello.unl -compile
>   Fatal error: exception Symtable.Error(_)
>
> Does that look familiar?

Such errors usually indicate a linking problem: something was not
linked in or was not found. In fact, this specific error is emitted in
the following four cases:

  >   Undefined_global of string
  > | Unavailable_primitive of string
  > | Wrong_vm of string
  > | Uninitialized_global of string

I think the most likely problem was Undefined_global: that is, the
generated code you run depends on some .cmo file, which could not be
located. All needed .cmo files should either be in the current
directory, the standard library directory, or the directories you
specifically add to the search path of the evaluator. There is a
special function in the Runcode module that lets you set the search
path. For an example, please see the file
        metalib/test/test_path.ml
in the MetaOCaml distribution.



      reply	other threads:[~2015-05-14 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 17:54 [Caml-list] MetaOCaml error while running generated code that needs -rectypes Ömer Sinan Ağacan
2015-05-07 15:59 ` oleg
2015-05-07 21:49   ` Ömer Sinan Ağacan
     [not found]     ` <20150510163426.EC8B1C38CA@www1.g3.pair.com>
2015-05-12 21:01       ` [Caml-list] MetaOCaml error while running generated code that Ömer Sinan Ağacan
2015-05-14 11:43         ` oleg [this message]

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=20150514114301.656F4C3854@www1.g3.pair.com \
    --to=oleg@okmij.org \
    --cc=caml-list@inria.fr \
    --cc=omeragacan@gmail.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).