On Tue, 13 Oct 2015, Luis R. Rodriguez wrote:

> On Tue, Oct 13, 2015 at 1:26 PM, Julia Lawall <julia.law...@lip6.fr> wrote:
> > On Tue, 13 Oct 2015, Luis R. Rodriguez wrote:
> >
> >> I'm trying to build coccinelle to use on opensuse for a cocci file
> >> with iteration support. I'm using the latest and greatest (inria git).
> >>
> >> After ./autogen and and then configuring with --enable-release:
> >>
> >> configure flags:  --enable-release
> >> findlib:          /usr/bin/ocamlfind (an actual version is strongly 
> >> recommended)
> >> menhir:           /usr/local/bin//menhir (should be an optional tool)
> >> menhirLib module: yes (for local package use --disable-menhirLib)
> >>
> >> ocaml scripting:  yes (overridable with --enable-ocaml)
> >> python scripting: yes (overridable with --enable-python)
> >> pycaml module:    local (for local package use --disable-pycaml)
> >>
> >> pcre regexes:     local (overridable with --enable-pcre-syntax)
> >> pcre module:      local (for local package use --disable-pcre)
> >> pcre library:     yes (requires the dev version of libpcre)
> >>
> >> release config:   yes (strongly recommended to be 'yes', overridable
> >> with --enable-release)
> >> optimized spatch: yes (overridable with --disable-opt)
> >>
> >> My build fails with:
> >>
> >> /usr/bin/ocamlopt.opt -unsafe -I ../commons -I ../commons/ocamlextra
> >> -I ../globals -I /usr/lib64/ocaml/menhirLib -c parser_cocci_menhir.ml
> >> File "parser_cocci_menhir.ml", line 1:
> >> Error: The files /usr/lib64/ocaml/obj.cmi
> >>        and /usr/lib64/ocaml/menhirLib/menhirLib.cmi
> >>        make inconsistent assumptions over interface Obj
> >
> > Try make clean, or make distclean.  If you had a build without ocaml, you
> > may have some old code lying around.

Ah, OK sorry, it may have nothing to do with Coccinelle.  How did you 
install menhir?  And how did you install ocaml?  It looks like there may 
be files generated by different versions of ocaml in your lib64 directory.

Could you try the following:

file /usr/lib64/ocaml/obj.cmi
file /usr/lib64/ocaml/menhirLib/menhirLib.cmi

It should tell you what version of ocaml generated the files.

julia

> Instead of 'make clean' or 'make distclean' I do:
> 
> git clean -f -x -d
> 
> Its faster than 'make clean' but caution: this will delete *anything*
> from your tree that is *not* in a git record, so watch out. Only try
> this on a repo you don't care about.
> 
> Even if I try make distclean things still fail, as suspected. I've
> tried all combination all around with distclean, clean etc.
> 
> mcgrof@ergon ~/devel/coccinelle (git::master)$ rpm -qa | grep ocaml
> ocaml-ocamldoc-4.02.3-1.1.x86_64
> ocaml-runtime-4.02.3-1.1.x86_64
> ocaml-camlp4-devel-4.02.1-1.5.x86_64
> ocaml-facile-1.1-193.6.x86_64
> ocaml-4.02.3-1.1.x86_64
> ocaml-camlp4-4.02.1-1.5.x86_64
> ocaml-findlib-1.5.5-1.6.x86_64
> ocaml-compiler-libs-4.02.3-1.1.x86_64
> 
> All these seem to be up to date.
> 
>  Luis
> 
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to