User:Donnguyen: Difference between revisions

From KDE UserBase Wiki
(Test with build instructions)
 
(Added text formatting)
Line 1: Line 1:
Instructions for buliding 31 Aug 2016
= Building KDE/Plasma 5 on Ubuntu 14.04 LTS =
The aim of this guide is to help you build KDE Plasma 5 for development and/or use.
The aim of this guide is to help you build KDE Plasma 5 for development and/or use. These instructions are valid as of 31 Aug 2016.
Install a recent version of cmake  
 
== Install a recent version of cmake ==
{{Input|1=<nowiki>
sudo apt-get install build-essential
sudo apt-get install build-essential
wget https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
wget https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
Line 10: Line 12:
sudo apt-get install checkinstall
sudo apt-get install checkinstall
sudo checkinstall
sudo checkinstall
</nowiki>}}


Upgrade mesa-dev, wayland-dev and network manager from additional PPA's  
== Upgrade libwayland-dev and network-manager from additional PPA's ==
sudo add-apt-repository ppa:xorg-edgers/ppa  
Upgrade libwayland-dev and related dependencies:
{{Input|1=<nowiki>sudo add-apt-repository ppa:xorg-edgers/ppa  
sudo apt-get update    
sudo apt-get update    
sudo apt-get install libwayland-dev  
sudo apt-get install libwayland-dev  
 
</nowiki>}}
sudo add-apt-repository ppa:9v-shaun-42/networkmanager   
Upgrade network-manager and related dependencies:
{{Input|1=<nowiki>sudo add-apt-repository ppa:9v-shaun-42/networkmanager   
sudo apt-get update  
sudo apt-get update  
sudo apt-get install network-manager  
sudo apt-get install network-manager  
You may lose network connection after this step.  Reboot to fix.
</nowiki>}}
{{Tip|You may lose network connection after this step.  Reboot to fix.}}


Install Qt5.7.0 using installer  
== Install Qt5.7.0 using installer ==
sudo ./qt-opensource-linux-x64-5.7.0.run
Install to default: /opt/Qt5.7.0
Install to default: /opt/Qt5.7.0
{{Input|1=<nowiki>sudo ./qt-opensource-linux-x64-5.7.0.run</nowiki>}}
Choose default options and include "Sources" option
Choose default options and include "Sources" option
On my computer it appears to be stuck at 4%(dialog box doesn't respond), but it installs just fine if I wait.
{{Note|On my computer it appears to be stuck at 4%(dialog box doesn't respond), but it installs just fine if I wait.}}
 
== Install some build dependencies ==


Install some build dependencies
{{Input|1=<nowiki>sudo apt-get build-dep kde-workspace qtbase5-dev</nowiki>}}
sudo apt-get build-dep kde-workspace qtbase5-dev


Build qtwebkit  
== Build qtwebkit ==
Qtwebkit dependencies
Qtwebkit dependencies
sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby
{{Input|1=<nowiki>sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby</nowiki>}}
 
Install git
sudo apt-get install git
{{Input|1=<nowiki>sudo apt-get install git</nowiki>}}
git clone git://code.qt.io/qt/qtwebkit.git --branch 5.7.0  
Build qtwebkit
{{Input|1=<nowiki>git clone git://code.qt.io/qt/qtwebkit.git --branch 5.7.0  
mkdir qtwebkit-build  
mkdir qtwebkit-build  
cd qtwebkit-build  
cd qtwebkit-build  
Line 41: Line 50:
make
make
sudo make install  
sudo make install  
Setup kdesrc-build and .kdesrc-buildrc
</nowiki>}}
 
== Setup kdesrc-build and .kdesrc-buildrc ==
 
https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source
https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source
Git remote prefix
Git remote prefix
Line 72: Line 84:
end global
end global


Set qtdir to output of qmake –v minus the lib
     kdedir /opt/kde-5 # Where to install KF5-based software
     kdedir /opt/kde-5 # Where to install KF5-based software
     qtdir /opt/Qt5.7.0/5.7/gcc_64    # Where to find Qt5
     qtdir /opt/Qt5.7.0/5.7/gcc_64    # Where to find Qt5
�Make sure you have write access to the director specified by kdedir!
{{Remember|Make sure you have write access to the director specified by kdedir!}}
Remember to set qtdir to output of qmake –v minus the lib
 
Setup baloo section to fix compile error
===Setup baloo section to fix compile error ===
options baloo
 
{{Input|1=<nowiki>options baloo
     cmake-options -DCMAKE_CXX_FLAGS="-lc"
     cmake-options -DCMAKE_CXX_FLAGS="-lc"
end options  
end options  
</nowiki>}}


Kdesrce-build needs xml-parser-perl
kdesrc-build needs xml-parser-perl
sudo apt-get install libxml-parser-perl
{{Input|1=<nowiki>sudo apt-get install libxml-parser-perl</nowiki>}}


build
== Build plasma-desktop ==
Some more dependencies
Some more dependencies
sudo apt-get build-dep polkit-qt-1
{{Input|1=<nowiki>sudo apt-get build-dep polkit-qt-1
sudo apt-get install libgif-dev
sudo apt-get install libgif-dev
sudo apt-get install libnm-glib-dev
sudo apt-get install libnm-glib-dev
Line 93: Line 109:
sudo apt-get install liblmdb-dev
sudo apt-get install liblmdb-dev
sudo apt-get install libxapian-dev
sudo apt-get install libxapian-dev
</nowiki>}}
Mkdir extra-deb
Download and install some packages from Xenial:
Cd extra-deb
{{Input|1=<nowiki>mkdir extra-deb
cd extra-deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon-dev_0.5.0-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon-dev_0.5.0-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon0_0.5.0-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon0_0.5.0-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy-dev_1.3.1-1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy-dev_1.3.1-1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy0_1.3.1-1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy0_1.3.1-1_amd64.deb
dpkg -I *.deb�
dpkg -I *.deb
kdesrc-build --include-dependencies plasma-desktop
</nowiki>}}
Build:
{{Input|1=<nowiki>kdesrc-build --include-dependencies plasma-desktop</nowiki>}}


Build some extra applications
== Build some extra applications ==
{{Input|1=<nowiki>
kdesrc-build applications
kdesrc-build applications
</nowiki>}}


Set up environment to run plasma 5
== Set up environment to run plasma 5 ==

Revision as of 16:58, 1 September 2016

Building KDE/Plasma 5 on Ubuntu 14.04 LTS

The aim of this guide is to help you build KDE Plasma 5 for development and/or use. These instructions are valid as of 31 Aug 2016.

Install a recent version of cmake

sudo apt-get install build-essential
wget https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
tar -zxvf cmake-3.6.1.tar.gz
cd cmake-3.6.1/
./configure
make
sudo apt-get install checkinstall
sudo checkinstall

Upgrade libwayland-dev and network-manager from additional PPA's

Upgrade libwayland-dev and related dependencies:

sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update   
sudo apt-get install libwayland-dev 

Upgrade network-manager and related dependencies:

sudo add-apt-repository ppa:9v-shaun-42/networkmanager  
sudo apt-get update 
sudo apt-get install network-manager 

Tip

You may lose network connection after this step. Reboot to fix.


Install Qt5.7.0 using installer

Install to default: /opt/Qt5.7.0

sudo ./qt-opensource-linux-x64-5.7.0.run

Choose default options and include "Sources" option

Note

On my computer it appears to be stuck at 4%(dialog box doesn't respond), but it installs just fine if I wait.


Install some build dependencies

sudo apt-get build-dep kde-workspace qtbase5-dev

Build qtwebkit

Qtwebkit dependencies

sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby

Install git

sudo apt-get install git

Build qtwebkit

git clone git://code.qt.io/qt/qtwebkit.git --branch 5.7.0 
mkdir qtwebkit-build 
cd qtwebkit-build 
/opt/Qt5.7.0/5.7/gcc_64/bin/qmake ../qtwebkit
make
sudo make install 

Setup kdesrc-build and .kdesrc-buildrc

https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source Git remote prefix Let's setup a "kde:" prefix for git commands. Add the following text to your ~/.gitconfig: [url "git://anongit.kde.org/"]

  insteadOf = kde:

[url "ssh://[email protected]/"]

  pushInsteadOf = kde:

mkdir ~/kdesrc cd ~/kdesrc

git clone kde:kdesrc-build

cd kdesrc-build

cp kdesrc-buildrc-kf5-sample ~/.kdesrc-buildrc

  1. Install a symlink of kdesrc-build to a location in PATH

mkdir ~/bin ln -s $PWD/kdesrc-build ~/bin export PATH=~/bin:$PATH

Configure kdesrc-build edit~/.kdesrc-buildrcReplace/path/to/kdesrc-build/kf5-qt5-build-includewith~/kdesrc/kdesrc-build/kf5-qt5-build-includein ~/.kdesrc-buildrc file Addignore-kde-structure trueandmake-options -jNto the global section in ~/.kdesrc-buildrcglobal

 ...
 ignore-kde-structure true
 make-options -j5 # NOTE: 5 is the number of jobs, this should usually be (number-of-cpu-cores + 1)
 #stop-on-failure        true        # Stop kdesrc-build 
 ...

end global

Set qtdir to output of qmake –v minus the lib

   kdedir /opt/kde-5 # Where to install KF5-based software
   qtdir /opt/Qt5.7.0/5.7/gcc_64     # Where to find Qt5

Remember

Make sure you have write access to the director specified by kdedir!


Setup baloo section to fix compile error

options baloo
    cmake-options -DCMAKE_CXX_FLAGS="-lc"
end options 

kdesrc-build needs xml-parser-perl

sudo apt-get install libxml-parser-perl

Build plasma-desktop

Some more dependencies

sudo apt-get build-dep polkit-qt-1
sudo apt-get install libgif-dev
sudo apt-get install libnm-glib-dev
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev
sudo apt-get install libattr1-dev
sudo apt-get install liblmdb-dev
sudo apt-get install libxapian-dev

Download and install some packages from Xenial:

mkdir extra-deb
cd extra-deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon-dev_0.5.0-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon0_0.5.0-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy-dev_1.3.1-1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libe/libepoxy/libepoxy0_1.3.1-1_amd64.deb
dpkg -I *.deb

Build:

kdesrc-build --include-dependencies plasma-desktop

Build some extra applications

kdesrc-build applications

Set up environment to run plasma 5