Skip to content

Instantly share code, notes, and snippets.

@reytech-dev
Last active June 1, 2021 12:31
Show Gist options
  • Save reytech-dev/288fd6bfa10753ebe219302d83dd56f4 to your computer and use it in GitHub Desktop.
Save reytech-dev/288fd6bfa10753ebe219302d83dd56f4 to your computer and use it in GitHub Desktop.
Prepare environment and compile kdeconnect-app with QT 5.15.0

Prepare local build environment and compile kdeconnect-app

The following instructions where tested with ubuntu 20.04.

The following module builds of kdeconnect-app will fail with the given instructions (so far, will update the gist asap I found out whats missing):

Requirements

  1. QT 5.15.0
  2. extra-cmake-modules 3.16.3
  3. kdesrc-build
  4. gcc

Required packages

  1. sudo apt install build-essential libgl1-mesa-dev libpolkit-gobject-1-dev libxcb-util0-dev libxslt-dev libpolkit-agent-1-dev libgcrypt-dev libboost-all-dev xattr libattr1-dev

Instructions

Build extra-cmake-modules

  1. Clone repo
$ git clone https://github.com/KDE/extra-cmake-modules.git
  1. Create build dir in cloned repo
$ cd cd extra-cmake-modules && mkdir build
  1. Install extra-cmake-modules
$ sudo make install

Setup kdesrc-build Original source

  1. Setup local directories
$ mkdir -p ~/kde/src && cd ~/kde/src/

2 Clone repo

$ git clone https://invent.kde.org/sdk/kdesrc-build.git && cd kdesrc-build
  1. Setup kdesrc-build Assuming your are using bash as shell. If not, answer the last prompt with "n" and copy the result in your used shell config.
$ ./kdesrc-build --initial-setup && source ~/.bashrc
  1. Update local source code configuration
$ kdesrc-build --metadata-only && kdesrc-build --pretend

Setup QT-5.15.0 Original source

  1. Download source code
$ wget https://download.qt.io/archive/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz -O ~/Downloads/ 
  1. Extract source code How To
$ cd ~/Downloads/ && tar -xvf qt-everywhere-src-5.15.0.tar.xz && cd qt-everywhere-src-5.15.0
  1. Prepare build & build Depending on your used hardware, this will take quite some time
$ export QT5PREFIX=/opt/qt5 && ./configure -prefix $QT5PREFIX                        \
            -sysconfdir /etc/xdg                      \
            -confirm-license                          \
            -opensource                               \
            -dbus-linked                              \
            -openssl-linked                           \
            -system-harfbuzz                          \
            -system-sqlite                            \
            -nomake examples                          \
            -no-rpath                                 \
            -skip qtwebengine                         &&
make
  1. Install build as root
sudo su && make install && export QT5PREFIX=/opt/qt5

This qt setup is sufficient for our usecase. If you want to configure qt properly, please follow the instructions here: https://www.linuxfromscratch.org/blfs/view/svn/x/qt5.html

Build kdeconnect-app

The argument --refresh-build is throwing away any build binary form a previous run and is rebuilding everything from scratch.

  1. Build required packages (First time, without --refresh-build)
$ LD_LIBRARY_PATH=/opt/qt5/lib kdesrc-build --include-dependencies --refresh-build kdeconnect-kde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment