@@ -23,8 +23,9 @@ RUN echo "check_certificate = off" > /etc/wgetrc
23
23
24
24
# We use C++ 17 for UnitTestBot, it is available in gcc-9; default gcc for ubuntu:18.04 is gcc-7
25
25
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
26
- RUN apt update && apt install -y --no-install-recommends gcc-9 g++-9
27
- # Skip 32bits libs installation before LLVM compilation
26
+ RUN apt update && apt install -y --no-install-recommends gcc-9 g++-9 gcc-multilib g++-multilib gcc-9-multilib g++-9-multilib
27
+
28
+ # Set gcc-9 as default gcc version
28
29
RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
29
30
RUN sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
30
31
RUN sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 100
@@ -69,29 +70,34 @@ WORKDIR /home/utbot
69
70
USER root
70
71
ARG LLVM_VERSION_MAJOR
71
72
RUN mkdir $UTBOT_ALL/llvm_gold_plugin
72
- COPY building_dependencies /llvm_gold_plugin/ plugin-api.h $UTBOT_ALL/llvm_gold_plugin
73
+ RUN wget -P $UTBOT_ALL /llvm_gold_plugin https://raw.githubusercontent.com/bminor/binutils-gdb/fd67aa1129fd006ad49ed5ecb2b063705211553a/include/ plugin-api.h
73
74
RUN git clone --single-branch --branch "release/${LLVM_VERSION_MAJOR}.x" --depth 1 "https://github.com/llvm/llvm-project.git" $UTBOT_ALL/llvm-project
74
75
WORKDIR $UTBOT_ALL/llvm-project
75
76
RUN mkdir build && cd build \
76
77
&& $UTBOT_CMAKE_BINARY \
77
- -DCMAKE_BUILD_TYPE=MinSizeRel \
78
+ -DCMAKE_BUILD_TYPE=Release \
78
79
-DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR \
79
80
-DLLVM_INCLUDE_TESTS=OFF \
80
81
-DLLVM_BINUTILS_INCDIR=$UTBOT_ALL/llvm_gold_plugin \
81
82
-DLLVM_ENABLE_RTTI=ON \
82
83
-DLLVM_ENABLE_EH=ON \
83
84
-DLLVM_TARGETS_TO_BUILD="host" \
84
- -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;libc;libclc;libcxx;libcxxabi;lld;lldb;clang-tools-extra" -G "Ninja" ../llvm \
85
+ -DLLVM_INSTALL_UTILS=ON \
86
+ -DLLVM_ENABLE_PROJECTS="clang;libclc;lld;lldb;clang-tools-extra" \
87
+ -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi" \
88
+ -G "Ninja" ../llvm \
85
89
&& $UTBOT_CMAKE_BINARY --build . --target install
86
90
87
-
88
91
# Install KLEE dependencies
89
92
ENV CURL_CA_BUNDLE=""
90
93
RUN sudo -E pip3 install tabulate==0.8.7 \
91
94
typing==3.7.4.3 \
92
95
lit==0.11.0.post1 \
93
96
wllvm==1.3.1
94
97
98
+ ENV CFLAGS="-gdwarf-4"
99
+ ENV CXXFLAGS="-gdwarf-4"
100
+
95
101
WORKDIR $UTBOT_ALL/llvm-project
96
102
RUN mkdir libcxx_build && cd libcxx_build \
97
103
&& export CC=wllvm \
@@ -125,7 +131,7 @@ RUN cd $UTBOT_ALL/grpc && git submodule update --init
125
131
RUN cd $UTBOT_ALL/grpc \
126
132
&& mkdir -p cmake/build \
127
133
&& cd cmake/build \
128
- && $UTBOT_CMAKE_BINARY -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR ../.. \
134
+ && $UTBOT_CMAKE_BINARY -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR ../.. \
129
135
&& make -j`nproc` \
130
136
&& make install \
131
137
&& cd $UTBOT_ALL \
@@ -205,13 +211,16 @@ RUN wget https://github.com/agauniyal/rang/releases/download/v3.1.0/rang.hpp -P
205
211
COPY building_dependencies/runtime_env.sh /home/utbot/.bashrc
206
212
COPY building_dependencies/runtime_env.sh /root/.bashrc
207
213
208
- # Install uclibc
209
- RUN git clone -b klee_uclibc_v1.2 https://github.com/klee/klee-uclibc.git $UTBOT_ALL/klee-uclibc
210
- WORKDIR $UTBOT_ALL/klee-uclibc
211
- RUN ./configure --make-llvm-lib && make -j`nproc`
214
+ # We need to install version 32 and 64 for klee.
215
+ # Install uclibc-32
216
+ RUN git clone -b klee_uclibc_v1.2 https://github.com/klee/klee-uclibc.git $UTBOT_ALL/klee-uclibc-32
217
+ WORKDIR $UTBOT_ALL/klee-uclibc-32
218
+ RUN ./configure --make-llvm-lib && make KLEE_CFLAGS="-m32" -j`nproc`
212
219
213
- # Install 32bits libs AFTER LLVM compilation
214
- RUN apt update && apt install -y --no-install-recommends gcc-multilib g++-multilib gcc-9-multilib g++-9-multilib
220
+ # Install uclibc-64
221
+ RUN git clone -b klee_uclibc_v1.2 https://github.com/klee/klee-uclibc.git $UTBOT_ALL/klee-uclibc-64
222
+ WORKDIR $UTBOT_ALL/klee-uclibc-64
223
+ RUN ./configure --make-llvm-lib && make -j`nproc`
215
224
216
225
# Download library for access private members
217
226
RUN git clone https://github.com/martong/access_private.git $UTBOT_ALL/access_private
0 commit comments