Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Regression in ocamlc -pack typing #7932
The package frama-c-base does not build with 4.08 or trunk, due to a change in the typing rules around ocamlc -pack.
I've reduced the issue to a minimal example:
The command ocamlc -o Pack.cmo -pack Lang.cmo Cint.cmo Conditions.cmo gives the following error on 4.08 and trunk, but succeeds on earlier versions:
File "none", line 1:
(The reproduction case is available as a gist, see below)
I suspect the change occurred during #2175. However, upon examining the test case, I think the new behaviour might be correct: Pack.mli has the modules in the wrong order, and indeed frama-c-base builds correctly when they are reordered. So it's possible that the only change needed is to change a '-' to a '*' in the Changes entry for #2175. But since I don't precisely understand what -pack is meant to do, more opinions would be welcome.
Steps to reproduce
git clone https://gist.github.com/d0137407e00ace3e7f83c4414e9adf52.git ocaml-pack-issue && ( cd ocaml-pack-issue; ./run.sh /path/to/ocamlc-408; )
Comment author: maro
Indeed, we noticed it in our development version and fixed it for the next Frama-C release.
In our tests, fixing the command line order seemed to fix it for 4.08 but prevented it from compiling in <4.08. So we decided to remove the cyclic dependency in the files, which was neither intended nor necessary.