Installing GDOME on Debian

From EPrints Documentation
Revision as of 11:25, 10 February 2010 by Pm705 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installing XML::GDOME on Debian

Unfortunately, Debian does not contain the XML::GDOME module in prepackaged form. You can either build it yourself (or have someone build it for you) or use completely unofficial packages provided by the friendly UNIX Sysadmins at the University of Vienna:

Building from Source

Most of the dependencies are available in Debian packages, which makes the installation process a little easier. Here are the prepackaged dependencies, in addition to those packages required to support the base of ePrints:

  • Perl packages:
    • libxml-sax-perl
    • libxml-namespacesupport-perl
    • libparse-yapp-perl
    • libio-pty-perl
    • libxml-libxml-common-perl
    • libxml-regexp-perl
    • libxml-dom-perl
  • Other packages:
    • libgdome2-dev
    • libxml2-dev

Once these packages are installed, start the CPAN shell ('perl -MCPAN -e shell') and download ('get') XML::GDOME.

Unfortunately, the Makefile.PL in the XML::GDOME package relies on the gdome-config tool to set the -I flags to pass to the C compiler. Unfortunately, this doesn't include the libglib headers, which causes the compile to fail. To fix this, change into the .cpan/build/XML-GDOME-x.xx directory.

Then edit line 23 of Makefile.PL which reads:

{INC} ||= backtick('gdome-config --cflags');

It should read:

{INC} ||= backtick('gdome-config --cflags')." -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include";

Note the spaces

!!!!NOTE: the gdome-config script could be wrong. Edit the file and modify:

the_libs="$the_libs -L${exec_prefix}/lib -lgdome `xml2-config --libs`"

the_flags="$the_flags -I${prefix}/include -I${prefix}/include/libgdome `xml2-config --cflags` "

Then run 'perl Makefile.PL' and 'make'

Then run 'make test'. I found that two tests (01_basic_t and 09_sax_t) failed at this point. However, the former failed due to the unexpected presence of XML::Namespace and the latter failed only because pretty-printing was turned off. Despite these failed tests, I observed no operational problems.

Finally, run 'make install', change $EPRINTS_DIR/perl_lib/EPrints/ to enable GDOME, regenerate the site's static content and restart Apache.

Installing unofficial packages


There's an unofficial XML::GDOME package for Debian Sarge and Debian Etch. This is provided as a convenience with no warranties whatsoever.

Add the following line to your /etc/apt/sources.list

deb sarge univie

update your sources and install with

apt-get install libxml-gdome-perl

which will pull in a lot of dependencies as well. Note that the layout of the APT-repository might change in the future, just check back here for updates. A single .deb file could also be submitted to (but this does not help with installing dependencies).

Ubuntu & Friends

You can use this package on Ubuntu (and probably other Debian-based distros) by rebulding it from source, e.g. following Rebulding Debian packages from This examples makes use of debuild which can be found in the package devscripts (so install devscripts first).

Add a deb-src line to your sources list and update via sudo apt-get update.

deb-src sarge univie

Get the source package, it's build-dependencies and rebuild the package:

mkdir build_gdom && cd build_gdom
apt-get source libxml-gdome-perl
sudo apt-get build-dep libxml-gdome-perl
cd libxml-gdome-perl-0.86/
debuild -us -uc
cd ..

This should create a new Debian Package which you can install locally:

sudo gdebi source libxml-gdome-perl*.deb

As always, there's more than one way to do it so consult with a search engine for alternatives.