diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2019-02-28 11:56:19 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-03-10 20:10:32 +0000 |
commit | cf930214e12b49e89be4674043d9f461d667baae (patch) | |
tree | 90de5ea1c643d0d7ad2c5cf55e862d309e605d48 /scripts/build/d-klee-linux-ubuntu.inc | |
parent | b4d8fe0301b82e8abff0336bf6d1347dff11a853 (diff) | |
download | klee-cf930214e12b49e89be4674043d9f461d667baae.tar.gz |
Updated dependency build system for KLEE
Provide a single `scripts/build/build.sh` file to build KLEE and its dependencies.
Diffstat (limited to 'scripts/build/d-klee-linux-ubuntu.inc')
-rw-r--r-- | scripts/build/d-klee-linux-ubuntu.inc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/build/d-klee-linux-ubuntu.inc b/scripts/build/d-klee-linux-ubuntu.inc new file mode 100644 index 00000000..38b8dce5 --- /dev/null +++ b/scripts/build/d-klee-linux-ubuntu.inc @@ -0,0 +1,23 @@ +# TODO remove adding sudo package +# Create ``klee`` user for container with password ``klee``. +# and give it password-less sudo access (temporarily so we can use the TravisCI scripts) +RUN apt update && apt -y --no-install-recommends install sudo && \ + rm -rf /var/lib/apt/lists/* && \ + useradd -m klee && \ + echo klee:klee | chpasswd && \ + cp /etc/sudoers /etc/sudoers.bak && \ + echo 'klee ALL=(root) NOPASSWD: ALL' >> /etc/sudoers + +ENV BASE=/tmp +# Copy across source files needed for build +# Set klee user to be owner +ADD --chown=klee:klee / ${BASE}/klee_src + +USER klee +WORKDIR /home/klee + +# Add KLEE binary directory to PATH +RUN /bin/bash -c 'ln -s ${BASE}/klee_src /home/klee/ && ln -s ${BASE}/klee_build* /home/klee/klee_build && echo "export PATH=\"$PATH:$(cd /tmp/llvm-*install*/bin && pwd):/home/klee/klee_build/bin\"" >> /home/klee/.bashrc' + +# TODO Remove when STP is fixed +RUN /bin/bash -c 'echo "export LD_LIBRARY_PATH=$(cd ${BASE}/metaSMT-*-deps/stp-git-basic/lib/ && pwd)" >> /home/klee/.bashrc' |