mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-27 10:33:34 +01:00
Fix Kali build by using gcc 11
This commit is contained in:
parent
1e4ca3563c
commit
3e3462a4de
@ -1,4 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
detect_quilt() {
|
||||
if which quilt 1>/dev/null; then
|
||||
@ -13,11 +15,30 @@ ensure_crashpad_can_fetch_line_number_by_address() {
|
||||
fi
|
||||
}
|
||||
|
||||
fail_on_gcc_12() {
|
||||
if [[ -n "$CC" && -n "$CXX" ]]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
if gcc --version | head -1 | grep -q 12; then
|
||||
cat >&2 <<EOF
|
||||
|
||||
Error: gcc 12 detected. It has a bug causing the build to fall because of a
|
||||
-Warray-bounds bug. Please use gcc 11 in the build Dockerfile:
|
||||
ENV CC=gcc-11
|
||||
ENV CXX=g++-11
|
||||
RUN <install gcc 11>
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# For build-dep to work, the apt sources need to have the source server
|
||||
#sudo apt-get build-dep xorg-server
|
||||
|
||||
#sudo apt-get install cmake git libjpeg-dev libgnutls-dev
|
||||
|
||||
fail_on_gcc_12
|
||||
# Ubuntu applies a million patches, but here we use upstream to simplify matters
|
||||
cd /tmp
|
||||
# default to the version of x in Ubuntu 18.04, otherwise caller will need to specify
|
||||
|
@ -4,6 +4,8 @@ ENV KASMVNC_BUILD_OS kali
|
||||
ENV KASMVNC_BUILD_OS_CODENAME kali-rolling
|
||||
ENV XORG_VER 1.20.10
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV CC=gcc-11
|
||||
ENV CXX=g++-11
|
||||
|
||||
RUN grep '^deb' /etc/apt/sources.list | sed 's#^deb#deb-src#' >> /etc/apt/sources.list
|
||||
|
||||
@ -12,6 +14,7 @@ RUN apt-get update && \
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
||||
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
|
||||
RUN apt-get update && apt-get -y install gcc-11 g++-11
|
||||
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
||||
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
|
||||
|
||||
@ -20,7 +23,7 @@ RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/rel
|
||||
RUN cd /tmp && tar -xzf /tmp/libwebp-*
|
||||
RUN cd /tmp/libwebp-1.0.2 && \
|
||||
./configure --enable-static --disable-shared && \
|
||||
make && make install
|
||||
make -j$(nproc) && make install
|
||||
|
||||
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user