colis-anr / morbig

A static parser for POSIX Shell
Other
192 stars 8 forks source link

using bytecode library #69

Closed treinen closed 5 years ago

treinen commented 5 years ago

I don't know whether I did something stupid in the debian package but:


$ cat parse.ml 
let script=Sys.argv.(1)
let cst=Morbig.parse_file script
let _ = Morbig.save_binary_cst (open_out (script^".bin")) cst

$ ocamlbuild -use-ocamlfind parse.byte
Finished, 3 targets (3 cached) in 00:00:00.
$ ./parse.byte scripts/simple.sh
Fatal error: cannot load shared library dllmorbig_stubs
Reason: /usr/lib/ocaml/stublibs/dllmorbig_stubs.so: undefined symbol: caml_startup
''''

If I use ocamlbuild to build parse.native instead it works fine.

-Ralf.
treinen commented 5 years ago

I should say that this is with the morbig release 0.10.1.

Niols commented 5 years ago

Oh, I hadn't seen that coming. It has to do with the way the C library is built. It's pretty annoying, but I know what to do to fix this.

Niols commented 5 years ago

This should be fixed (in a dirty way, but it's a limitation in Dune) in the last commit. Can you confirm that?

treinen commented 5 years ago

On Wed, Feb 27, 2019 at 03:54:06PM -0800, Nicolas Jeannerod wrote:

This should be fixed (in a dirty way, but it's a limitation in Dune) in the last commit. Can you confirm that?

No, it is unfortunately still the same. -Ralf. -- Ralf Treinen Institut de Recherche en Informatique Fondamentale Équipe Preuves, Programmes et Systèmes Université Paris Diderot, Paris, France. http://www.irif.fr/~treinen/

Niols commented 5 years ago

Have you cleaned ocamlbuild's cache? I've had this problem yesterday.

treinen commented 5 years ago

On Thu, Feb 28, 2019 at 04:03:20AM -0800, Nicolas Jeannerod wrote:

Have you cleaned ocamlbuild's cache? I've had this problem yesterday.

the debian build tool compiles anyway in a fresh copy of the source tree, so there cannt be a cache in the source tree. Can there be any other cache of ocamlbuild ?

-Ralf.

treinen commented 5 years ago

Stupid me. I was looking at the last released version 0.10.2. Yes, i confirm that this is fixed. Thanks!