Compiling GNOME3 from scratch (for Beyond Linux From Scratch)
Hey guys!
This tutorial will help you compile the GNOME Desktop Environment v3 from scratch. This assumes that you have either a normal systemd-based Linux distribution or a Linux From Scratch system with systemd.
The GNOME documentation actually strongly recommends NOT building the packages from source and instead, use the packages available from a distro maintainer. But, in the case of source built systems like (B)LFS, this is not an option.
First of all, some due credits
Cheers!
-Technohacker
This tutorial will help you compile the GNOME Desktop Environment v3 from scratch. This assumes that you have either a normal systemd-based Linux distribution or a Linux From Scratch system with systemd.
The GNOME documentation actually strongly recommends NOT building the packages from source and instead, use the packages available from a distro maintainer. But, in the case of source built systems like (B)LFS, this is not an option.
First of all, some due credits
- The LFS project for the base system
- LinuxQuestions for a list of packages in dependency order for GNOME2
- The BLFS project for build instructions
- I have assembled the list of packages the best I could but errors might appear. Cross-check the BLFS instructions to see if you have the necessary dependencies.
- GNOME is huge (around 90 packages for a base system) so expect to wait a long time before even testing the install.
- This tutorial will only build a base GNOME system without much functionality. It's upto you to install any applications that you need (BLFS has instructions for a few applications)
- GNOME requires hardware acceleration (DRI2 or Direct Rendering Infrastructure), so check if your videocard supports DRI2 first. Add your user to the video group as specified by the instructions if DRI is supported.
- Lastly, I haven't tried launching GNOME from the GNOME Display Manager so this tutorial will only use xinit (startx) for launching GNOME
So, without further ado, lets get started!
The below list shows the necessary packages with links to BLFS instructions for compiling them. A few have to be modified for making sure they compile properly.
Packages in dependency order
- porg (very highly recommended for managing packages)
- If you are installing porg (install it with a /usr prefix), then in every package given below, replace the install command with "sudo porg -lp <PACKAGE_NAME[_VERSION][_PYTHON_VERSION]> -- <ORIGINAL_INSTALL_COMMAND>". Add the Python version if the package uses multiple Python versions
- X Window System (Obviously required. Install all packages)
- Python 2 (Compatibility with some packages)
- Python 3
- ISO Codes
- yasm
- sgml-common (Used for DocBook)
- UnZip
- SQLite
- NSPR
- NSS
- docbook-xml (Recommended, required for GTK-Doc)
- docbook-xsl (Recommended, required for GTK-Doc)
- libxml2
- libxslt
- Itstool (Required for GTK-Doc and other packages)
- GTK-Doc (Not necessary, use if you want to generate documentation)
- PCRE (Recommended for Glib)
- libffi
- Wayland
- ICU (Recommended)
- Glib2 (Compile both Python modules. Suffix with the python version if using porg)
- dbus-glib
- Vala
- gobject-introspection
- libpng
- libjpeg-turbo
- libTIFF
- Pixman
- Freetype2 (NOTE: Circular dependency with Harfbuzz)
- Cairo
- Harfbuzz (NOTE: Circular dependency with Freetype2)
- Fontconfig
- Pango
- shared-mime-info (If you get compile errors, try running make without parallelism [-j1] )
- ATK
- at-spi2-core
- at-spi2-atk
- gdk-pixbuf
- GTK+ 3
- GConf
- libgpg-error
- libgcrypt
- GMime
- libtasn1
- p11-kit
- Gcr
- gnome-keyring
- libsecret
- libgudev
- Nettle
- GnuTLS
- gsettings-desktop-schemas
- glib-networking
- libsoup
- Gvfs
- hicolor-icon-theme
- gnome-icon-theme
- startup-notification
- gnome-theme-standard
- gnome-desktop
- libwnck
- gnome-session
- VTE
- libarchive
- YAML
- Gcab
- Appstream-GLib
- DConf (Only the command-line tool)
- desktop-file-utils
- Cogl
- Clutter
- libgee
- libxklavier
- Py2Cairo
- PyGObject (Build the Python 2 module only)
- Caribou
- Berkeley DB
- CMake
- libical
- evolution-data-server
- MozJS
- MozJS 2
- libcroco
- libusb
- Linux PAM (recompile Shadow and Systemd after installing)
- Polkit
- UPower
- Zenity
- Mutter
- After configuring, edit src/compositor/plugins/Makefile and remove -Werror from AM_CFLAGS and WARN_CFLAGS. Then compile
- gnome-shell
- gnome-terminal (
Doesn't work with this base. Have to checkEDIT: Ensure you have a UTF8 locale otherwise gnome-terminal won't start) - libgtop
- Nautilus (
Doesn't work with this base. Have to checkEDIT: Nautilus requires gnome-control-center which is not shown here because its dependency, gnome-online-accounts, requires WebkitGTK which takes a long time to compile) - telepathy-glib
- telepathy-logger
Running GNOME 3
Create an .xinitrc file in your home directory by running:
cat > ~/.xinitrc << EOFAnd finally, start GNOME by running "startx". GNOME should start without any problems. If there are any problems, fell free to comment with the last few lines of the output of "sudo journalctl -xe".
export XDG_MENU_PREFIX=gnome-
exec gnome-session
EOF
Cheers!
-Technohacker
Comments
Post a Comment