Skip to content

Commit 700332a

Browse files
committed
Build Z3 from source
1 parent 15db2b3 commit 700332a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

containers/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,24 @@ ENV LC_ALL en_US.UTF-8
1616
ENV LANG en_US.UTF-8
1717
ENV LANGUAGE en_US:en
1818

19-
# Unicorn pypi package fails to setup on ARM, which we need to support for M1 Macs
19+
# Unicorn and z3 both fail to build from pypi pacakges on ARM
2020
# Build from source instead and generate our own Python bindings
21-
RUN git clone https://github.com/unicorn-engine/unicorn.git /opt/unicorn
21+
RUN git clone https://github.com/unicorn-engine/unicorn.git --single-branch -b 2.0.0 /opt/unicorn
2222
WORKDIR /opt/unicorn/bindings/python
2323
RUN python3 setup.py install && rm -rf /opt/unicorn
2424

25+
RUN git clone https://github.com/Z3Prover/z3.git --single-branch -b z3-4.11.2 /opt/z3 && mkdir /opt/z3/build
26+
WORKDIR /opt/z3/build
27+
RUN cmake -DCMAKE_BUILD_TYPE=Release -DZ3_BUILD_PYTHON_BINDINGS=TRUE -DZ3_INSTALL_PYTHON_BINDINGS=TRUE .. && make -j && make install && rm -rf /opt/z3
28+
2529
RUN useradd --create-home --groups sudo --shell /bin/zsh wolvsec
2630
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
2731
WORKDIR /home/wolvsec
2832
USER wolvsec
2933

3034
ENV PATH="${PATH}:/home/wolvsec/.local/bin"
3135

32-
RUN pip3 install pwntools numpy ipython z3-solver
36+
RUN pip3 install pwntools numpy ipython
3337

3438
RUN bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
3539

0 commit comments

Comments
 (0)