Building GNOME Music with JHBuild

One of the ways to try the latest features of gnome-music and other GNOME applications is by using JHBuild. This program allows us to build and run the latest code straight from git repositories of GNOME. In this post, I will explain how to install JHBuild to build gnome-music.

Please note that building via JHBuild might take some hours for the first time, so you need patience here. After that you only need some minutes to update your packages.

Note that Music could run in GNOME 3.10 and 3.12, so you could probably build it directly without using JHBuild if you just want to run it. If you want to contribute, we recommend that you use JHBuild.

Sai also have a blog post about installing JHBuild here.

Installing Dependencies

The GNOME Wiki has pages with instructions for installing JHBuild dependencies, depending on your distribution. This page lists them.

For Fedora 18/19/20, run these in a root terminal (“su -c”):

# yum install @development-tools @gnome-software-development
# yum install libtasn1-tools systemd-devel cups-devel cmake opencc-devel tracker-devel gperf libicu-devel yelp-tools gettext-devel intltool gcc-c++ asciidoc lcov python-rdflib

Ignore jhbuild commands, since you haven’t installed it yet 😛

Then, install python3-dbus (gnome-music dependency), which JHBuild doesn’t have, and gstreamer developer packages. In Fedora:

# yum install python3-dbus gstreamer1-devel gstreamer1-plugins-base-devel

After these, run any commands in a normal terminal, without root access, unless stated otherwise.

Installing JHBuild

The recommended way to install JHBuild is to build it from its git repository, so it’s best to ignore those packages in your distro’s official repositories.

GNOME Developer has a manual here for JHBuild that explains very well how to install it, so I will no longer bother to list them here. I’ll just list the changes you need to do to build gnome-music.

First create and enter some directory where you want to put the sources of the packages. I use ~/Devel/jhbuild in my computer. Then follow the steps in “Installing JHBuild” section in the manual.

Next, follow the steps in “Configuring JHBuild” section, then change the following values in your jhbuildrc file:

moduleset = 'gnome-world-3.14'
modules = ['gnome-music']
skip = ['dbus-python'] 
ignore_suggests = True

Then follow the instructions in “Build Prerequisites” section. After that, run this to install the dependencies of the packages that JHBuild wants to build:

$ jhbuild sysdeps --install

Note: Use the above command when you add new modules to make sure all dependencies are installed!

In Fedora, JHBuild will install the necessary packages using PackageKit, but it doesn’t work in openSUSE, Ubuntu and other distros. It will just list the packages it needs, then you have to manually look for them and install them.

Building GNOME Music

Lastly, build gnome-music and its dependencies!

$ jhbuild build

Note: Use the above command when you add new modules to build the new packages! You could use it too to update all packages.

The last will take a lot of time, because it has to clone and install several packages. After that, you could now run gnome-music using this command if the build was successful:

$ jhbuild run gnome-music

To update just the gnome-music package:

$ jhbuild buildone gnome-music

Common Issues

I want to build GStreamer inside JHBuild. Add gstreamer, gst-plugins-base and gst-plugins-good to your modules.

JHBuild builds GStreamer, and I can’t play MP3 files. Install libmad-devel then add gst-plugins-bad and gst-plugins-ugly to your modules.

JHBuild builds GStreamer, and I can’t play AAC files. Install libfaad2-devel then add gst-plugins-bad to your modules.

JHBuild builds GStreamer, and I can’t play AMR files. Install opencore-amr-devel then add gst-plugins-bad and gst-plugins-ugly to your modules. If it doesn’t work, install libfaad2-devel then rebuild gst-plugins-bad, maybe your files contain AAC inside.

I installed the needed libraries but the files still don’t play. Use jhbuild sysdeps –install to check if there are new dependencies that you have to install. Then rebuild the modules you want to fix using this:

$ jhbuild buildone --force --autogen module-names-to-rebuild

My settings are not being saved, and I get “GLib-GIO-Message: Using the ‘memory’ GSettings backend.  Your settings will not be saved or shared with other applications.” errors in terminal. Your dconf is too old. Add dconf to your modules.

Advertisements

Blog is now moved to www.kyoushuu.com, please leave your comments there instead.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s