Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/qt6-build-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: docker-qt6-build-arm64

on:
push:
paths:
- 'docker/qt6-build/**'
pull_request:
paths:
-'docker/qt6-build/**'
workflow_dispatch:

jobs:
build:
if: ${{ github.repository_owner == 'mltframework' }}
runs-on: ubuntu-24.04-arm

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push to Docker Hub
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:docker/qt6-build"
platforms: linux/arm64
build-args: |
UBUNTU_VERSION=24.04
QT_MAJOR=6.5
QT_VERSION=6.5.6
push: true
tags: mltframework/qt:6.5.6-ubuntu24.04-arm64
7 changes: 6 additions & 1 deletion .github/workflows/qt6-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@ jobs:
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:docker/qt6-build"
platforms: linux/amd64,linux/arm64
build-args: |
UBUNTU_VERSION=20.04
QT_MAJOR=6.5
QT_VERSION=6.5.6
push: true
tags: mltframework/qt:6.4.3-ubuntu18.04
tags: mltframework/qt:6.5.6-ubuntu20.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this version? Did you build this and verify that builds using the version of g++ in Ubuntu 20.04. The reason this says ubuntu:18.04 is because GitHub Actions times out building this, and I need to build it locally and push the image. So, this workflow is not really used anymore.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. QT 6.4.3 is not available and breaks the build
  2. ubuntu 20.04 seemed to be the currently employed version for your other builds

Copy link
Member

@ddennedy ddennedy Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mltframework/qt:6.4.3-ubuntu18.04 is not available, but mltframework/qt:6.4.3-ubuntu20.04 IS. The shotcut-build image for x86-64 MUST remain the way it is currently--on mltframework/qt:6.4.3-ubuntu20.04. Remove all changes to this file because it not used currently, and you must build the qt image yourself.

36 changes: 36 additions & 0 deletions .github/workflows/shotcut-build-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: docker-shotcut-build-arm64

on:
push:
paths:
- 'docker/shotcut-build/**'
pull_request:
paths:
-'docker/shotcut-build/**'
workflow_dispatch:

jobs:
build:
if: ${{ github.repository_owner == 'mltframework' }}
runs-on: ubuntu-24.04-arm

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push to Docker Hub
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:docker/shotcut-build"
platforms: linux/arm64
build-args: |
UBUNTU_VERSION=24.04
QT_VERSION=6.5.6
push: true
tags: mltframework/shotcut-build:qt6.5.6-ubuntu24.04-arm64
5 changes: 4 additions & 1 deletion .github/workflows/shotcut-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:docker/shotcut-build"
build-args: |
UBUNTU_VERSION=20.04
QT_VERSION=6.5.6
push: true
tags: mltframework/shotcut-build:qt6.4.3-ubuntu20.04
tags: mltframework/shotcut-build:qt6.5.6-ubuntu20.04
10 changes: 5 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Build Qt 6 for Linux

docker build --rm -t mltframework/qt:6.4.3-ubuntu20.04 docker/qt6-build
docker run -it --rm -v $PWD:/mnt mltframework/qt:6.4.3-ubuntu20.04
s3cmd --acl-public put qt-6.4.3-ubuntu20.04-x86_64.txz s3://misc.meltymedia/shotcut-build/
docker build --rm -t mltframework/qt:6.5.6-ubuntu20.04 docker/qt6-build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must remain mltframework/qt:6.4.3-ubuntu20.04

docker run -it --rm -v $PWD:/mnt mltframework/qt:6.5.6-ubuntu20.04
s3cmd --acl-public put qt-6.5.6-ubuntu20.04-x86_64.txz s3://misc.meltymedia/shotcut-build/

## Build Shotcut for Linux

docker build --rm -t mltframework/shotcut-build:qt6.4.3-ubuntu20.04 docker/shotcut-build
docker build --rm -t mltframework/shotcut-build:qt6.5.6-ubuntu20.04 docker/shotcut-build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must remain qt6.4.3-ubuntu20.04

mkdir work; cd work
wget --no-check-certificate https://raw.githubusercontent.com/mltframework/shotcut/master/scripts/build-shotcut.sh
docker run -it --rm -v $PWD:/root/shotcut mltframework/shotcut-build:qt6.4.3-ubuntu20.04 ./build-shotcut.sh
docker run -it --rm -v $PWD:/root/shotcut mltframework/shotcut-build:qt6.5.6-ubuntu20.04 ./build-shotcut.sh

Artifacts will be in work.
107 changes: 87 additions & 20 deletions docker/qt6-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,111 @@
FROM ubuntu:20.04 AS base
ARG UBUNTU_VERSION=20.04
ARG QT_MAJOR=6.5
ARG QT_VERSION=6.5.6
FROM ubuntu:${UBUNTU_VERSION} AS base
LABEL maintainer="[email protected]"

FROM base as build
ARG UBUNTU_VERSION=20.04
ARG QT_MAJOR=6.5
ARG QT_VERSION=6.5.6

# Debug: Show actual values being used (overrides from build-args)
RUN echo "UBUNTU_VERSION override with build-arg to: ${UBUNTU_VERSION}" && \
echo "QT_MAJOR override with build-arg to: ${QT_MAJOR}" && \
echo "QT_VERSION override with build-arg to: ${QT_VERSION}"

# Add deb-src lines to make apt-get build-dep work.
RUN cat /etc/apt/sources.list | sed "s/deb /deb-src /" >> /etc/apt/sources.list
# Handle both old format (20.04/22.04) and new deb822 format (24.04+)
RUN if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \
# New format: deb822 format in ubuntu.sources (24.04+)
sed 's/Types: deb$/Types: deb-src/' /etc/apt/sources.list.d/ubuntu.sources > /etc/apt/sources.list.d/ubuntu-src.sources; \
elif [ -f /etc/apt/sources.list ] && grep -q "^deb " /etc/apt/sources.list; then \
# Old format: traditional sources.list (20.04/22.04)
cat /etc/apt/sources.list | sed "s/deb /deb-src /" >> /etc/apt/sources.list; \
fi
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && \
apt-get -yqq upgrade && \
apt-get -yqq build-dep qt5-default && \
apt-get -yqq install curl libxslt-dev libwebp-dev flex bison gperf ruby \
s3cmd libxcb1-dev libxcb-util-dev gpg software-properties-common \
g++ clang-10 libclang-10-dev libvulkan-dev ninja-build && \
curl https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - >/etc/apt/trusted.gpg.d/kitware.gpg && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update -qq && \
apt-get install -yqq cmake

# Update system packages
RUN apt-get -qq update && apt-get -yqq upgrade

# Install Qt5 build dependencies - version specific
RUN if [ "${UBUNTU_VERSION}" = "24.04" ]; then \
# Ubuntu 24.04: qt5-default doesn't exist, use qtbase5-dev instead
apt-get -yqq install qtbase5-dev qtbase5-dev-tools || apt-get -yqq install \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not install qt5. build-dep is just a convenient way to get many dependencies since those are common between major versions. Maybe there is something like that better for qt6 on newer ubuntu.

build-essential libgl1-mesa-dev libglu1-mesa-dev libxrender-dev \
libxi-dev libxrandr-dev libxcursor-dev libxinerama-dev libxss-dev \
libxdamage-dev libxcomposite-dev libxrandr-dev; \
else \
# Ubuntu 20.04/22.04: use qt5-default
apt-get -yqq build-dep qt5-default || apt-get -yqq install \
build-essential libgl1-mesa-dev libglu1-mesa-dev libxrender-dev \
libxi-dev libxrandr-dev libxcursor-dev libxinerama-dev libxss-dev \
libxdamage-dev libxcomposite-dev libxrandr-dev; \
fi

# Install common build tools
RUN apt-get -yqq install curl libxslt-dev libwebp-dev flex bison gperf ruby \
s3cmd libxcb1-dev libxcb-util-dev gpg software-properties-common \
g++ ninja-build libssl-dev

# Install Clang - version specific
RUN if [ "${UBUNTU_VERSION}" = "24.04" ]; then \
# Ubuntu 24.04: clang-10 doesn't exist, use clang-18
apt-get -yqq install clang-18 libclang-18-dev || apt-get -yqq install clang libclang-dev; \
else \
# Ubuntu 20.04/22.04: prefer clang-10
apt-get -yqq install clang-10 libclang-10-dev || apt-get -yqq install clang libclang-dev; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using clang supports installing a newer version of C++ that is in newer Qt?

fi

# Install remaining dependencies
RUN apt-get -yqq install libvulkan-dev

# Install CMake - version specific approach
RUN if [ "${UBUNTU_VERSION}" = "24.04" ]; then \
# Ubuntu 24.04: has recent CMake, use default
apt-get -yqq install cmake; \
else \
# Ubuntu 20.04/22.04: use Kitware repository for newer CMake
curl https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - >/etc/apt/trusted.gpg.d/kitware.gpg && \
(apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' || \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ jammy main') && \
apt-get update -qq && \
apt-get install -yqq cmake; \
fi

WORKDIR /root
RUN curl -L https://download.qt.io/official_releases/qt/6.4/6.4.3/single/qt-everywhere-src-6.4.3.tar.xz | tar xJ
RUN curl -L https://download.qt.io/official_releases/qt/${QT_MAJOR}/${QT_VERSION}/src/single/qt-everywhere-opensource-src-${QT_VERSION}.tar.xz | tar xJ

RUN cmake -S qt-everywhere-src-6.4.3 -B build -G Ninja -Wno-dev \
-D CMAKE_INSTALL_PREFIX=/root/Qt/6.4.3/gcc_64 \
RUN cmake -S qt-everywhere-src-${QT_VERSION} -B build -G Ninja -Wno-dev \
-D CMAKE_INSTALL_PREFIX=/root/Qt/${QT_VERSION}/gcc_64 \
-D CMAKE_BUILD_TYPE=Release \
-D FEATURE_sql=ON \
-D QT_BUILD_EXAMPLES=OFF \
-D QT_BUILD_TESTS=OFF \
-D BUILD_qt3d=OFF \
-D BUILD_qtwebengine=OFF \
-D FEATURE_openssl_runtime=ON
-D FEATURE_openssl=ON
Comment on lines -31 to +87
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this? I do not want to include OpenSSL and prefer to load it at runtime.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had open ssl errors otherwise

RUN cmake --build build --parallel --target install
RUN cd /root && \
printf "[Paths]\nPrefix=..\n" > Qt/6.4.3/gcc_64/bin/qt.conf && \
cp -p /usr/lib/x86_64-linux-gnu/libicu*.so.66 Qt/6.4.3/gcc_64/lib
printf "[Paths]\nPrefix=..\n" > Qt/${QT_VERSION}/gcc_64/bin/qt.conf && \
ARCH=$(dpkg --print-architecture) && \
if [ "$ARCH" = "amd64" ]; then \
cp -p /usr/lib/x86_64-linux-gnu/libicu*.so.* Qt/${QT_VERSION}/gcc_64/lib || true; \
elif [ "$ARCH" = "arm64" ]; then \
cp -p /usr/lib/aarch64-linux-gnu/libicu*.so.* Qt/${QT_VERSION}/gcc_64/lib || true; \
fi

FROM base
ARG DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_VERSION=20.04
ARG QT_VERSION=6.5.6

# Debug: Show actual values in final stage
RUN echo "Final stage - UBUNTU_VERSION override with build-arg to: ${UBUNTU_VERSION}" && \
echo "Final stage - QT_VERSION override with build-arg to: ${QT_VERSION}"

RUN apt-get -qq update && apt-get -yqq install xz-utils

WORKDIR /root
COPY --from=build /root/Qt/ /root/Qt/

CMD tar cJf /mnt/qt-6.4.3-ubuntu20.04-x86_64.txz Qt
CMD ARCH=$(dpkg --print-architecture) && tar cJf /mnt/qt-${QT_VERSION}-ubuntu${UBUNTU_VERSION}-${ARCH}.txz Qt
44 changes: 39 additions & 5 deletions docker/shotcut-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM ubuntu:20.04
ARG UBUNTU_VERSION=20.04
FROM ubuntu:${UBUNTU_VERSION}
LABEL maintainer="[email protected]"

ARG DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_VERSION=20.04
RUN apt-get update -qq && \
apt-get -yqq upgrade && \
apt-get install -yqq git automake autoconf libmp3lame-dev libepoxy-dev \
Expand All @@ -10,7 +12,7 @@ RUN apt-get update -qq && \
libxml2-dev ladspa-sdk libjack-dev libsox-dev libsdl2-dev libgtk2.0-dev \
libxslt1-dev libexif-dev libdv-dev libtheora-dev libwebp-dev libfftw3-dev \
libvorbis-dev libeigen3-dev libxkbcommon-x11-0 libegl1-mesa-dev \
gettext gperf intltool swig python3.9-dev python-is-python3 flex bison make \
gettext gperf intltool swig python3-dev python-is-python3 flex bison make \
xutils-dev libffi-dev libltdl-dev libssl-dev libxml-parser-perl \
openssl patch perl pkg-config ruby scons sed unzip wget xz-utils \
libcurl4-openssl-dev autopoint p7zip bzip2 zip curl libva-dev \
Expand All @@ -19,14 +21,46 @@ RUN apt-get update -qq && \
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 liblist-moreutils-perl && \
curl https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - >/etc/apt/trusted.gpg.d/kitware.gpg && \
apt-add-repository 'ppa:ubuntu-toolchain-r/test' && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
(apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' || \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ jammy main' || \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ noble main') && \
apt-get update -qq && \
apt-get install -yqq g++-10 cmake libclang-cpp10 && \
# Install GCC and CMake - version specific
if [ "${UBUNTU_VERSION}" = "24.04" ]; then \
# Ubuntu 24.04: g++-10 may not be available, use default g++
apt-get install -yqq g++ cmake || apt-get install -yqq g++-10 cmake; \
else \
# Ubuntu 20.04/22.04: prefer g++-10
apt-get install -yqq g++-10 cmake; \
fi && \
# Install libclang - version specific
if [ "${UBUNTU_VERSION}" = "24.04" ]; then \
# Ubuntu 24.04: libclang-cpp10 doesn't exist, use libclang-cpp18
apt-get install -yqq libclang-cpp18 || \
apt-get install -yqq libclang-cpp-dev; \
else \
# Ubuntu 20.04/22.04: prefer older versions
apt-get install -yqq libclang-cpp10 || \
apt-get install -yqq libclang-cpp11 || \
apt-get install -yqq libclang-cpp14 || \
apt-get install -yqq libclang-cpp-dev; \
fi && \
pip3 install meson

# Set compiler environment variables - version specific
ARG UBUNTU_VERSION=20.04
ENV CC=gcc-10 CXX=g++-10
RUN if [ "${UBUNTU_VERSION}" = "24.04" ]; then \
# Ubuntu 24.04: may use default gcc/g++
if ! command -v g++-10 >/dev/null 2>&1; then \
export CC=gcc CXX=g++; \
fi; \
fi
WORKDIR /root
COPY --from=mltframework/qt:6.4.3-ubuntu20.04 /root/Qt Qt
ARG UBUNTU_VERSION=20.04
ARG QT_VERSION=6.5.6
ARG QT_TAG=${QT_VERSION}-ubuntu${UBUNTU_VERSION}
COPY --from=mltframework/qt:${QT_TAG} /root/Qt Qt

WORKDIR /root/shotcut
ENTRYPOINT ["/bin/bash"]
Expand Down