Skip to content

Instantly share code, notes, and snippets.

@jpbarto
Last active September 14, 2022 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jpbarto/52db50e0015fc6b2cd957f2bc44f6808 to your computer and use it in GitHub Desktop.
Save jpbarto/52db50e0015fc6b2cd957f2bc44f6808 to your computer and use it in GitHub Desktop.
QT5 Install Script
#!/usr/bin/bash
# This script is built to compile Qt5 on an Amazon Linux2-based Amazon Workspace
# This script is known to fail on a Standard Workspace with 2 vCPU and 4 GB of RAM (Out of Memory error suspected)
# Script has been tested on a Power Workspace with 4 vCPU and 32 GB of RAM
# based upon documentation at
# https://doc.qt.io/qt-5/linux-requirements.html
set -e
QT5_DEPS="tar gzip wget libxkbcommon libxkbcommon-x11 gperf llvm llvm-config llvm-devel mesa-khr-devel xtst xi libXrandr-devel libXi-devel libXtst-devel libX11-devel xorg-x11-server-devel libXcomposite-devel libXcursor-devel dbus-devel libudev-devel libzstd-devel glibc-devel glib2-devel pcre-devel pcre2-devel libxcb-devel mesa-libEGL-devel freetype-devel mesa-libgbm-devel mtdev-devel vulkan-devel libxkbcommon-devel libxkbcommon-x11-devel libwebp-devel wayland-devel mesa-libwayland-egl-devel nss-devel fontconfig-devel jsoncpp-devel lcms2-devel libevent-devel libvpx-devel libwebp-devel libxml2-devel minizip-devel ninja-build opus-devel libpng-devel protobuf-c-devel protobuf-devel re2c snappy-devel alsa-lib-devel poppler-cpp-devel pulseaudio-libs-devel libxcb-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel"
QT5_SRC_HOST="https://download.qt.io/official_releases/qt/5.15/5.15.2/single"
QT5_SRC_TGZ="qt-everywhere-src-5.15.2.tar.xz"
QT5_TARBALL="${QT5_SRC_HOST}/${QT5_SRC_TGZ}"
QT5_SRC_DIR="qt-everywhere-src-5.15.2"
yum groupinstall -y "Development Tools"
yum install -y ${QT5_DEPS}
wget ${QT5_TARBALL}
tar xf ${QT5_SRC_TGZ}
cd ${QT5_SRC_DIR}
echo "y" | ./configure -opensource -xcb
make
make install
ln -s /usr/lib64/libpcap.so.1.5.3 /usr/lib64/libpcap.so.0.8
cat > /etc/ld.so.conf.d/qt5-5.15.2.conf <<EOF
/usr/local/Qt-5.15.2/lib
EOF
cat > /etc/ld.so.conf.d/zscaler.conf <<EOF
/opt/zscaler/lib
EOF
ldconfig
@jpbarto
Copy link
Author

jpbarto commented Oct 6, 2021

updated with feedback from parkync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment