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

undefined symbol: Z3_mk_lambda #1586

Open
duplys opened this issue May 9, 2023 · 0 comments
Open

undefined symbol: Z3_mk_lambda #1586

duplys opened this issue May 9, 2023 · 0 comments

Comments

@duplys
Copy link

duplys commented May 9, 2023

I encounter an error when trying to run BAP in a Docker container:

root@9607051f0674:/# bap -h
Failed to load plugin "primus-symbolic-executor": Failed to load z3ml: error loading shared library: Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"/tmp/z3mle4c664.cmxs: undefined symbol: Z3_mk_lambda\")")
Failed to load 1 plugins, details follow:
The plugin `/usr/local/lib/bap/primus_symbolic_executor.plugin' has failed with the following error:
Failed to load z3ml: error loading shared library: Dynlink.Error (Dynlink.Cannot_open_dll "Failure(\"/tmp/z3mle4c664.cmxs: undefined symbol: Z3_mk_lambda\")")

From what I understand, z3ml is an OCaml binding for the Z3 theorem prover and Z3_mk_lambda seems to be part of the Z3 C API. However, I could not find any other Z3 packages that I could install to fix the error.

Is there something simple I'm missing that solves this issue?

The Docker container was built using the following Dockerfile (based on Ubuntu 18.04 since BAP requires libffi6 and 18.04 seems to be the last (?) Ubuntu release having libffi6). The BAP installation using wget and dpkg -i <...> follows the instructions from this repository.

FROM ubuntu:18.04

RUN apt update && apt install -y \
    gcc \
    libtinfo5 \
    libffi6 \
    libz3-cil \
    libz3-ocaml-dev \
    make \
    wget \
    z3 \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/bap

RUN wget https://github.com/BinaryAnalysisPlatform/bap/releases/download/v2.5.0/bap_2.5.0.deb && \
    wget https://github.com/BinaryAnalysisPlatform/bap/releases/download/v2.5.0/libbap_2.5.0.deb && \
    wget https://github.com/BinaryAnalysisPlatform/bap/releases/download/v2.5.0/libbap-dev_2.5.0.deb
RUN dpkg -i bap_2.5.0.deb && \
    dpkg -i libbap_2.5.0.deb && \
    dpkg -i libbap-dev_2.5.0.deb
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

1 participant