BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.07k stars 273 forks source link

Missing llvm Problem #1527

Closed Troy-Cao closed 2 years ago

Troy-Cao commented 2 years ago

Hi, Fellows. I encounter a problem when installing the tool, here is the error info, any hint on solving it?


#=== ERROR while compiling conf-bap-llvm.1.7 ==================================#
# context     2.1.2 | linux/x86_64 | ocaml-base-compiler.4.12.1 | https://opam.ocaml.org#2c86e847
# path        ~/.opam/4.12.1/.opam-switch/build/conf-bap-llvm.1.7
# command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml unix.cma find-llvm.ml
# exit-code   1
# env-file    ~/.opam/log/conf-bap-llvm-14472-51c5e6.env
# output-file ~/.opam/log/conf-bap-llvm-14472-51c5e6.out
### output ###
# LLVM not found
ivg commented 2 years ago

Hey, this error means that you do not have llvm installed on your system. Ideally, when you do opam install bap it should prompt you to install the missing system dependencies using your operating system package manager. However, if you refuse or if your operating system is not fully supported (misses proper specification) you may end up with missing system dependencies, resulting in a conf-* package failure.

To better assist you, I need to know more details. First, which instructions did you follow to install bap? Second, did opam offer you to install the system dependencies and if yes, what was the outcome? Finally, what operating system are you using?

Troy-Cao commented 2 years ago

Hi, Ivg. Thank you for your reply. I was using the ""opam install bap"" on Ubuntu Instance and I think opam does offer me to install all the dependencies. And when installing, it gives the error info like this. So should I install llvm in the ubuntu instance with package manager?

ivg commented 2 years ago

You can just repeat opam install bap and say "yes" to opam when it will try installing the dependencies. Watch carefully for the output of your system package manager, it may fail for various reasons, like connectivity. It is also a good idea to run sudo apt update before that, to ensure that your indices are up to date.

ivg commented 2 years ago

I am closing it for now, if you still experiencing problems don't hesitate to reopen and provide feedback.