Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

building qt6.8 under linux needs 55 GB, how can this be reduced?

Tags:

build

qt

qt6

We are using docker containers (ubuntu 22.04) for our build environment. One step is the installation of QT. The source is taken from here. The uncompressed source folder is about 4GB.

Then we compile with:

  tar xf qt-everywhere-src-6.8.2.tar.xz
  cd qt-everywhere-src-6.8.2

  mkdir qt6build
  cd qt6build

  ../configure -prefix /opt/qt6  \
  -nomake examples  \
  -nomake tests  \
  -nomake benchmarks  \
  -commercial -confirm-license \
  -bundled-xcb-xinput -xcb -xcb-xlib \
  -skip qt3d \
  -skip qtconnectivity \
  -skip qtdatavis3d \
  -skip qtgamepad \
  -skip qtlottie \
  -skip qtnetworkauth \
  -skip qtquicktimeline \
  -skip qtsensors \
  -skip qtspeech \
  -skip qtwebchannel \
  -skip qtwebengine \
  -skip qtwebglplugin

  cmake --build . --parallel "$(nproc)"
  cmake --install . 

Afterwards the docker container has grown about 50GB.

Is there any way to reduce this to a reasonable size?

  1. Can the source folder after the installation be deleted, or is it needed?
rm -rf qt-everywhere-src-6.8.2
rm -rf qt6-build
rm -f qt-everywhere-src-6.8.2.tar.xz
  1. Skiping more modules during configuration does not seem to have any impact to the resulting size (see here).We are only using the following qt modules:

Qt6 Core Svg Sql Network Test Widgets Multimedia MultimediaWidgets Quick QuickWidgets StateMachine

So my question is what can be done to reduce the size to about 10 GB ?

like image 493
user1911091 Avatar asked Dec 09 '25 16:12

user1911091


1 Answers

I don't see a "-release" or "-optimize-size" flag in your configure command.

build options

like image 68
mzimmers Avatar answered Dec 12 '25 04:12

mzimmers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!