samee / obliv-c

Other
177 stars 57 forks source link

"Error: Unbound module Big_int" in the latest Ocaml #106

Open tanliboy opened 2 years ago

tanliboy commented 2 years ago

I am running into the below error while following the tutorial to test it on ubuntu.

make cilly install-findlib install-data PREFIX=. datarootdir=share DESTDIR= OCAMLFIND_DESTDIR=lib
make[1]: Entering directory '/home/tanliboy/obliv-c'
export CIL_VERSION
MAKE=make ocamlbuild -build-dir _build -use-ocamlfind -no-links -classic-display src/cil.cma src/ext/simplemem.cma src/ext/canonicalize.cma src/ext/dataslicing.cma src/ext/liveness.cma src/ext/llvm.cma src/ext/heapify.cma src/ext/oneret.cma src/ext/logcalls.cma src/ext/processObliv.cma src/ext/pta.cma src/ext/inliner.cma src/ext/partial.cma src/ext/blockinggraph.cma src/ext/sfi.cma src/ext/simplify.cma src/ext/cqualann.cma src/ext/callgraph.cma src/ext/zrapp.cma src/ext/logwrites.cma src/ext/epicenter.cma src/ext/ccl.cma src/cil.cmxa src/cil.a src/ext/simplemem.cmxa src/ext/canonicalize.cmxa src/ext/dataslicing.cmxa src/ext/liveness.cmxa src/ext/llvm.cmxa src/ext/heapify.cmxa src/ext/oneret.cmxa src/ext/logcalls.cmxa src/ext/processObliv.cmxa src/ext/pta.cmxa src/ext/inliner.cmxa src/ext/partial.cmxa src/ext/blockinggraph.cmxa src/ext/sfi.cmxa src/ext/simplify.cmxa src/ext/cqualann.cmxa src/ext/callgraph.cmxa src/ext/zrapp.cmxa src/ext/logwrites.cmxa src/ext/epicenter.cmxa src/ext/ccl.cmxa src/ext/simplemem.cmxs src/ext/canonicalize.cmxs src/ext/dataslicing.cmxs src/ext/liveness.cmxs src/ext/llvm.cmxs src/ext/heapify.cmxs src/ext/oneret.cmxs src/ext/logcalls.cmxs src/ext/processObliv.cmxs src/ext/pta.cmxs src/ext/inliner.cmxs src/ext/partial.cmxs src/ext/blockinggraph.cmxs src/ext/sfi.cmxs src/ext/simplify.cmxs src/ext/cqualann.cmxs src/ext/callgraph.cmxs src/ext/zrapp.cmxs src/ext/logwrites.cmxs src/ext/epicenter.cmxs src/ext/ccl.cmxs src/ext/simplemem.a src/ext/canonicalize.a src/ext/dataslicing.a src/ext/liveness.a src/ext/llvm.a src/ext/heapify.a src/ext/oneret.a src/ext/logcalls.a src/ext/processObliv.a src/ext/pta.a src/ext/inliner.a src/ext/partial.a src/ext/blockinggraph.a src/ext/sfi.a src/ext/simplify.a src/ext/cqualann.a src/ext/callgraph.a src/ext/zrapp.a src/ext/logwrites.a src/ext/epicenter.a src/ext/ccl.a src/cil.libfiles src/ext/simplemem.libfiles src/ext/canonicalize.libfiles src/ext/dataslicing.libfiles src/ext/liveness.libfiles src/ext/llvm.libfiles src/ext/heapify.libfiles src/ext/oneret.libfiles src/ext/logcalls.libfiles src/ext/processObliv.libfiles src/ext/pta.libfiles src/ext/inliner.libfiles src/ext/partial.libfiles src/ext/blockinggraph.libfiles src/ext/sfi.libfiles src/ext/simplify.libfiles src/ext/cqualann.libfiles src/ext/callgraph.libfiles src/ext/zrapp.libfiles src/ext/logwrites.libfiles src/ext/epicenter.libfiles src/ext/ccl.libfiles src/main.byte src/main.native cil.docdir/index.html
ocamlfind ocamlc -c -I src -I src/frontc -I src/ext -I src/ocamlutil -I src/ext/canonicalize -I src/ext/pta -I src/ext/oneret -I src/ext/oblivc -I src/ext/blockinggraph -I src/ext/zrapp -I src/ext/epicenter -I src/ext/processObliv -I src/ext/callgraph -I src/ext/heapify -I src/ext/logwrites -I src/ext/cqualann -I src/ext/inliner -I src/ext/simplemem -I src/ext/simplify -I src/ext/partial -I src/ext/llvm -I src/ext/sfi -I src/ext/ccl -I src/ext/liveness -I src/ext/dataslicing -I src/ext/logcalls -o src/cilint.cmi src/cilint.mli
+ ocamlfind ocamlc -c -I src -I src/frontc -I src/ext -I src/ocamlutil -I src/ext/canonicalize -I src/ext/pta -I src/ext/oneret -I src/ext/oblivc -I src/ext/blockinggraph -I src/ext/zrapp -I src/ext/epicenter -I src/ext/processObliv -I src/ext/callgraph -I src/ext/heapify -I src/ext/logwrites -I src/ext/cqualann -I src/ext/inliner -I src/ext/simplemem -I src/ext/simplify -I src/ext/partial -I src/ext/llvm -I src/ext/sfi -I src/ext/ccl -I src/ext/liveness -I src/ext/dataslicing -I src/ext/logcalls -o src/cilint.cmi src/cilint.mli
File "src/cilint.mli", line 6, characters 36-51:
6 | type cilint = Small of int | Big of Big_int.big_int
                                        ^^^^^^^^^^^^^^^
Error: Unbound module Big_int
Command exited with code 2.
make[1]: *** [Makefile:145: ocamlbuild] Error 10
make[1]: Leaving directory '/home/tanliboy/obliv-c'
make: *** [Makefile:413: install-local] Error 2

The Big_int has been deprecated in the latest version of Ocaml, along with a few other breaking changes. After I fixed this problem, I am running into another error as below.

make cilly install-findlib install-data PREFIX=. datarootdir=share DESTDIR= OCAMLFIND_DESTDIR=lib
make[1]: Entering directory '/home/tanliboy/obliv-c'
export CIL_VERSION
MAKE=make ocamlbuild -build-dir _build -use-ocamlfind -no-links -classic-display src/cil.cma src/ext/simplemem.cma src/ext/canonicalize.cma src/ext/dataslicing.cma src/ext/liveness.cma src/ext/llvm.cma src/ext/heapify.cma src/ext/oneret.cma src/ext/logcalls.cma src/ext/processObliv.cma src/ext/pta.cma src/ext/inliner.cma src/ext/partial.cma src/ext/blockinggraph.cma src/ext/sfi.cma src/ext/simplify.cma src/ext/cqualann.cma src/ext/callgraph.cma src/ext/zrapp.cma src/ext/logwrites.cma src/ext/epicenter.cma src/ext/ccl.cma src/cil.cmxa src/cil.a src/ext/simplemem.cmxa src/ext/canonicalize.cmxa src/ext/dataslicing.cmxa src/ext/liveness.cmxa src/ext/llvm.cmxa src/ext/heapify.cmxa src/ext/oneret.cmxa src/ext/logcalls.cmxa src/ext/processObliv.cmxa src/ext/pta.cmxa src/ext/inliner.cmxa src/ext/partial.cmxa src/ext/blockinggraph.cmxa src/ext/sfi.cmxa src/ext/simplify.cmxa src/ext/cqualann.cmxa src/ext/callgraph.cmxa src/ext/zrapp.cmxa src/ext/logwrites.cmxa src/ext/epicenter.cmxa src/ext/ccl.cmxa src/ext/simplemem.cmxs src/ext/canonicalize.cmxs src/ext/dataslicing.cmxs src/ext/liveness.cmxs src/ext/llvm.cmxs src/ext/heapify.cmxs src/ext/oneret.cmxs src/ext/logcalls.cmxs src/ext/processObliv.cmxs src/ext/pta.cmxs src/ext/inliner.cmxs src/ext/partial.cmxs src/ext/blockinggraph.cmxs src/ext/sfi.cmxs src/ext/simplify.cmxs src/ext/cqualann.cmxs src/ext/callgraph.cmxs src/ext/zrapp.cmxs src/ext/logwrites.cmxs src/ext/epicenter.cmxs src/ext/ccl.cmxs src/ext/simplemem.a src/ext/canonicalize.a src/ext/dataslicing.a src/ext/liveness.a src/ext/llvm.a src/ext/heapify.a src/ext/oneret.a src/ext/logcalls.a src/ext/processObliv.a src/ext/pta.a src/ext/inliner.a src/ext/partial.a src/ext/blockinggraph.a src/ext/sfi.a src/ext/simplify.a src/ext/cqualann.a src/ext/callgraph.a src/ext/zrapp.a src/ext/logwrites.a src/ext/epicenter.a src/ext/ccl.a src/cil.libfiles src/ext/simplemem.libfiles src/ext/canonicalize.libfiles src/ext/dataslicing.libfiles src/ext/liveness.libfiles src/ext/llvm.libfiles src/ext/heapify.libfiles src/ext/oneret.libfiles src/ext/logcalls.libfiles src/ext/processObliv.libfiles src/ext/pta.libfiles src/ext/inliner.libfiles src/ext/partial.libfiles src/ext/blockinggraph.libfiles src/ext/sfi.libfiles src/ext/simplify.libfiles src/ext/cqualann.libfiles src/ext/callgraph.libfiles src/ext/zrapp.libfiles src/ext/logwrites.libfiles src/ext/epicenter.libfiles src/ext/ccl.libfiles src/main.byte src/main.native cil.docdir/index.html
ocamlfind ocamlc -c -g -annot -bin-annot -package findlib -I src -I src/frontc -I src/ext -I src/ocamlutil -I src/ext/canonicalize -I src/ext/pta -I src/ext/oneret -I src/ext/oblivc -I src/ext/blockinggraph -I src/ext/zrapp -I src/ext/epicenter -I src/ext/processObliv -I src/ext/callgraph -I src/ext/heapify -I src/ext/logwrites -I src/ext/cqualann -I src/ext/inliner -I src/ext/simplemem -I src/ext/simplify -I src/ext/partial -I src/ext/llvm -I src/ext/sfi -I src/ext/ccl -I src/ext/liveness -I src/ext/dataslicing -I src/ext/logcalls -o src/feature.cmo src/feature.ml
+ ocamlfind ocamlc -c -g -annot -bin-annot -package findlib -I src -I src/frontc -I src/ext -I src/ocamlutil -I src/ext/canonicalize -I src/ext/pta -I src/ext/oneret -I src/ext/oblivc -I src/ext/blockinggraph -I src/ext/zrapp -I src/ext/epicenter -I src/ext/processObliv -I src/ext/callgraph -I src/ext/heapify -I src/ext/logwrites -I src/ext/cqualann -I src/ext/inliner -I src/ext/simplemem -I src/ext/simplify -I src/ext/partial -I src/ext/llvm -I src/ext/sfi -I src/ext/ccl -I src/ext/liveness -I src/ext/dataslicing -I src/ext/logcalls -o src/feature.cmo src/feature.ml
File "src/feature.ml", line 39, characters 11-18:
39 | module F = Findlib
                ^^^^^^^
Error: Unbound module Findlib
Hint: Did you mean Stdlib?
Command exited with code 2.
make[1]: *** [Makefile:145: ocamlbuild] Error 10
make[1]: Leaving directory '/home/tanliboy/obliv-c'
make: *** [Makefile:413: install-local] Error 2

Did anyone recently install successfully on ubuntu?

samee commented 2 years ago

Have you tried the solutions suggested in similar bugs? E.g. https://github.com/samee/obliv-c/issues/49, https://github.com/samee/obliv-c/issues/76, or #101 ?

tanliboy commented 2 years ago

@samee , thanks for your reply! I worked around this problem, and I was able to build it successfully on a ubuntu server. I tried suggestions in your referred issues, but I could not get through the problem.

whale567 commented 1 year ago

When I'm running tsinfer (https://github.com/mnewberry/tsinfer), also meet the same problem, how do you solve this problem?

gutjuri commented 1 year ago

I worked around this problem, and I was able to build it successfully on a ubuntu server.

Would you mind sharing how you managed to work around it? I face the same problem.

Anjana41 commented 5 months ago

@tanliboy I’m currently experiencing the same problem and was wondering if you could share how you managed to overcome it.

tanliboy commented 5 months ago

Sorry, @gutjuri and @Anjana41 , I missed the messages early on. It has been quite a long time. IIRC, I installed an old version of Ocaml to make it compatible. I wish that we had it fixed in the repository, although.

yrtanmax commented 2 months ago

@tanliboy Hello, may I ask which version of ocaml you have installed and how to install it? Are you using Ubuntu 20.04?

tanliboy commented 2 months ago

@yrtanmax It's been a while, so I don’t remember all the details. I do, however, like the concept of Obliv-C, as it simplifies encryption at the programming language level.

That said, it seems this repo hasn’t been updated in a long time, which might not make it ideal for building new projects on top of it.