Install All Needed Dependencies to Build GNOME 40 / GNOME latest on Debian / Ubuntu

3. Install all needed dependencies and other things necessary for using JHBuild to build GNOME

3.1 Clone inttf modulesets [normal user]

You can of course build original modulesets too, but this will fail and you have to figure out howto fix all errors. I use here currently GNOME 40.2 packages from /pub/GNOME/teams/releng/40.2/ and I have fixed and patched all packages to build and compile now:

cd ~/jhbuild/modulesets

git clone https://[email protected]/inttf/inttf-jhbuild-gnome.git

3.2 Prepare jhbuildrc [normal user]

Copy sample.jhbuildrc

cp ~/jhbuild/examples/sample.jhbuildrc ~/.config/jhbuildrc

Edit ~/.config/jhbuildrc add at least something like:

moduleset = 'inttf-jhbuild-gnome/inttf-gnome-40.2.modules'
modules = ['meta-inttf-gnome']
use_local_modulesets = True

## If you want limit CPU cores add (-j5 means 5 cores are used, default is all cores+1) ##
makeargs = '-j5'
ninjaargs = '-j5'
cmakeargs = '-j5'

3.3 Update apt-file database [root]

JHBuild uses apt-file to find dependencies

apt-file update

3.4 Install needed dependencies to pass JHBuild sysdeps check [root]

This might look ridiculous long list, but actually even this is not enough, this is just a beginning…

apt install libxslt1-dev libxml2-dev libpython3-dev libffi-dev zlib1g-dev \
libgl-dev libxext-dev libxrender-dev libx11-dev libxft-dev libicu-dev libpcre3-dev \
libegl-dev libxcursor-dev libdbus-1-dev libxtst-dev libxi-dev libpng-dev libunistring-dev \
libxkbcommon-x11-dev libxkbcommon-dev libwayland-dev libgraphviz-dev libfontconfig-dev \
libldap2-dev libespeak-dev libsystemd-dev libcanberra-gtk-dev libnss3-dev libfreetype-dev \
libplymouth-dev libarchive-dev libsqlite3-dev libproxy-dev libgnutls28-dev \
libp11-kit-dev uuid-dev liblcms2-dev libusb-1.0-0-dev libxkbfile-dev libmpc-dev libmpfr-dev \
libxrandr-dev libudev-dev libseccomp-dev libexif-dev libx11-xcb-dev libdrm-dev \
libxcomposite-dev libxcb-dri2-0-dev libgbm-dev check libevdev-dev libunwind-dev \
libmtdev-dev libhunspell-dev libavahi-gobject-dev libdbus-glib-1-dev libflac-dev \
libvpx-dev libxinerama-dev libtag1-dev libwavpack-dev libv4l-dev libpulse-dev libgles-dev \
libxdamage-dev libxt-dev libavfilter-dev libavformat-dev libavcodec-dev libavutil-dev \
libcanberra-gtk3-dev libndp-dev libnl-3-dev libnl-genl-3-dev libnl-route-3-dev \
libdb5.3-dev libcap-dev libegl1-mesa-dev libpwquality-dev libsmbclient-dev libtasn1-6-dev \
libkyotocabinet-dev libanthy-dev libhangul-dev libxklavier-dev libsm-dev xtrans-dev \
liboauth-dev libnspr4-dev libx11-dev libxfixes-dev libxi-dev libstartup-notification0-dev \
libxcb-randr0-dev libxcb-res0-dev libasound2-dev libbluetooth-dev libsbc-dev libfuse-dev \
libbluray-dev libimobiledevice-dev libnfs-dev libplist-dev libudisks2-dev libmagic-dev \
libcdio-paranoia-dev libgphoto2-dev libmtp-dev libdotconf-dev libsndfile1-dev \
libpoppler-glib-dev libexempi-dev nettle-dev nettle-dev libdmapsharing-3.0-dev \
libvorbis-dev libraw-dev valgrind libelf-dev libmusicbrainz5-dev libsane-dev libdvdread-dev \
libusb-1.0-0-dev libvirt-dev libssl-dev libopus-dev libusbredirhost-dev intltool ninja-build \
ragel libcups2-dev doxygen xmlto cargo valac-bin gperf libstemmer-dev libsasl2-dev \
cmake argyll docbook-utils ruby yasm texinfo asciidoc-base help2man libgpgme-dev \
libexpat1-dev libpam0g-dev libyaml-dev libtiff-dev ppp-dev python3-toml python3-typogrify \
libvulkan-dev libhyphen-dev libgcrypt20-dev libwebp-dev libreadline-dev libiw-dev \
libkrb5-dev python3-pip librust-cargo-dev docbook-xsl-ns sqlite3 \
libfuse3-dev libges-1.0-dev zsh sassc highlight spamassassin libgtkspell3-3-dev python-jinja2 \
python3-dbusmock liblua5.3-dev libgfbgraph-0.2-dev libflatpak-dev libefiboot-dev \
libefivar-dev gnutls-bin libtss2-dev mingw-w64-tools gnu-efi libsmbios-dev liblmdb-dev graphviz 

## Ubuntu ##
apt install libportal-dev

3.5 Add llvm repository [root]

## Debian Sid ##
echo 'deb llvm-toolchain main' > /etc/apt/sources.list.d/llvm.list

## Debian 11 Bullseye ##
echo 'deb llvm-toolchain-bullseye main' > /etc/apt/sources.list.d/llvm.list

## Ubuntu Impish / Hirsute Hippo ##
echo 'deb llvm-toolchain-hirsute main' > /etc/apt/sources.list.d/llvm.list

3.6 Download llvm repository gpg key [root]

Note apt-key is deprecated, so I use here trusted.gpg.d instead.

wget -O- |gpg --dearmor > /etc/apt/trusted.gpg.d/llvm.gpg

3.7 Update APT packages [root]

apt update

3.8 Install needed llvm packages [root]

apt install clang-format clang-tidy clang-tools clang clangd \
libc++-dev libc++1 libc++abi-dev libc++abi1 liblldb-dev libclang-dev \
libclang1 libllvm-ocaml-dev libomp-dev libomp5 lld llvm-dev \
llvm-runtime llvm python-clang liblmdb-dev

3.9 Download NamesList.txt and Blocks.txt [root]

mkdir -p /usr/share/unicode

cd /usr/share/unicode


cd ~

3.10 Add experimental repo [root]

## Debian ##
echo "deb experimental main" >> /etc/apt/sources.list

## Ubuntu add debian source repo and Debian gpg key ##
echo "deb-src experimental main" >> /etc/apt/sources.list.d/debian.list

apt-key --keyring /etc/apt/trusted.gpg.d/debian.gpg adv --keyserver --recv-keys 648ACFD622F3D138

3.11 Update APT packages [root]

apt update

3.12 Install Polkit packages from experimental repository [root]

## Debian ##
apt -t experimental install gir1.2-polkit-1.0 libpolkit-agent-1-dev libpolkit-gobject-1-dev libportal-dev

## Ubuntu ##
apt-get build-dep libpolkit-gobject-1-dev

cd ~
mkdir polkit
cd polkit

apt-get source --compile libpolkit-gobject-1-dev

dpkg -i *.deb

3.13 Install needed Python3 modules [root]

pip3 install -r

3.14 Check JHBuild sysdeps [normal user]

Run following command and check output. Required packages should be both (none). Optional packages are installed too, but currently too old and will be built later.

jhbuild sysdeps
Required packages:
  System installed packages which are too old:
  No matching system package installed:
Optional packages: (JHBuild will build the missing packages)
  System installed packages which are too old:
  No matching system package installed:
    WebKit (webkit2gtk-4.0.pc, required=2.33.2)
    mozjs78 (mozjs-78.pc, required=78.11.0)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.