Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
xfce:building [2012/03/30 12:02]
nick [Package specific dependencies]
xfce:building [2019/09/08 01:49] (current)
kevinbowen [From the code repository]
Line 1: Line 1:
-====== Building Xfce ======+====== Building Xfce from source ​======
  
 To compile a complete Xfce desktop from source requires some information about the dependency chain and the various configure options available in each module. This page will describe this in detail, so you can compile your own Xfce desktop; both system wide as well as in your $HOME directory. To compile a complete Xfce desktop from source requires some information about the dependency chain and the various configure options available in each module. This page will describe this in detail, so you can compile your own Xfce desktop; both system wide as well as in your $HOME directory.
  
-===== Version =====+  * **[[building#​Choosing your Xfce version|Choosing your Xfce version]]** 
 +  * **[[building#​Obtaining the Xfce source code|Obtaining the Xfce source code]]** 
 +  * **[[building#​Xfce dependencies explained|Xfce dependencies explained]]** 
 +  * **[[building#​Building the packages|Building the packages]]** 
 +  * **[[building#​Finding additional help|Finding additional help]]**
  
-First you need to decide which version of Xfce you want to compile. Version numbers are mostly build like this: 1.2.3 => major.minor.micro. If the minor version ​is an even number, it is a stable release, odd number are development snapshots. The micro number increases each release. Also keep the major.minor version the same for the core components (some packages don't follow those numbers) else you will most likely get dependency version problems during compiling.+===== Choosing your Xfce version ​=====
  
-The latest releases available can be found on the [[http://xfce.org/​download|download]] pageYou can also build from the source repositories if you have enough experiencemore about that below.+First you will need to decide ​on which version of Xfce that you want to compile. Xfce version numbers are constructed like this1.2.3 => major.minor.micro. If the minor version is an even numberthis means that it is a stable release. An odd numbered minor version indicate a development,​ or testing snapshots. The micro number increases with each release. Also, it is recommended to keep the major.minor version the same for the core components (some packages don't follow those numbers) or there will most likely be dependency version problems during compilation.
  
-===== Source =====+The latest releases available can be found on the [[http://​xfce.org/​download|download]] page. You can also build from the source repositories if you have enough experience. Additional information about this is provided below.
  
-If you've decided which version you want to compile, there are a couple of ways to download ​the source code. You can choose to build official released packages or clone the source repositories. Choosing the released packages is recommended here; the source repositories could be broken and are not suitable for production environments,​ but on the other hand always contains the latest features, bug fixes and translations.+===== Obtaining ​the Xfce source code =====
  
-If your not sure what to choose: easiest ​is to start with the latest stable fat-tarball of a collection release.+Once you have decided which version that you want to compile, there are a couple of ways to download the source code. You can either choose to build official released packages, or clone the source repositories. Choosing the released packages is the recommended option. The source repositories could possibly be broken and are not generally suitable for production environments. However, they always contains the latest features, bug fixes and translations. 
 + 
 +If your are not sure which to choose, it is easiest ​to begin with the latest stable fat-tarball of a collection release.
  
 ==== Released packages ==== ==== Released packages ====
  
-Xfce packages have two types of releases. Click the links to open the the download locations.+Xfce packages have two types of releases: collection releases and individual ​releases. Click the links, below, ​to open the download locations.
  
-  * [[http://​archive.xfce.org/​xfce/​|Collection releases of the core modules]]\\ From time to time a new collection release ​if Xfce is made. A collection release consists of a number of individual tarballs and a fat-tarball that contains all the individual tarballs.\\ The collection releases always ​contain ​the correct versions to build the other packages in the release. If you want the latest version of each package, you can start with a collection release and then look for individual bug fix releases, explained in the item below. ​+  * [[http://​archive.xfce.org/​xfce/​|Collection releases of the core modules]]\\ From time to time a new collection release ​of Xfce is made. A collection release consists of a number of individual tarballs and a fat-tarball that contains all of the individual tarballs.\\ The collection releases always ​contains ​the correct versions ​needed ​to build the other packages in the release. If you want the latest version of each package, you can start with a collection release and then look for individual bug fix releases, explained in the item below. ​
   * [[http://​archive.xfce.org/​src/​xfce/​|Individual releases]]\\ Each package in Xfce is allowed to make development and stable releases at any time, see the [[http://​xfce.org/​about/​releasemodel|release model]] documentation for more information. ​   * [[http://​archive.xfce.org/​src/​xfce/​|Individual releases]]\\ Each package in Xfce is allowed to make development and stable releases at any time, see the [[http://​xfce.org/​about/​releasemodel|release model]] documentation for more information. ​
  
 ==== From the code repository ==== ==== From the code repository ====
  
-For the latest code you need to make local copies of the GIT repositories, this is the place where developers submit their code. If you decide to use GIT, try to use the same branch for all the packages to avoid dependency version problems.+For the latest codeyou need to make local copies of the [[https://​git.xfce.org/​|GIT repositories]]. This is the place where developers submit their code. If you decide to use GIT, try to use the same branch for all the packages to avoid dependency version problems.
  
-You first need to make clones of each GIT repositorylike the command below, where ''​$category''​ is for example ''​xfce''​ and ''​$module''​ ''​xfce4-panel''​. If you click on a module in the [[http://git.xfce.org/xfce|online repository]] list the clone uri is shown at the bottom of the page.+<note information>​For additional information about using Git with Xfcesee the [[https://docs.xfce.org/contribute/​dev/​git/​start|Xfce and git information]] page.</​note>​
  
-  git clone git://​git.xfce.org/​$category/​$module+You first need to make clones of each GIT repository, like the command below, where ''​$category''​ is for example ''​xfce''​ and ''​$module''​ ''​xfce4-panel''​. If you click on a module in the [[https://​git.xfce.org/​xfce|online repository]] list, the clone uri is shown at the bottom of the page.
  
-After the repository is cloned you need to choose which branch you want to compileBy default the ''​master''​ branch is selected, but there are also branches for stable releases like ''​xfce-4.8''​. The stable branches contain the latest bug fixes without any major new feature, the master branch is the development version for the next release of Xfce. Both should not be used in a production environment.+  git clone https://git.xfce.org/​$category/​$module
  
-To switch ​to another ​branch ​(''​git branch -a'' ​lists all available branches) run the following command inside the cloned directory to switch to, for example, the ''​xfce-4.8''​ branch:+After the repository is cloned, you will need to choose which branch ​you want to compile. By default, the ''​master'' ​branch is selectedbut there are also branches ​for stable releases like ''​xfce-4.12''​. The stable branches contain the latest bug fixes without any major new features, the master ​branch ​is the development version for the next release of Xfce. Both should not be used in a production environment.
  
-  ​git checkout ​--track origin/xfce-4.8+To switch to another branch (''​git branch ​-a''​ lists all available branches) run the following command inside the cloned directory to switch to, for example, the ''​xfce-4.12''​ branch:
  
-After this you can update your local copy of the repository with git pull and switch to another branch with ''​git checkout ​$branchname''​. Read the [[http://git-scm.com/​documentation|GIT manuals]] for more information about using GIT.+  ​git checkout ​--track origin/xfce-4.12
  
-===== Dependencies =====+After this, you can update your local copy of the repository with git pull and switch to another branch with ''​git checkout $branchname''​. Read the [[http://​git-scm.com/​documentation|GIT manuals]] for more information about using GIT. 
 + 
 +[[|Back To Top]] 
 +---- 
 +===== Xfce Dependencies ​explained ​=====
  
 ==== Build requirements ==== ==== Build requirements ====
Line 46: Line 56:
   * [[http://​en.wikipedia.org/​wiki/​GNU_toolchain|A working GNU toolchain]]   * [[http://​en.wikipedia.org/​wiki/​GNU_toolchain|A working GNU toolchain]]
   * Gtk+ and Glib headers, in some distributions called the -devel packages ​   * Gtk+ and Glib headers, in some distributions called the -devel packages ​
 +    * Xfce 4.14 requires Gtk+ 3.22 and Glib 2.42
 +    * Xfce 4.12 requires Gtk+ 2.24 and Glib 
 +    * pkgconfig
 +    * Coffee or tea
 +
 +
 +For history, here are the versions needed for older xfce releases, which are not supported anymore
 +    * Xfce 4.10 requires Gtk+ 2.20 and Glib 2.24
     * Xfce 4.8 requires Gtk+ 2.14 and Glib 2.20     * Xfce 4.8 requires Gtk+ 2.14 and Glib 2.20
     * Xfce 4.6 requires Gtk+ 2.10 and Glib 2.12     * Xfce 4.6 requires Gtk+ 2.10 and Glib 2.12
-  * pkgconfig +
-  * Coffee+
  
 ==== Xfce's dependency chain ==== ==== Xfce's dependency chain ====
Line 58: Line 75:
   * libxfce4util   * libxfce4util
   * xfconf   * xfconf
-  * libxfce4ui ​(new in 4.8), libxfcegui4 (deprecated since 4.8), libxfce4menu (deprecated since 4.8), garcon (new in 4.8) +  * libxfce4ui 
-  * exo +  * garcon, ​exo
-  * xfce4-panel+
   * thunar   * thunar
-  * xfce4-settings,​ xfce4-session,​ xfdesktop, xfwm4, xfce-utils, xfce4-appfinder,​ ...+  * xfce4-panel, ​xfce4-settings,​ xfce4-session,​ xfdesktop, xfwm4, xfce4-appfinder, ​tumbler...
  
 ==== Package specific dependencies ==== ==== Package specific dependencies ====
  
-Some core packages in Xfce have additional or optional dependencies,​ all are listed in the table below for the latest stable version. We only show the top package as dependency (so xfce4-panel also requires gtk+, but libxfce4ui already depends on that). Note that some of the package names may vary between distributions.+Some core packages in Xfce have additional or optional dependencies,​ all are listed in the table below for the latest stable version. We only show the top-dependency (so xfce4-panel also requires gtk+, but libxfce4ui already depends on that).
  
-^ Package ^ Dependency(-ies) ^ Optional Dependency(-ies) ^ +<note tip>Note that some of the package-names may vary between distributions.</​note>​
-| xfce4-dev-tools | autoconf, automake, intltool, pkgconfig | | +
-| libxfce4util | glib ((new in 4.10, was gobject in previous releaes)) | | +
-| xfconf | libxfce4util,​ dbus-glib | | +
-| libxfce4ui | libxfce4util,​ gtk+, xfconf | libstartup-notification,​ libgladeui | +
-| garcon | gio, libxfce4util ((new dependency since 0.1.9)) | | +
-| libxfcegui4 ((deprecated,​ not required for the Xfce core packages since 4.8)) | libxfce4util,​ gtk+, libglade | libstartup-notification,​ libgladeui, xfconf | +
-| exo | libxfce4util,​ gtk+, perl-uri, libxfce4ui ((new dependency since 4.10)) | | +
-| xfce4-panel | libxfce4ui, exo, garcon, libwnck | libstartup-notification | +
-| thunar | libxfce4ui, exo, libpng, gtk+, glib | libexif, dbus-glib, gconf, libstartup-notification,​freetype,​ libjpeg, libxfce4panel,​ xfconf | +
-| xfce4-settings | libxfce4ui, exo, xfconf, dbus-glib, libXi, libXrandr | libXcursor, libnotify | +
-| xfce4-session | libxfce4ui, perl-xml-parser,​ libwnck, dbus-glib | gnome-keyring,​ gconf ((not a dependecy since Xfce 4.10)) | +
-| xfwm4 | libxfce4util,​ libxfce4ui, libxfconf, dbus-glib, libwnck | libstartup-notification | +
-| xfdesktop | libxfce4ui, xfconf, libwnck | exo, thunarx, garcon, libnotify | +
-| xfce4-appfinder | libxfce4ui, garcon | | +
-| xfce-utils ((deprecated fince Xfce 4.10, conflicts with other packages)) | libxfce4ui | dbus-glib | +
-| gtk-xfce-engine-2 | gtk+ | |+
  
-===== Building =====+| ^ Dependency(-ies) ^ Optional Dependency(-ies) ^ 
 +^ xfce4-dev-tools | autoconf, automake, intltool, pkgconfig | | 
 +^ libxfce4util | glib2 | | 
 +^ xfconf | libxfce4util,​ gdbus | | 
 +^ libxfce4ui | libxfce4util,​ gtk+, xfconf | libstartup-notification,​ libgladeui | 
 +^ garcon | gio, libxfce4util | | 
 +^ exo | libxfce4util,​ gtk+, perl-uri, libxfce4ui | | 
 +^ xfce4-panel | libxfce4ui, exo, garcon, libwnck | libstartup-notification | 
 +^ thunar | libxfce4ui, exo, libpng, gtk+, glib | libexif, gdbus, libnotify, libstartup-notification,​ freetype, libjpeg, libxfce4panel,​ xfconf | 
 +^ xfce4-settings | libxfce4ui, exo, xfconf, gdbus, libXi, libXrandr | libXcursor, libnotify | 
 +^ xfce4-session | libxfce4ui, perl-xml-parser,​ libwnck, gdbus | | 
 +^ xfwm4 | libxfce4util,​ libxfce4ui, libxfconf, gdbus, libwnck | libstartup-notification | 
 +^ xfdesktop | libxfce4ui, xfconf, libwnck, exo garcon | thunarx, garcon, libnotify | 
 +^ xfce4-appfinder | libxfce4ui, garcon, gio | | 
 +^ tumbler | dbus-glib, gio, gmodule, gdk-pixbuf | freetype-config (fonts), jpeg (jpeg thumbnails from exif), libffmpegthumbnailer (video), gstreamer-1.0 (video), poppler-glib (pdf), libgsf (odf), libopenraw-gnome (various raw images) |
  
 +[[|Back To Top]]
 +----
 +===== Building the packages =====
 ==== Installation location and variables ==== ==== Installation location and variables ====
  
Line 99: Line 116:
  
   export CFLAGS="​-O2 -pipe"   export CFLAGS="​-O2 -pipe"
 + 
 +If you want a debugging environment,​ unset the CFLAGS and use ''​%%--enable-debug%%'',​ see below for the different debug levels.
 +
 +  export CFLAGS=""​
   ​   ​
 ==== Compiling and installing ==== ==== Compiling and installing ====
  
-Next step is compiling the various packages following the dependency chain above. If you have downloaded the tarballs, you need to unpack them before going on. Inside each package directory you should run the following command:+Next step is compiling the various packages following the dependency chain above. If you have downloaded the tarballs, you will need to unpack them before going on. Inside each package directory you should run the following command:
  
   ./configure --prefix=${PREFIX} && make && make install   ./configure --prefix=${PREFIX} && make && make install
Line 108: Line 129:
 To build from GIT you need to install the xfce4-dev-tools package first, all other packages should be installed with this command: To build from GIT you need to install the xfce4-dev-tools package first, all other packages should be installed with this command:
  
-  ./​autogen.sh ​--enable-maintainer-mode ​--prefix=${PREFIX} && make && make install+  ./​autogen.sh --prefix=${PREFIX} && make && make install 
 + 
 +Specific configure options for each package can be shown with ''​%%./​configure --help%%''​. Note that most packages will see a performance benefit if passed the configure option ''​%%--disable-debug%%''​.  
 + 
 +However, if you want to provide backtraces or test new code, no ''​$CFLAGS'',​ no binary stripping and ''​%%--enable-debug=full%%''​ are recommended. Please note that ''​%%--disable-debug%%''​ is not available for xfce4-dev-tools. 
 + 
 +<​note>​When reusing the ''​%%./​configure%%''​ script while building from GIT remember to pass the flag ''​%%--enable-maintainer-mode%%''​.</​note>​ 
 + 
 +If you install the package in a public prefix, for example ''/​usr''​ or ''/​usr/​local'',​ you will need to run ''​make install''​ using sudo. This way, you will be asked for the system administrator password and will have write permissions to install in those locations. 
 + 
 +  sudo make install 
 + 
 +==== Understanding Debug levels ==== 
 + 
 +Most Xfce modules use the m4 macro //​XDT_FEATURE_DEBUG//​ to manage the debug compiler levels. If so there are a number of options possible for ''​%%--enable-debug=%%''​
  
-Specific configure options for each package can be shown with ''​%%./configure --help%%''​. Note that most packages benefit if you pass the configure option ​''​%%--disable-debug%%'', ​however if you want to provide backtraces or test new code, no ''​$CFLAGS'', ​no binary stripping and ''​%%--enable-debug=full%%'' ​are recommendedPlease note that ''​%%--disable-debug%%'' ​is not available ​for xfce4-dev-tools+? no 
 +! Cast checks and asserts in the Glib macros are disabled, this might be a tad faster, but it can results in segfaults and unexpected crashes. 
 +? minimum 
 +! This is the same as ''​%%--disable-debug%%''​. No additional compiler options are addedbut checks in Glib are not disabled. This is the recommended level for users and distributions.  
 +? yes 
 +! A number of ''​$CFLAGS'' ​are set to check the code for different errors. During configure you'll see all the options are tested to avoid binaries that do not work. 
 +? full 
 +! Same as the level aboveincluding ​''​-Werror'' ​so the compilers aborts during compiler errorsThe compiler will also generate binaries with debug information suitable for [[:​contribute:​bugs:​|backtraces]] and memory checks. This is the recommended level for developers or users who want to report bugs.
  
 +[[|Back To Top]]
 +----
 ===== Help ===== ===== Help =====
  
Line 118: Line 162:
 Have fun building Xfce! Have fun building Xfce!
  
 +[[|Back To Top]]
 +----