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

Makefile dependencies issue #16

Open
kyechou opened this issue Oct 13, 2019 · 1 comment
Open

Makefile dependencies issue #16

kyechou opened this issue Oct 13, 2019 · 1 comment

Comments

@kyechou
Copy link

kyechou commented Oct 13, 2019

Environment

  • BAP 1.6.0
  • OCaml 4.05.0
  • GCC 9.2.0

Problem

$ git clone https://github.com/BinaryAnalysisPlatform/bap-bindings.git
$ cd bap-bindings/
$ autoconf && ./configure
$ make -j
ocamlc -g -c bap/stub/init.c
~/.opam/4.05.0/bin/ocamlfind opt -c -o _build/bap/lib/bindings.cmx -I _build/bap/generated -I _build/bap/lib -package bap,bap.plugins,ctypes.stubs,ctypes.foreign,findlib.dynload bap/lib/bindings.ml
~/.opam/4.05.0/bin/ocamlfind opt -c -o _build/bap/stub_generator/generate.cmx -I _build/bap/generated -I _build/bap/lib -package bap,bap.plugins,ctypes.stubs,ctypes.foreign,findlib.dynload bap/stub_generator/generate.ml
~/.opam/4.05.0/bin/ocamlfind opt -c -o _build/bap/lib/apply_bindings.cmx -I _build/bap/generated -I _build/bap/lib -package bap,bap.plugins,ctypes.stubs,ctypes.foreign,findlib.dynload bap/lib/apply_bindings.ml
mv init.o _build/bap/stub/init.o
File "bap/lib/apply_bindings.ml", line 1, characters 22-34:
Error: Unbound module Bap_bindings
File "bap/stub_generator/generate.ml", line 9, characters 22-35:
Error: Unbound module Bindings
make: *** [Makefile:75: _build/bap/lib/apply_bindings.cmx] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Makefile:75: _build/bap/stub_generator/generate.cmx] Error 2

It seems that there are some dependencies between built files unspecified in the makefile, since it works fine without the -j option.

@ivg
Copy link
Member

ivg commented Oct 14, 2019

Indeed, the dependencies between OCaml modules are not specified. In particular, the generate.ml is not having bindings.ml as a dependency and it all starts the chain of failures.

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