Xiphos

Xiphos on Ubuntu 20.04

I have been using Xiphos as my Bible app on my laptop for quite a while. Ubuntu 20.04 left me with quite a surprise when it wasn’t found!

$ sudo apt install xiphos
[sudo] password for skp: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package xiphos

I’m thinking that it has to do with some dependencies that are outdated, but I’m not sure.

I found though that I could manually compile Xiphos and it still works just fine. Here are the commands that I used…

First, I need to make sure some packages are installed:

sudo apt install git \
                 appstream-util \
                 cmake \
                 g++ \
                 desktop-file-utils \
                 fp-utils \
                 gsettings-desktop-schemas-dev \
                 intltool \
                 itstool \
                 libdbus-glib-1-dev \
                 libenchant-dev \
                 libgail-3-dev \
                 libglade2-dev \
                 libgtk-3-dev \
                 libminizip-dev \
                 libsword-dev \
                 libwebkit2gtk-4.0-dev \
                 libxml2-dev \
                 libxml2-utils \
                 make \
                 python-dev \
                 curl

Next, I needed to create a number of directories. Several dependencies need to be built in their own directories first. Then, I need a blank directory in which to build Xiphos itself.

cd ~/Downloads
mkdir xiphos-build
cd xiphos-build
mkdir build
mkdir gtkhtml
mkdir biblesync
git clone https://github.com/crosswire/xiphos.git

Now that the directory structure is in place, I need gtkhtml. I built it with this:

cd gtkhtml
curl -Ls -o gtkhtml-4.10.0.tar.xz https://download.gnome.org/sources/gtkhtml/4.10/gtkhtml-4.10.0.tar.xz
tar xf gtkhtml-4.10.0.tar.xz
cd gtkhtml-4.10.0
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/gtkhtml4 --localstatedir=/var --disable-static
make -j2
sudo make install

Next, Biblesync is another requirement:

cd ../../biblesync
curl -Ls -o biblesync-1.2.0.tar.gz https://github.com/karlkleinpaste/biblesync/archive/1.2.0.tar.gz
tar xf biblesync-1.2.0.tar.gz
cd biblesync-1.2.0
mkdir -p build
cd build

Finally, I built Xiphos itself. I had an issue with the html requirement. I had to add the “-DGTKHTML=ON” option to get around that.

cmake -DGTKHTML=ON -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ../xiphos
make -j2
sudo make install
cd ../../../build
swig uuid-dev uuid-runtime yelp-tools xzip
cmake -DCMAKE_INSTALL_PREFIX=/usr -DWEBKIT1=ON ../xiphos
make -j$(nproc)
sudo make install

So, this at least got Xiphos installed. I wish it were easier, but at least I have it working. Please comment if you see something I could have done better or if you have details on why it was removed from the Ubuntu repositories.

Update

I was able to connect with one of the developers on IRC. It looks like the GtkHTML dependency was the issue that knocked it out of the repositories for Ubuntu 20.04. He pointed me to their mailing list. Here’s a personal PPA, but it’s probably better to build it.

Resources

17 thoughts on “Xiphos on Ubuntu 20.04

  1. I followed the directions you gave but had to use the below commands to install xiphos.

    From:https://xiphos.org/download/

    cd xiphos
    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON
    make -C build
    sudo make -C build install

    Thanks for you direction
    Bruce

    1. Bruce,

      Thanks for reporting back. I’ll have to play with it some more. I may have gotten mixed up with my notes.

    2. Hi, your guide is very comprehensive and well described. However, I got all the way to the biblesync but couldn’t build Xiphos itself.

      When putting in the command
      cmake -DGTKHTML=ON -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ../xiphos
      there is no such directory. I was still in the Downloads/xiphos-build/biblesync/biblesync-1.2.0/build folder so I went back to the Downloads/xiphos-build folder but then it gives me the message
      — Configuring incomplete, errors occurred!
      See also “/home/j******r/Downloads/xiphos-build/xiphos/CMakeFiles/CMakeOutput.log”
      The error mentioned in the terminal is
      CMake Error at CMakeLists.txt:52 (message):
      You cannot build in the source directory (or any directory with a
      CMakeLists.txt file). Please make an out-of-stream build subdirectory.
      I am so close but yet so new to Ubunbtu. If you could help me sort this out, would be great.

      PS. The directions from https://xiphos.org/download/ didn’t work either, error message
      CMake Error at cmake/XiphosBuildTools.cmake:29 (message):
      Cannot find xsltproc, which is required to build xiphos
      Call Stack (most recent call first):
      cmake/XiphosBuildTools.cmake:37 (xiphos_find_program)
      CMakeLists.txt:85 (include)

      — Configuring incomplete, errors occurred!
      See also “/home/johannesebner/Downloads/xiphos-build/xiphos/build/CMakeFiles/CMakeOutput.log”

      Thanks for helping

  2. I’ve been trying this for days. What did i missed? “Could NOT find Biblesync (missing: BIBLESYNC_LIBRARY_DIR) (found version
    “1.2.0”)”????????

    ezri@kali:~/xiphos-4.2.1$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON
    — Looking for glib-genmarshal
    — Looking for glib-genmarshal – found
    — Looking for xmllint
    — Looking for xmllint – found
    — Looking for xsltproc
    — Looking for xsltproc – found
    — Looking for dbus-binding-tool
    — Looking for dbus-binding-tool – found
    — Looking for itstool
    — Looking for itstool – found
    — Looking for desktop-file-validate
    — Looking for desktop-file-validate – found
    — Looking for appstream-util
    — Looking for appstream-util – found
    — Looking for yelp-build
    — Looking for yelp-build – found
    — Looking for uuidgen
    — Looking for uuidgen – found
    — Looking for zip
    — Looking for zip – found
    CMake Error at /usr/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
    Could NOT find Biblesync (missing: BIBLESYNC_LIBRARY_DIR) (found version
    “1.2.0”)
    Call Stack (most recent call first):
    /usr/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
    cmake/modules/FindBiblesync.cmake:68 (find_package_handle_standard_args)
    cmake/XiphosDependencies.cmake:51 (find_package)
    CMakeLists.txt:88 (include)

  3. Seems like a great deal of coding! The Linux Mint developers told me to install the Flathub/Flatpack version through the Software Manager. It worked but not the way it has always worked for me in the past. It had bugs! Then a Xiphos developer (Karl Kleinpaste) gave me the following code to run in a Terminal:

    sudo add-apt-repository ppa:pkgcrosswire/ppa
    sudo apt-get update

    I ran it and it populated Synaptic with the latest Xiphos version (4.2). It is now installed in Mint 20.04 MATE and it runs just fine!

    1. It was pretty involved, but it worked without too much difficulty. I did not know about that ppa. That’s great. Thanks for sharing.

  4. Hi, your guide is very comprehensive and well described. However, I got all the way to the biblesync but couldn’t build Xiphos itself.

    When putting in the command
    cmake -DGTKHTML=ON -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ../xiphos
    there is no such directory. I was still in the Downloads/xiphos-build/biblesync/biblesync-1.2.0/build folder so I went back to the Downloads/xiphos-build folder but then it gives me the message
    — Configuring incomplete, errors occurred!
    See also “/home/j******r/Downloads/xiphos-build/xiphos/CMakeFiles/CMakeOutput.log”
    The error mentioned in the terminal is
    CMake Error at CMakeLists.txt:52 (message):
    You cannot build in the source directory (or any directory with a
    CMakeLists.txt file). Please make an out-of-stream build subdirectory.
    I am so close but yet so new to Ubunbtu. If you could help me sort this out, would be great.

    PS. The directions from https://xiphos.org/download/ didn’t work either, error message
    CMake Error at cmake/XiphosBuildTools.cmake:29 (message):
    Cannot find xsltproc, which is required to build xiphos
    Call Stack (most recent call first):
    cmake/XiphosBuildTools.cmake:37 (xiphos_find_program)
    CMakeLists.txt:85 (include)

    — Configuring incomplete, errors occurred!
    See also “/home/johannesebner/Downloads/xiphos-build/xiphos/build/CMakeFiles/CMakeOutput.log”

    Sorry this is a repost because I accidentally wrote it as a reply at first.
    Thanks for helping

    1. Did you to run the “apt install” command at the beginning? You might try to run that again to make sure that all of those packages are installed.

      You could just try to install the xsltproc package:
      sudo apt install xsltproc

      When I look in synaptic, it looks like I have that already installed. The dependencies show that it is required by libxml2. And libxml2 is required by libxml2-dev. libxml2-dev is in the list at the beginning of the article, so I’m thinking that’s how I got xsltproc installed.

      Does that help?

      1. Thanks that helps and yeah, I ran all the installs from the beginning, thanks. I tried to go with the installation manual from Xiphos which is similar but has some errors. I got as far as the configuration where I enter the command (in the directory ~/Downloads/xiphos-build/build)

        cmake -DCMAKE_INSTALL_PREFIX=/usr -DWEBKIT1=ON ../xiphos

        gives error and tells me “No package ‘webkitgtk-3.0’ found
        CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463”

        I am looking how to get this webkitgtk-3.0 installed but I don’t find where to get it from and I thought it was done with the installs in the beginning… Sorry I’m pretty new to Ubuntu but I want to circumvent using WINE for e-sword. Thanks for all the help.

        1. Another thing I noticed is that when I enter
          sudo apt-get update

          I receive errors
          Err:17 http://ppa.launchpad.net/webkit-team/ppa/ubuntu focal Release
          404 Not Found [IP: 91.189.95.83 80]
          Reading package lists… Done
          E: The repository ‘http://ppa.launchpad.net/webkit-team/ppa/ubuntu focal Release’ does not have a Release file.

  5. After several hits and misses, I used Rick’s instructions from the comment below, and it ran without a hitch in Linux Mint 20.x, MATE version.

    sudo add-apt-repository ppa:pkgcrosswire/ppa
    sudo apt-get update

    Looks like the “crosswire” ppa was modified from the one we used to use. Hope this works for others.

  6. The author of the article forgot to add steps how to build Biblesync. The corresponding listing ends with `cd build`, without continuation. Here are the missing commands:

    cmake -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ../..
    make
    sudo make install

    I took them from the INSTALL file located in biblesync-1.2.0 folder. Note that I used DLIBDIR=/usr/lib for Ubuntu, but it can be another path for other distros. This is important because if you install a library into a wrong folder, pkgconfig will not find it, and, as a consequence, cmake will stop with an error.

Leave a Comment

Your email address will not be published. Required fields are marked *