Skip to content

"make clean" does not work when upgrading OCaml

ID0001343: This issue was created automatically from Mantis Issue 1343. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0001343 Frama-C Kernel > Makefile public 2013-01-08 2014-02-12
Reporter dhekir Assigned To signoles Resolution fixed
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Oxygen-20120901 Target Version - Fixed in Version Frama-C Fluorine-20130401

Description :

After upgrading from OCaml 3.12 to 4.00, when trying to run "make clean" on the root of the Frama-C source directory, after having already compiled everything using OCaml 3.12, the makefile tries to run a target related to ocamlgraph before cleaning things, but since there are old .cmi files in its directories (which I wanted to be cleaned as well), it tries instead to build things before cleaning them, which gives annoying error messages:

$ make clean Building ocamlgraph make[1]: Entering directory /local/user/framac/oxygen/ocamlgraph' ocamlc.opt -I src -I lib -pack -g -o graph.cmo src/sig.cmi src/sig_pack.cmi src/dot_ast.cmi lib/unionfind.cmo lib/heap.cmo lib/bitv.cmo src/version.cmo src/util.cmo src/blocks.cmo src/persistent.cmo src/imperative.cmo src/delaunay.cmo src/builder.cmo src/classic.cmo src/rand.cmo src/oper.cmo src/components.cmo src/path.cmo src/nonnegative.cmo src/traverse.cmo src/coloring.cmo src/topological.cmo src/kruskal.cmo src/flow.cmo src/dominator.cmo src/graphviz.cmo src/gml.cmo src/dot_parser.cmo src/dot_lexer.cmo src/dot.cmo src/pack.cmo src/gmap.cmo src/minsep.cmo src/cliquetree.cmo src/mcs_m.cmo src/md.cmo src/strat.cmo src/fixpoint.cmo src/leaderlist.cmo src/contraction.cmo File "_none_", line 1: Error: src/sig.cmi is not a compiled interface for this version of OCaml. It seems to be for an older version of OCaml. make[1]: *** [graph.cmo] Error 2 make[1]: Leaving directory /local/user/framac/oxygen/ocamlgraph' make: *** [lib/graph.cmi] Error 2

After manually removing such files, I was able to run "make clean". I believe a minor patch should do it, however it's quite tedious to reproduce the bug: it requires configuring an old OCaml, compiling, then configuring a new OCaml before trying "make clean" again.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information