https://wiki.archlinux.org/api.php?action=feedcontributions&user=LoveJunky&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:01:46ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=JHBuild&diff=305194JHBuild2014-03-16T19:16:09Z<p>LoveJunky: /* Troubleshooting */</p>
<hr />
<div>[[Category:Development]]<br />
JHBuild is a tool that allows you to automatically download and compile "modules" (i.e. source code packages). It can pull modules from a variety of sources (CVS, Subversion, Git, Bazaar, tarballs...) and handle dependencies. You can also choose which specific modules you want to build, instead of building the whole project.<br />
<br />
JHBuild was originally written for building [[GNOME]], but has since been extended to be usable with other projects.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one JHBuild variant from the [[AUR]]:<br />
* {{AUR|jhbuild}} - Stable version.<br />
* {{AUR|jhbuild-git}} - Development version.<br />
<br />
== Configuration ==<br />
<br />
The configuration file for JHBuild is {{ic|~/.config/jhbuildrc}}. It uses [[Python]] syntax to set configuration variables. Here is the sample file provided for building GNOME:<br />
<br />
{{bc|<nowiki><br />
# -*- mode: python -*-<br />
# -*- coding: utf-8 -*-<br />
<br />
# edit this file to match your settings and copy it to ~/.config/jhbuildrc<br />
<br />
# if you have a GNOME git account, uncomment this line<br />
# repos['git.gnome.org'] = 'ssh://user@git.gnome.org/git/'<br />
<br />
# what module set should be used. The default can be found in<br />
# jhbuild/defaults.jhbuildrc, but can be any file in the modulesets directory<br />
# or a URL of a module set file on a web server.<br />
# moduleset = 'gnome-apps-3.12'<br />
#<br />
# A list of the modules to build. Defaults to the GNOME core and tested apps.<br />
# modules = [ 'meta-gnome-core', 'meta-gnome-apps-tested' ]<br />
<br />
# Or to build the old GNOME 2.32:<br />
# moduleset = 'gnome2/gnome-2.32'<br />
# modules = ['meta-gnome-desktop']<br />
<br />
# what directory should the source be checked out to?<br />
checkoutroot = os.path.expanduser('~/checkout/gnome')<br />
<br />
# the prefix to configure/install modules to (must have write access)<br />
prefix = '/opt/gnome'<br />
<br />
# custom CFLAGS / environment pieces for the build<br />
# os.environ['CFLAGS'] = '-Wall -g -O0'<br />
<br />
# extra arguments to pass to all autogen.sh scripts<br />
# to speed up builds of GNOME, try '--disable-static --disable-gtk-doc'<br />
#autogenargs=''<br />
<br />
# On multiprocessor systems setting makeargs to '-j2' may improve compilation<br />
# time. Be aware that not all modules compile correctly with '-j2'.<br />
# Set makeargs to 'V=1' for verbose build output.<br />
#makeargs = '-j2'<br />
</nowiki>}}<br />
<br />
You should edit at least ''modules'' to the desired modules to be built. A reference for most configuration variables is available at [http://developer.gnome.org/jhbuild/unstable/config-reference.html.en GNOME JHBuild Manual].<br />
<br />
== Usage ==<br />
<br />
=== Installing prerequisites ===<br />
<br />
JHBuild can check if the required tools are installed by running ''sanitycheck'':<br />
<br />
$ jhbuild sanitycheck<br />
<br />
If any errors are shown, missing packages may be installed from repositories or running the ''bootstrap'' command, which tries to download, build and install the build prerequisites:<br />
<br />
$ jhbuild bootstrap<br />
<br />
=== Building ===<br />
<br />
To build all the modules selected in the configuration file, just run the ''build'' command:<br />
<br />
$ jhbuild build<br />
<br />
JHBuild will download, configure, compile and install each of the modules.<br />
<br />
If an error occurs at any stage, JHBuild will present a menu asking what to do. The choices include dropping to a shell to fix the error, rerunning the build from various stages, giving up on the module, or ignore the error and continue. Often, dropping to a shell and checking makefiles and configuration files can be helpful. If you face a build error, for example, you can try to manually {{ic|make}} and check errors on the shell.<br />
<br />
Giving up on a module will cause any modules depending on it to fail.<br />
<br />
To build as many packages as possible, skipping broken packages, run:<br />
<br />
$ yes 3 | jhbuild --try-checkout build<br />
<br />
== Troubleshooting ==<br />
<br />
{{Note|If you encounter an issue that isn't documented below, please report it in a comment on the {{AUR|jhbuild}} package.}}<br />
<br />
=== Python issues ===<br />
<br />
==== Building from scratch without JHBuild, or in a JHBuild shell ====<br />
<br />
If you are building from scratch on your own, it may be necessary to run ''autogen.sh'' with the following:<br />
<br />
$ PYTHON=/usr/bin/python2 ./autogen.sh<br />
<br />
And set the PYTHON environment variable in ~/.config/jhbuildrc<br />
<br />
os.environ['PYTHON'] = '/usr/bin/python2'<br />
<br />
<br />
<br />
{{Note|JHBuild uses it's own python lib directory in /opt/gnome/lib/python2.7, ff you are having problems with python imports check to see that the .py files are there.}}<br />
<br />
=== pkg-config issues ===<br />
<br />
If you have a malformatted .pc file on your PKG_CONFIG_PATH, JHBuild won't be able to detect all the (valid) .pc files you have installed and will complain that the .pc files are missing. Look at the output of {{ic|jhbuild sysdeps}}—there should be a message about the problematic .pc files.<br />
<br />
=== itstool does not build ===<br />
<br />
Chose {{ic|[4] Start shell}} and run:<br />
$ sed -ir 's/| python /| python2 /' configure<br />
Then, exit the shell and choose {{ic|[1] Rerun phase configure}}. See [https://gitorious.org/itstool/itstool/merge_requests/6 this merge request] for more details.<br />
<br />
=== totem does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://git.gnome.org/browse/totem/patch/?id=198d7f251e7816f837378fb2081829188847b916 | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}.<br />
<br />
=== evolution does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://bug707112.bugzilla-attachments.gnome.org/attachment.cgi?id=253584 | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://bugzilla.gnome.org/show_bug.cgi?id=707112 this bug] for further details.<br />
<br />
=== gnome-devel-docs does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ git revert --no-edit 9ba0d959<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://bugzilla.gnome.org/show_bug.cgi?id=707007 this bug] for further details.<br />
<br />
=== devhelp does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://bug707490.bugzilla-attachments.gnome.org/attachment.cgi?id=254113 | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://bugzilla.gnome.org/show_bug.cgi?id=707490 this bug] for further details.<br />
<br />
=== libosinfo does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://fedorahosted.org/libosinfo/raw-attachment/ticket/9/0001-Don-t-use-AM_GNU_GETTEXT.patch | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://fedorahosted.org/libosinfo/ticket/9 this bug] for further details.<br />
<br />
=== ibus-pinyin does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://github.com/ibus/ibus-pinyin/commit/3d0680c2b9533d0abff30258d0e772b8aa97af1c.patch | git apply<br />
Then, exit the shell and choose {{ic|[8] Go to phase "clean"}}. See [https://code.google.com/p/ibus/issues/detail?id=1581 this bug] for further details.<br />
<br />
=== Other broken modules ===<br />
<br />
The following modules don't build, and there are no known/immediate fixes (feel free to jump in and investigate; I've only made cursory attempts to fix these issues):<br />
* aisleriot—[https://bugzilla.gnome.org/show_bug.cgi?id=707106 bug report] (probably easy to fix if you poke around)<br />
* gegl<br />
* gnome-boxes—[https://bugzilla.gnome.org/show_bug.cgi?id=725520 bug report] (a fix is provided there)<br />
* gnome-photos<br />
* gtksourceviewmm<br />
* meta-gnome-apps-tested<br />
* nemiver<br />
* orca<br />
* rygel<br />
* valadoc<br />
<br />
This list includes modules transitively depending on broken modules (i.e. some of the modules might be fine; I didn't check).<br />
<br />
== Packages needed to build specific modules ==<br />
<br />
* gitg requires {{Pkg|gtkspell3}}<br />
* gtk-vnc requires {{AUR|perl-text-csv}}<br />
* totem-pl-parser requires {{AUR|libgcrypt15}}<br />
* xf86-video-intel requires {{Pkg|xorg-server-devel}}<br />
* xwayland requires {{Pkg|xtrans}}, {{Pkg|xcmiscproto}}, and {{Pkg|bigreqsproto}}<br />
* zeitgeist requires {{Pkg|python2-rdflib}}<br />
<br />
== See also ==<br />
<br />
[http://developer.gnome.org/jhbuild/ GNOME JHBuild Manual]</div>LoveJunkyhttps://wiki.archlinux.org/index.php?title=JHBuild&diff=305187JHBuild2014-03-16T18:38:18Z<p>LoveJunky: /* Python issues */</p>
<hr />
<div>[[Category:Development]]<br />
JHBuild is a tool that allows you to automatically download and compile "modules" (i.e. source code packages). It can pull modules from a variety of sources (CVS, Subversion, Git, Bazaar, tarballs...) and handle dependencies. You can also choose which specific modules you want to build, instead of building the whole project.<br />
<br />
JHBuild was originally written for building [[GNOME]], but has since been extended to be usable with other projects.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one JHBuild variant from the [[AUR]]:<br />
* {{AUR|jhbuild}} - Stable version.<br />
* {{AUR|jhbuild-git}} - Development version.<br />
<br />
== Configuration ==<br />
<br />
The configuration file for JHBuild is {{ic|~/.config/jhbuildrc}}. It uses [[Python]] syntax to set configuration variables. Here is the sample file provided for building GNOME:<br />
<br />
{{bc|<nowiki><br />
# -*- mode: python -*-<br />
# -*- coding: utf-8 -*-<br />
<br />
# edit this file to match your settings and copy it to ~/.config/jhbuildrc<br />
<br />
# if you have a GNOME git account, uncomment this line<br />
# repos['git.gnome.org'] = 'ssh://user@git.gnome.org/git/'<br />
<br />
# what module set should be used. The default can be found in<br />
# jhbuild/defaults.jhbuildrc, but can be any file in the modulesets directory<br />
# or a URL of a module set file on a web server.<br />
# moduleset = 'gnome-apps-3.12'<br />
#<br />
# A list of the modules to build. Defaults to the GNOME core and tested apps.<br />
# modules = [ 'meta-gnome-core', 'meta-gnome-apps-tested' ]<br />
<br />
# Or to build the old GNOME 2.32:<br />
# moduleset = 'gnome2/gnome-2.32'<br />
# modules = ['meta-gnome-desktop']<br />
<br />
# what directory should the source be checked out to?<br />
checkoutroot = os.path.expanduser('~/checkout/gnome')<br />
<br />
# the prefix to configure/install modules to (must have write access)<br />
prefix = '/opt/gnome'<br />
<br />
# custom CFLAGS / environment pieces for the build<br />
# os.environ['CFLAGS'] = '-Wall -g -O0'<br />
<br />
# extra arguments to pass to all autogen.sh scripts<br />
# to speed up builds of GNOME, try '--disable-static --disable-gtk-doc'<br />
#autogenargs=''<br />
<br />
# On multiprocessor systems setting makeargs to '-j2' may improve compilation<br />
# time. Be aware that not all modules compile correctly with '-j2'.<br />
# Set makeargs to 'V=1' for verbose build output.<br />
#makeargs = '-j2'<br />
</nowiki>}}<br />
<br />
You should edit at least ''modules'' to the desired modules to be built. A reference for most configuration variables is available at [http://developer.gnome.org/jhbuild/unstable/config-reference.html.en GNOME JHBuild Manual].<br />
<br />
== Usage ==<br />
<br />
=== Installing prerequisites ===<br />
<br />
JHBuild can check if the required tools are installed by running ''sanitycheck'':<br />
<br />
$ jhbuild sanitycheck<br />
<br />
If any errors are shown, missing packages may be installed from repositories or running the ''bootstrap'' command, which tries to download, build and install the build prerequisites:<br />
<br />
$ jhbuild bootstrap<br />
<br />
=== Building ===<br />
<br />
To build all the modules selected in the configuration file, just run the ''build'' command:<br />
<br />
$ jhbuild build<br />
<br />
JHBuild will download, configure, compile and install each of the modules.<br />
<br />
If an error occurs at any stage, JHBuild will present a menu asking what to do. The choices include dropping to a shell to fix the error, rerunning the build from various stages, giving up on the module, or ignore the error and continue. Often, dropping to a shell and checking makefiles and configuration files can be helpful. If you face a build error, for example, you can try to manually {{ic|make}} and check errors on the shell.<br />
<br />
Giving up on a module will cause any modules depending on it to fail.<br />
<br />
To build as many packages as possible, skipping broken packages, run:<br />
<br />
$ yes 3 | jhbuild --try-checkout build<br />
<br />
== Troubleshooting ==<br />
<br />
{{Note|If you encounter an issue that isn't documented below, please report it in a comment on the {{AUR|jhbuild}} package.}}<br />
<br />
=== Python issues ===<br />
<br />
==== Building from scratch without JHBuild, or in a JHBuild shell ====<br />
<br />
If you are building from scratch on your own, it may be necessary to run ''autogen.sh'' with the following:<br />
<br />
$ PYTHON=/usr/bin/python2 ./autogen.sh<br />
<br />
And set the PYTHON environment variable in ~/.config/jhbuildrc<br />
<br />
os.environ['PYTHON'] = '/usr/bin/python2'<br />
<br />
<br />
<br />
NOTE* jhbuild uses it's own python lib directory in /opt/gnome/lib/python2.7, ff you are having problems with python imports check to see that the .py files are there.<br />
<br />
=== pkg-config issues ===<br />
<br />
If you have a malformatted .pc file on your PKG_CONFIG_PATH, JHBuild won't be able to detect all the (valid) .pc files you have installed and will complain that the .pc files are missing. Look at the output of {{ic|jhbuild sysdeps}}—there should be a message about the problematic .pc files.<br />
<br />
=== itstool does not build ===<br />
<br />
Chose {{ic|[4] Start shell}} and run:<br />
$ sed -ir 's/| python /| python2 /' configure<br />
Then, exit the shell and choose {{ic|[1] Rerun phase configure}}. See [https://gitorious.org/itstool/itstool/merge_requests/6 this merge request] for more details.<br />
<br />
=== totem does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://git.gnome.org/browse/totem/patch/?id=198d7f251e7816f837378fb2081829188847b916 | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}.<br />
<br />
=== evolution does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://bug707112.bugzilla-attachments.gnome.org/attachment.cgi?id=253584 | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://bugzilla.gnome.org/show_bug.cgi?id=707112 this bug] for further details.<br />
<br />
=== gnome-devel-docs does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ git revert --no-edit 9ba0d959<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://bugzilla.gnome.org/show_bug.cgi?id=707007 this bug] for further details.<br />
<br />
=== devhelp does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://bug707490.bugzilla-attachments.gnome.org/attachment.cgi?id=254113 | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://bugzilla.gnome.org/show_bug.cgi?id=707490 this bug] for further details.<br />
<br />
=== libosinfo does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://fedorahosted.org/libosinfo/raw-attachment/ticket/9/0001-Don-t-use-AM_GNU_GETTEXT.patch | git apply<br />
Then, exit the shell and choose {{ic|[1] Rerun phase build}}. See [https://fedorahosted.org/libosinfo/ticket/9 this bug] for further details.<br />
<br />
=== ibus-pinyin does not build ===<br />
<br />
Choose {{ic|[4] Start shell}} and run:<br />
$ curl https://github.com/ibus/ibus-pinyin/commit/3d0680c2b9533d0abff30258d0e772b8aa97af1c.patch | git apply<br />
Then, exit the shell and choose {{ic|[8] Go to phase "clean"}}. See [https://code.google.com/p/ibus/issues/detail?id=1581 this bug] for further details.<br />
<br />
=== Other broken modules ===<br />
<br />
The following modules don't build, and there are no known/immediate fixes (feel free to jump in and investigate; I've only made cursory attempts to fix these issues):<br />
* aisleriot—[https://bugzilla.gnome.org/show_bug.cgi?id=707106 bug report] (probably easy to fix if you poke around)<br />
* gegl<br />
* gnome-boxes—[https://bugzilla.gnome.org/show_bug.cgi?id=725520 bug report] (a fix is provided there)<br />
* gnome-photos<br />
* gtksourceviewmm<br />
* meta-gnome-apps-tested<br />
* nemiver<br />
* orca<br />
* rygel<br />
* valadoc<br />
<br />
This list includes modules transitively depending on broken modules (i.e. some of the modules might be fine; I didn't check).<br />
<br />
== Packages needed to build specific modules ==<br />
<br />
* gitg requires {{Pkg|gtkspell3}}<br />
* gtk-vnc requires {{AUR|perl-text-csv}}<br />
* totem-pl-parser requires {{AUR|libgcrypt15}}<br />
* xf86-video-intel requires {{Pkg|xorg-server-devel}}<br />
* xwayland requires {{Pkg|xtrans}}, {{Pkg|xcmiscproto}}, and {{Pkg|bigreqsproto}}<br />
* zeitgeist requires {{Pkg|python2-rdflib}}<br />
<br />
== See also ==<br />
<br />
[http://developer.gnome.org/jhbuild/ GNOME JHBuild Manual]</div>LoveJunky