Skip to content

Instantly share code, notes, and snippets.

@mottosso
Last active July 10, 2017 01:02
Show Gist options
  • Save mottosso/079a94008192a222c837812d7c9f14ea to your computer and use it in GitHub Desktop.
Save mottosso/079a94008192a222c837812d7c9f14ea to your computer and use it in GitHub Desktop.
Build and install Qt from scratch

Usage

The Docker image contains the OS and dependencies to produce a standalone copy of Qt 5.6, written to the current working directory.

Install

$ git clone https://gist.github.com/079a94008192a222c837812d7c9f14ea.git build-qt5
$ cd build-qt5
$ docker build -t mottosso/scientific:6.6-qt5 .
$ docker run -ti --rm -v $(pwd):/home/root mottosso/scientific:6.6-qt5 bash build.sh
$ cd qt5.6
VERSION="5.6"
WORKDIR="/tmp"
INSTALLDIR="$(pwd)/qt${VERSION}"
# Get source
RUN git clone git://code.qt.io/qt/qt5.git ${WORKDIR}/qt5 && \
cd ${WORKDIR}/qt5 && \
git checkout ${VERSION} && \
perl init-repository
RUN mkdir -p ${INSTALLDIR} && \
cd ${INSTALLDIR} && \
{$WORKDIR}/qt5/configure \
-developer-build \
-opensource \
-nomake examples \
-no-gtkstyle \
-confirm-license \
-nomake tests && \
make -j4
# Based on https://wiki.qt.io/Building_Qt_5_from_Git
FROM ringo/scientific:6.6
MAINTAINER marcus@abstractfactory.io
# Prerequisities, among others, GCC 4.7.1
RUN wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo && \
yum install -y \
wget \
libxcb \
libxcb-devel \
xcb-util \
xcb-util-devel \
devtoolset-1.1
WORKDIR /home/root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment