I have started doing test builds with version 5.3.0-beta of Fedora's suite of OCaml packages, to try to identify problems ahead of the final 5.3.0 release. I have encountered a problem with coccinelle 1.3 that I don't understand. The build fails like this:
/usr/bin/ocamlopt.opt -I commons/ocamlextra -I commons -I globals -I parsing_cocci -I parsing_c -I ctl -I ocaml -I python -I engine -I popl09 -I extra -I tools/spgen/source/ -I +pcre -I +pyml -I +parmap -I +stdcompat -I +str -I +unix -I +dynlink -I +compiler-libs -cclib -lparmap_stubs -cclib -L. -g unix.cmxa str.cmxa ocamlcommon.cmxa stdcompat.cmxa pcre.cmxa dynlink.cmxa pyml.cmxa parmap.cmxa commons/commons.cmxa globals/globals.cmxa parsing_cocci/parsing_cocci.cmxa parsing_c/parsing_c.cmxa ctl/ctl.cmxa ocaml/ocaml.cmxa python/python.cmxa engine/engine.cmxa popl09/popl09.cmxa extra/extra.cmxa flag_cocci.cmx cocci.cmx testing.cmx read_options.cmx enter.cmx main.cmx -o spatch.opt
File "_none_", line 1:
Error: No implementation provided for the following modules:
"Exposed_modules" referenced from "Coccilib" (ocaml/ocaml.cmxa)
"Lib_parsing_c" referenced from "C_vs_c" (engine/engine.cmxa),
"Cocci" (cocci.cmx), "Cocci_vs_c" (engine/engine.cmxa),
"Coccilib" (ocaml/ocaml.cmxa),
"Control_flow_c_build" (parsing_c/parsing_c.cmxa),
"Ctlcocci_integration" (engine/engine.cmxa),
"Danger" (parsing_c/parsing_c.cmxa),
"Includes_cache" (parsing_c/parsing_c.cmxa),
"Parser_c" (parsing_c/parsing_c.cmxa),
"Parsing_hacks" (parsing_c/parsing_c.cmxa),
"Pattern_c" (engine/engine.cmxa),
"Pretty_print_c" (parsing_c/parsing_c.cmxa),
"Transformation_c" (engine/engine.cmxa),
"Type_annoter_c" (parsing_c/parsing_c.cmxa)
...
I have truncated the output, but every coccinelle module except Main is reported as having no implementation. For each module A that depends on a module B, we are told both that A has no implementation, and that A depends on B. So clearly, A does have an implementation and the linker saw it, or it would not have mentioned the dependency while complaining that B has no implementation. I tried adding -linkall to the command line, but that had no effect.
Could somebody please try building coccinelle with OCaml 5.3.0-beta2 and tell me if you see the same problem, or if it appears to be specific to Fedora? You will need this patch to stdcompat. You also have to convince stdcompat that OCaml 5.3.0-beta2 is really OCaml 5.3.0 by changing line 40 of configure.ac to something this:
AC_SUBST([OCAML_VERSION_PATCH_AND_EXTRA], [[`echo $OCAMLVERSION | cut -d '.' -f 3 | cut -d '+' -f 1 | cut -d '~' -f 1`]])
I have started doing test builds with version 5.3.0-beta of Fedora's suite of OCaml packages, to try to identify problems ahead of the final 5.3.0 release. I have encountered a problem with coccinelle 1.3 that I don't understand. The build fails like this:
I have truncated the output, but every coccinelle module except Main is reported as having no implementation. For each module A that depends on a module B, we are told both that A has no implementation, and that A depends on B. So clearly, A does have an implementation and the linker saw it, or it would not have mentioned the dependency while complaining that B has no implementation. I tried adding
-linkallto the command line, but that had no effect.Could somebody please try building coccinelle with OCaml 5.3.0-beta2 and tell me if you see the same problem, or if it appears to be specific to Fedora? You will need this patch to stdcompat. You also have to convince stdcompat that OCaml 5.3.0-beta2 is really OCaml 5.3.0 by changing line 40 of configure.ac to something this: