Skip to contentSkip to conversation

Error: Unbound value Common.union_set

Cocci Emil Medve 3 participants 8 messages Jan 5, 2015 – Jan 7, 2015

lore
Share & tools
lore

Emil Medve

author
#0 lore raw

Hello,

I'm seeing the following errors:

Quoted 16 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,

#1 lore raw
Quoted 7 lines · Emil Medve

Hello,

I'm seeing the following errors:

Quoted 2 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set

This is really strange. What semantic patch are you running?

Could you try spatch --sp-file us.cocci us.c

where us.cocci is:

@script:ocaml@
@@

let _ = Common.union_set [1;2] [3] in
Printf.printf "ok\n"

@@
@@

- foo();

and us.c is:

int main () {
foo();
}

thanks,
julia

Quoted 42 lines
Quoted 14 lines

File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

author
#2 lore raw

Hello Julia,

Quoted 11 lines · Julia Lawall
Quoted 7 lines · Emil Medve

Hello,

I'm seeing the following errors:

Quoted 2 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set

This is really strange. What semantic patch are you running?

All of them as I'm not using COCCI=... to select some specific single patch. I'll narrow it down a bit and get back to you

Quoted 13 lines

Could you try spatch --sp-file us.cocci us.c

where us.cocci is:

@script:ocaml@
@@

let _ = Common.union_set [1;2] [3] in
Printf.printf "ok\n"

@@
@@

Quoted 7 lines

- foo();

and us.c is:

int main () {
foo();
}

I'm sure this makes more sense to you then it makes to me:

Quoted 7 lines
$ spatch --sp-file us.cocci us.c
init_defs_builtins: /usr/lib64/ocaml/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_e217fe.cmxs -g -I /usr/lib64/ocaml  -I /usr/lib64/ocaml/coccinelle//ocaml /tmp/ocaml_cocci_e217fe.ml
File "/tmp/ocaml_cocci_e217fe.ml", line 15, characters 6-36:
Error: Unbound value Iteration.add_pending_instance
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e217fe.ml")

Cheers,

Quoted 44 lines

thanks,
julia

Quoted 41 lines
Quoted 14 lines

File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

#3 lore raw
Quoted 34 lines · Emil Medve

Hello Julia,

Quoted 11 lines · Julia Lawall
Quoted 7 lines · Emil Medve

Hello,

I'm seeing the following errors:

Quoted 2 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set

This is really strange. What semantic patch are you running?

All of them as I'm not using COCCI=... to select some specific single patch. I'll narrow it down a bit and get back to you

Quoted 15 lines

Could you try spatch --sp-file us.cocci us.c

where us.cocci is:

@script:ocaml@
@@

let _ = Common.union_set [1;2] [3] in
Printf.printf "ok\n"

@@
@@

- foo();

Quoted 15 lines
Quoted 5 lines

and us.c is:

int main () {
foo();
}

I'm sure this makes more sense to you then it makes to me:

Quoted 7 lines
$ spatch --sp-file us.cocci us.c
init_defs_builtins: /usr/lib64/ocaml/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_e217fe.cmxs -g -I /usr/lib64/ocaml  -I /usr/lib64/ocaml/coccinelle//ocaml /tmp/ocaml_cocci_e217fe.ml
File "/tmp/ocaml_cocci_e217fe.ml", line 15, characters 6-36:
Error: Unbound value Iteration.add_pending_instance
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e217fe.ml")

Something is completely wrong with your installation.

Where did you get your Coccinelle from? Did you compile it yourself? Maybe it is an ocaml version problem. Your version is newer than mine. I will try to get someone to try with the ocaml version you have.

julia

Quoted 50 lines

Cheers,

Quoted 44 lines

thanks,
julia

Quoted 41 lines
Quoted 14 lines

File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

author
#4 lore raw

Hello Julia,

Quoted 13 lines · Julia Lawall
Quoted 11 lines · Emil Medve

Hello Julia,

Quoted 7 lines · Julia Lawall
Quoted 5 lines · Emil Medve

Hello,

I'm seeing the following errors:

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set

This is really strange. What semantic patch are you running?

All of them as I'm not using COCCI=... to select some specific single patch. I'll narrow it down a bit and get back to you

scripts/coccinelle/null/badzero.cocci

Quoted 3 lines

File "/tmp/ocaml_cocci_cc56de.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cc56de.ml")

This is the only patch that seems to produce unexpected results

Quoted 31 lines
Quoted 15 lines
Quoted 15 lines

Could you try spatch --sp-file us.cocci us.c

where us.cocci is:

@script:ocaml@
@@

let _ = Common.union_set [1;2] [3] in
Printf.printf "ok\n"

@@
@@

- foo();

Quoted 15 lines
Quoted 5 lines

and us.c is:

int main () {
foo();
}

I'm sure this makes more sense to you then it makes to me:

Quoted 7 lines
$ spatch --sp-file us.cocci us.c
init_defs_builtins: /usr/lib64/ocaml/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_e217fe.cmxs -g -I /usr/lib64/ocaml  -I /usr/lib64/ocaml/coccinelle//ocaml /tmp/ocaml_cocci_e217fe.ml
File "/tmp/ocaml_cocci_e217fe.ml", line 15, characters 6-36:
Error: Unbound value Iteration.add_pending_instance
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e217fe.ml")
Quoted 3 lines

Something is completely wrong with your installation.

Where did you get your Coccinelle from?

http://coccinelle.lip6.fr/distrib/coccinelle-1.0.0-rc23.tgz

Quoted 1 line

Did you compile it yourself?

Sort of. This is a Gentoo box. The following self-tests seems to run correctly though:

Quoted 3 lines

./spatch standard.h -parse_c -dir tests/
./spatch -iso_file standard.iso -macro_file_builtins standard.h -testall ./spatch.opt -iso_file standard.iso -macro_file_builtins standard.h -testall

Cheers,

Quoted 56 lines

Maybe it is an ocaml version problem. Your version is newer than mine. I will try to get someone to try with the ocaml version you have.

julia

Quoted 49 lines

Cheers,

Quoted 44 lines

thanks,
julia

Quoted 41 lines
Quoted 14 lines

File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

#5 lore raw

We are looking into it. It seems to be related to the version of ocaml.

julia

Quoted 140 lines · Emil Medve

Hello Julia,

Quoted 13 lines · Julia Lawall
Quoted 11 lines · Emil Medve

Hello Julia,

Quoted 7 lines · Julia Lawall
Quoted 5 lines · Emil Medve

Hello,

I'm seeing the following errors:

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set

This is really strange. What semantic patch are you running?

All of them as I'm not using COCCI=... to select some specific single patch. I'll narrow it down a bit and get back to you

scripts/coccinelle/null/badzero.cocci

Quoted 3 lines

File "/tmp/ocaml_cocci_cc56de.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cc56de.ml")

This is the only patch that seems to produce unexpected results

Quoted 31 lines
Quoted 15 lines
Quoted 15 lines

Could you try spatch --sp-file us.cocci us.c

where us.cocci is:

@script:ocaml@
@@

let _ = Common.union_set [1;2] [3] in
Printf.printf "ok\n"

@@
@@

- foo();

Quoted 15 lines
Quoted 5 lines

and us.c is:

int main () {
foo();
}

I'm sure this makes more sense to you then it makes to me:

Quoted 7 lines
$ spatch --sp-file us.cocci us.c
init_defs_builtins: /usr/lib64/ocaml/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_e217fe.cmxs -g -I /usr/lib64/ocaml  -I /usr/lib64/ocaml/coccinelle//ocaml /tmp/ocaml_cocci_e217fe.ml
File "/tmp/ocaml_cocci_e217fe.ml", line 15, characters 6-36:
Error: Unbound value Iteration.add_pending_instance
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e217fe.ml")
Quoted 3 lines

Something is completely wrong with your installation.

Where did you get your Coccinelle from?

http://coccinelle.lip6.fr/distrib/coccinelle-1.0.0-rc23.tgz

Quoted 1 line

Did you compile it yourself?

Sort of. This is a Gentoo box. The following self-tests seems to run correctly though:

Quoted 3 lines

./spatch standard.h -parse_c -dir tests/
./spatch -iso_file standard.iso -macro_file_builtins standard.h -testall ./spatch.opt -iso_file standard.iso -macro_file_builtins standard.h -testall

Cheers,

Quoted 56 lines

Maybe it is an ocaml version problem. Your version is newer than mine. I will try to get someone to try with the ocaml version you have.

julia

Quoted 49 lines

Cheers,

Quoted 44 lines

thanks,
julia

Quoted 41 lines
Quoted 14 lines

File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

author
#6 lore raw

Hello Julia,

Quoted 1 line · Julia Lawall

We are looking into it. It seems to be related to the version of ocaml.

Thank you

Cheers,

Quoted 143 lines

julia

Quoted 139 lines · Emil Medve

Hello Julia,

Quoted 13 lines · Julia Lawall
Quoted 11 lines · Emil Medve

Hello Julia,

Quoted 7 lines · Julia Lawall
Quoted 5 lines · Emil Medve

Hello,

I'm seeing the following errors:

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

File "/tmp/ocaml_cocci_cfd8ea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set

This is really strange. What semantic patch are you running?

All of them as I'm not using COCCI=... to select some specific single patch. I'll narrow it down a bit and get back to you

scripts/coccinelle/null/badzero.cocci

Quoted 3 lines

File "/tmp/ocaml_cocci_cc56de.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cc56de.ml")

This is the only patch that seems to produce unexpected results

Quoted 31 lines
Quoted 15 lines
Quoted 15 lines

Could you try spatch --sp-file us.cocci us.c

where us.cocci is:

@script:ocaml@
@@

let _ = Common.union_set [1;2] [3] in
Printf.printf "ok\n"

@@
@@

- foo();

Quoted 15 lines
Quoted 5 lines

and us.c is:

int main () {
foo();
}

I'm sure this makes more sense to you then it makes to me:

Quoted 7 lines
$ spatch --sp-file us.cocci us.c
init_defs_builtins: /usr/lib64/ocaml/coccinelle/standard.h
Using native version of ocamlc/ocamlopt/ocamldep
ocamlopt.opt -shared -o /tmp/ocaml_cocci_e217fe.cmxs -g -I /usr/lib64/ocaml  -I /usr/lib64/ocaml/coccinelle//ocaml /tmp/ocaml_cocci_e217fe.ml
File "/tmp/ocaml_cocci_e217fe.ml", line 15, characters 6-36:
Error: Unbound value Iteration.add_pending_instance
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e217fe.ml")
Quoted 3 lines

Something is completely wrong with your installation.

Where did you get your Coccinelle from?

http://coccinelle.lip6.fr/distrib/coccinelle-1.0.0-rc23.tgz

Quoted 1 line

Did you compile it yourself?

Sort of. This is a Gentoo box. The following self-tests seems to run correctly though:

Quoted 3 lines

./spatch standard.h -parse_c -dir tests/
./spatch -iso_file standard.iso -macro_file_builtins standard.h -testall ./spatch.opt -iso_file standard.iso -macro_file_builtins standard.h -testall

Cheers,

Quoted 56 lines

Maybe it is an ocaml version problem. Your version is newer than mine. I will try to get someone to try with the ocaml version you have.

julia

Quoted 49 lines

Cheers,

Quoted 44 lines

thanks,
julia

Quoted 41 lines
Quoted 14 lines

File "/tmp/ocaml_cocci_0b6504.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_cfd8ea.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_0b6504.ml") File "/tmp/ocaml_cocci_5c8de6.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_bb345d.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_bb345d.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_5c8de6.ml") File "/tmp/ocaml_cocci_84f1b1.ml", line 21, characters 23-39:
File "/tmp/ocaml_cocci_e0436a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Error: Unbound value Common.union_set

Quoted 8 lines

Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_e0436a.ml") Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_84f1b1.ml") File "/tmp/ocaml_cocci_f46b5a.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_f46b5a.ml") File "/tmp/ocaml_cocci_a89bea.ml", line 21, characters 23-39:
Error: Unbound value Common.union_set
Fatal error: exception Yes_prepare_ocamlcocci.CompileFailure("/tmp/ocaml_cocci_a89bea.ml")

Here is the context and a few relevant version numbers:

Quoted 7 lines

make coccicheck MODE=report M=...

$ git describe --abbrev=0
v3.19-rc2
$ spatch --version
spatch version 1.0.0-rc23 with Python support and with PCRE support
$ ocaml -version
The OCaml toplevel, version 4.02.1

Any advice? Need extra information?

Cheers,
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

#7 lore raw
In reply to Emil Medve

Dear Emil,

I'm an engineer working with Julia on Coccinelle.

Many thanks to you for having reported this issue. It is due to a change in the OCaml compiler between versions 4.01 and 4.02. We will do our best to fix Coccinelle as soon as possible so that it also works with OCaml 4.02, but meanwhile, you can always make it work with an older version of OCaml such as 4.01. Thismeans to recompile coccinelle e.g.with OCaml 4.01.

Hope this helps,
S?bastien.