1
0
mirror of https://git.koehlerweb.org/frodovdr/guac-install synced 2025-07-06 15:53:33 +02:00

Fix gcc-7 & Update Docker (#38)

* Force guacd compile with gcc-6 to resolve gcc-7 compile issues

* Update docker version
This commit is contained in:
Chase Wright
2018-03-12 16:44:55 -05:00
committed by GitHub
parent 9a6da88418
commit baac552de0
4 changed files with 127 additions and 66 deletions

View File

@ -4,7 +4,7 @@
GUACVERSION="0.9.14"
# Update apt so we can search apt-cache for newest tomcat version supported
apt update
apt-get update
# Get script arguments for non-interactive mode
while [ "$1" != "" ]; do
@ -93,17 +93,28 @@ fi
#TOMCAT=""
# Install features
apt -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \
apt-get -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \
libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \
libvorbis-dev libwebp-dev mysql-server mysql-client mysql-common mysql-utilities libmysql-java ${TOMCAT} freerdp-x11 \
ghostscript wget dpkg-dev
# If apt fails to run completely the rest of this isn't going to work...
if [ $? -ne 0 ]; then
echo "apt failed to install all required dependencies"
echo "apt-get failed to install all required dependencies"
exit
fi
# Hack for gcc7
if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]]
then
apt-get -y install gcc-6
if [ $? -ne 0 ]
then
echo "apt-get failed to install gcc-6"
exit
fi
fi
# Set SERVER to be the preferred download server from the Apache CDN
SERVER="http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUACVERSION}"
@ -139,11 +150,11 @@ tar -xzf guacamole-auth-jdbc-${GUACVERSION}.tar.gz
mkdir -p /etc/guacamole/lib
mkdir -p /etc/guacamole/extensions
# Install guacd
# Install guacd # Hack for gcc7 #
cd guacamole-server-${GUACVERSION}
./configure --with-init-dir=/etc/init.d
make
make install
CC="gcc-6" ./configure --with-init-dir=/etc/init.d
CC="gcc-6" make
CC="gcc-6" make install
ldconfig
systemctl enable guacd
cd ..