Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jakoch committed Dec 17, 2024
1 parent edd088e commit 9e7162c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
10 changes: 4 additions & 6 deletions .devcontainer/debian/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ RUN echo "Download Stage" && \
# +-----------------------------+
# | IKOS Build Stage |
# +-----------------------------+
#
## https://github.com/NASA-SW-VnV/ikos?tab=readme-ov-file#dependencies

# Well... IKOS is a bit of a pain to build.
# It requires LLVM 14, which is not available in the Debian 12 "bookworm" repositories.
# https://apt.llvm.org/buster/pool/main/l/ (7-19, snapshot)
Expand Down Expand Up @@ -110,7 +111,6 @@ RUN echo "Packages" && \
apt-get clean autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# https://github.com/NASA-SW-VnV/ikos?tab=readme-ov-file#dependencies
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "LLVM 14" && \
if [ "$DEBIAN_VERSION_NAME" == "trixie" ]; then DEBIAN_VERSION_NAME="unstable"; fi && \
Expand Down Expand Up @@ -149,14 +149,12 @@ RUN echo "APRON" && \
COPY --from=downloader /tmp/ikos.xz /tmp/ikos.xz

RUN echo "IKOS" && \
echo "Extract" && \
cd /tmp && \
tar zxf ikos.xz && \
# remove version from folder name
mv ikos-* ikos && \
cd /tmp/ikos && \
# Patch IKOS to allow LLVM14+
#sed -i 's/(LLVM_VERSION VERSION_LESS "14") OR (NOT (LLVM_VERSION VERSION_LESS "15"))/(LLVM_VERSION VERSION_LESS "14")/g' analyzer/CMakeLists.txt frontend/llvm/CMakeLists.txt && \
# Build IKOS
echo "Build" && \
mkdir build && cd build && \
cmake \
Expand All @@ -179,7 +177,7 @@ RUN echo "IKOS" && \
python3 -m pip install "/opt/ikos/dist/ikos-3.4-py3-none-any.whl" --target "/opt/ikos/python-module" && \
export PYTHONPATH="/opt/ikos/python-module" && \
echo "Test" && \
ls -lahr /opt/ikos/bin && \
#ls -lahr /opt/ikos/bin && \
/opt/ikos/bin/ikos --version && \
echo "Cleanup" && \
apt-get autoremove -y && \
Expand Down
19 changes: 10 additions & 9 deletions .devcontainer/debian/trixie/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ RUN echo "Download Stage" && \
# +-----------------------------+
# | IKOS Build Stage |
# +-----------------------------+
# https://github.com/NASA-SW-VnV/ikos?tab=readme-ov-file#dependencies

FROM debian:trixie-slim AS ikos-builder

Expand Down Expand Up @@ -119,7 +120,6 @@ RUN echo "Packages" && \
libgmp-dev \
python3 python3-pip python3-venv

# https://github.com/NASA-SW-VnV/ikos?tab=readme-ov-file#dependencies
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo "LLVM 14" && \
if [ "$DEBIAN_VERSION_NAME" == "trixie" ]; then DEBIAN_VERSION_NAME="unstable"; fi && \
Expand All @@ -128,7 +128,11 @@ RUN echo "LLVM 14" && \
echo "deb http://apt.llvm.org/$DEBIAN_VERSION_NAME/ llvm-toolchain$LINKNAME-$LLVM_VERSION main" >> /etc/apt/sources.list.d/llvm.list && \
echo "deb http://httpredir.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list && \
apt-get update && apt-get install --no-install-recommends --assume-yes \
llvm-14 llvm-14-dev llvm-14-tools clang-14
llvm-14 llvm-14-dev llvm-14-tools clang-14 && \
echo "Cleanup" && \
apt-get autoremove -y && \
apt-get clean autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN echo "APRON" && \
cd tmp && \
Expand All @@ -149,16 +153,13 @@ RUN echo "APRON" && \

COPY --from=downloader /tmp/ikos.xz /tmp/ikos.xz

RUN echo "Extract" && \
RUN echo "IKOS" && \
echo "Extract" && \
cd /tmp && \
tar zxf ikos.xz && \
# remove version from folder name
mv ikos-* ikos

RUN cd /tmp/ikos && \
# Patch IKOS to allow LLVM14+
#sed -i 's/(LLVM_VERSION VERSION_LESS "14") OR (NOT (LLVM_VERSION VERSION_LESS "15"))/(LLVM_VERSION VERSION_LESS "14")/g' analyzer/CMakeLists.txt frontend/llvm/CMakeLists.txt && \
# Build IKOS
mv ikos-* ikos && \
cd /tmp/ikos && \
echo "Build IKOS" && \
mkdir build && cd build && \
cmake \
Expand Down

0 comments on commit 9e7162c

Please sign in to comment.