Skip to content

Instantly share code, notes, and snippets.

@mister-good-deal
Last active April 8, 2019 11:48
Show Gist options
  • Save mister-good-deal/44ee14445a92fa138960fdbf30de3196 to your computer and use it in GitHub Desktop.
Save mister-good-deal/44ee14445a92fa138960fdbf30de3196 to your computer and use it in GitHub Desktop.
Helper commands to compile git from source

GIT

repo: git://code.qt.io/qt/qt5.git

submodules: sudo git submodule foreach git [command]

clean directory: git clean -fdX

Compilation

Dynamic

./configure -platform linux-g++ -c++std c++1z -nomake tests -nomake examples -opensource -confirm-license -release

Static

./configure -prefix /usr/local/Qt-5.12.0/static -static -platform linux-g++ -c++std c++1z -ltcg -nomake tests -nomake examples -nomake tools -no-pch -opensource -confirm-license -release

XCB

sudo apt install libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev

sudo apt install libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev

sudo apt install libxrender-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-xfixes0-dev libxcb-sync-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-image0-dev libfontconfig1-dev libfreetype6-dev libxi-dev libxinerama-dev libxext-dev libx11-xcb-dev libx11-dev libxcb1-dev libsm-dev libice-dev libglib2.0-dev libpthread-stubs0-dev libpthread-workqueue-dev libinput-dev libxkbcommon-dev libxkbcommon-x11-dev

GCC 7

gist

Android

./configure -xplatform android-clang --disable-rpath -nomake tests -nomake examples -android-ndk <path/to/ndk> -android-sdk <path/to/sdk> -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -skip qttranslations -skip qtserialport -no-warnings-are-errors -opensource -confirm-license -prefix /usr/local/Qt-5.12.2-android

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