Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run make #102

Open
Mikerah opened this issue Aug 13, 2021 · 2 comments
Open

Unable to run make #102

Mikerah opened this issue Aug 13, 2021 · 2 comments

Comments

@Mikerah
Copy link

Mikerah commented Aug 13, 2021

I'm running Fedora 34 64-bit.

When attempting to run make in order to build this project, I get the following error when running on the obliv-c branch:

File "_none_", line 1:
Error: Cannot find file nums.cmxa
Command exited with code 2.
make[1]: *** [Makefile:145: ocamlbuild] Error 10
make[1]: Leaving directory '/home/mikerah/Documents/HashCloak/Projects/obliv-c-tutorial/obliv-c'
make: *** [Makefile:413: install-local] Error 2

I have ocaml-num installed through the Fedora package manager instead of opam since this resolved issues I had with running ./configure. So, this is odd.

When I attempt to run make on the master branch, I get the following error:

File "src/frontc/clexer.mll", line 617, characters 30-47:
Warning 52: Code should not depend on the actual values of
this constructor's arguments. They are only for information
and may change in future versions. (See manual section 9.5)
File "src/frontc/clexer.ml", line 1:
Error: Could not find the .cmi file for interface src/frontc/clexer.mli.
Command exited with code 2.
make[1]: *** [Makefile:138: ocamlbuild] Error 10
make[1]: Leaving directory '/home/mikerah/Documents/HashCloak/Projects/obliv-c-tutorial/obliv-c'
make: *** [Makefile:406: install-local] Error 2

I have ocaml-cil-devel and its dependencies installed through the Fedora package manager. Again, this is an odd error.

@samee
Copy link
Owner

samee commented Aug 15, 2021

Did you say you were doing it on the master branch, or obliv-c branch? This repository is weird that way (sorry!).

That warning can be ignored. It is caused by old conventions used by https://cil-project.github.io/cil/, a dependency of Obliv-C, and I receive the exact same warning. It still builds fine on my system. As for why it can't find clexer.mli, I can't seem to figure out. The recommendation is always to "turn it off and on again", and while I'm sure you've tried all this already, I'll write it here for completeness anyway:

opam update
opam upgrade
eval $(opam env)
make clean
./configure
make

The reason I harp on this is that I too get all sorts of mysterious errors right after I upgrade my OCaml compiler, since the toolchain can no longer deal with bits compiled by the previous version.

If that doesn't work (or if you do need your system's package manager to install the right versions), I'd start with the command line it uses to compile that particular file. You will find it when you run make. In the long output log, you will find something like:

+ ocamlfind ocamlc [...] src/frontc/clexer.ml

All those -I flags on that line will tell you where it's searching, and you should be able to run this command outside of make too to see what is failing. That should give you enough to debug the issue.

@Mikerah
Copy link
Author

Mikerah commented Aug 15, 2021

I tried running the instructions on both as specified in the issue. I just tried make clean again on both branches and I get the following:

On master branch:

File "src/cil.mli", line 45, characters 5-11:
Error: Unbound module Cilint
Command exited with code 2.
make[1]: *** [Makefile:138: ocamlbuild] Error 10
make[1]: Leaving directory '/home/mikerah/Documents/HashCloak/Projects/obliv-c-tutorial/obliv-c'
make: *** [Makefile:406: install-local] Error 2

Running make clean and re-running the instructions seems to have worked in the obliv-c branch. It would be great to specify that these instructions are meant for the obliv-c branch instead of master if that is indeed the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants