Repository Issue with LMDE 4

Alexzee

Well-Known Member
Credits
4,024
I understand that all of the dependencies have to be install first and I get how to do that.
I ran Slackware for 9 years so I am proficient in installing dependencies and in their order.


Before building Xiphos, please ensure that you have the platform specific
dependencies installed:

chmcmd Creates a Compressed HTML help file (chm)
CMake Cross-platform make system
Gtk+-2.0 or GTK+-3.0 The GIMP Toolkit
WebKit1 or Webkit2 Port to Gtk+ of the WebKit rendering engine
appstream-util Utility to validate AppStream metadata
biblesync Protocol to support Bible software shared co-navigation
dbus-glib API for use of D-Bus from GLib applications
desktop-file-validate Validates a desktop file
gcc GCC, the GNU Compiler Collection
gconfmm C++ wrappers for GConf
gtkhtml Lightweight HTML rendering/editing engine
intltool An internationalization tool
intltool Set of tools to centralize translation
itstool Translates XML documents with PO files
libgsf The G Structured File Library
libuuid universally unique identifier library
libxml2 XML C parser and toolkit
make A GNU tool which simplifies the build process for users
minizip Minizip contrib in zlib
sword >= 1.8.1 CrossWire Bible Society's Bible software
xmllint Validates an XML file against an XSD schema
yelp-build Creates HTML, EPUB, and other files from help files


Xiphos uses CMake to compile code.

CMake is a cross-platform tool for generating makefiles (as well as project files
used by IDEs).

The current version of the buildsystem is capable of building and packaging
Xiphos for the following platforms:

- Linux (GNU Makefiles, Ninja)
- Windows (Cross compiling on Fedora 30 only)

Should work, but actually untested:

- FreeBSD (GNU Makefiles)


### Out-of-source tree builds

While the legacy build systems typically used in-source builds, it's highly
recommended to use *out-of-source* builds with CMake.

The necessary runtime dependencies such as generated source files, static
libraries, translated files are copied over to the build directory automatically
during the build process.

Using a build tree that is separate from the source tree will prevent CMake from
generating any files in the source tree, keeping it clean.

To set-up an out-of-source build, create a completely separate directory, usually
as a sibling of the xiphos directory:

$ ls
xiphos
$ mkdir build
$ ls
build xiphos
$ cd build

The rest of the instructions is were I'm confused:

Configure CMake options

`CMAKE_INSTALL_PREFIX` Install directory. This variable defaults to `/usr/local`
on UNIX and `c:/Program Files/${PROJECT_NAME}` on Windows®.
For example, for setting up install in `/usr`, add: `-DCMAKE_INSTALL_PREFIX=/usr`

`CMAKE_BUILD_TYPE` defaults to `Release` (or to `Debug` if a .git dir exists)
Possible values are empty, `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`.
For forcing to `Release`, add: `-DCMAKE_BUILD_TYPE=Release`

`CMAKE_GENERATOR` A CMake Generator is responsible for writing the input files
for a native build system:
- Makefiles for GNU Make: standard feature
- Ninja files for Ninja: `-GNinja`

For other options, see:


### Configure Xiphos Options

Xiphos supports a number of build options that can enable or disable certain
functionality. These options must be set when running CMake with
`-DENABLE_<OPTION>=<ON|OFF`. `ON` forcefully enables the dependency
and the CMake run will fail if the related dependency is not available.
This is mostly useful for packagers. `OFF` will disable the feature.


Example for forcefully enabling Gtk2 instead of Gtk3

$ cmake -DGTK2=ON ../xiphos

Example for building with WebKitGtk1 and the webkit editor:

$ cmake -DWEBKIT1=ON -DGTKHTML=OFF ../xiphos

List of options:

Option | Functionality | Default
-------- | ---------------------------------------------- | -------
GTK2 | Force UI build with Gtk2 instead of Gtk3. | OFF
GTKHTML | Force gtkhtml editor instead of webkit editor. | OFF
WEBKIT1 | Force webkit1 instead of webkit2. | OFF
DBUS | Use the Xiphos dbus API. | ON
CHATTY | Enable lots of tracing. | OFF
HELP | Creating help files. | ON
STRIP | Strip resulting binary (Release only). | OFF
DEBUG | Enable Xiphos g_str debugging functions. | OFF
DELINT | Build with: -Wall -Werror. | OFF
CONSOLE | Enable console window in win32. | ON
POSTINST | Enable post-install tasks. | ON


For more information and an updated list of options, please check the file
`cmake/XiphosOptions.cmake`


Build options
-------------

### Build with Makefiles

GNU/Make is the standard build automation tool that automatically builds executable programs and libraries from source code by reading Makefiles.

$ make -j$(nproc)
or:

$ make VERBOSE=1 -j$(nproc)
or:

$ cmake --build . -- VERBOSE=1 -j$(nproc)


### Build with Ninja

Ninja is an alternative build system with a focus on speed. Use `-G Ninja` to force CMake to generate Ninja build files during configuration process.

$ ninja -v all
or:

$ cmake --build . -- -v


Build Xiphos on *Fedora*, *Red Hat* or *CentOS*:
================================================

## 1. Clone Xiphos git

$ git https://github.com/crosswire/xiphos.git

## 2. Create and enter the build directory

Create a build directory as a sibling of the xiphos directory:

$ mkdir build
$ ls
build xiphos
$ cd build

## 3. Install dependencies

$ sudo dnf install cmake gcc-c++ intltool make gtk3-devel dbus-glib-devel gtkhtml3-devel webkitgtk4-devel libidn-devel libxml2-devel libgsf-devel minizip-devel sword-devel libuuid-devel biblesync-devel intltool libappstream-glib-devel desktop-file-utils itstool yelp yelp-tools

## 4. Configure build

$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON ../xiphos

## 5. Build and install, run xiphos

$ make -j$(nproc) && sudo make install
$ cd ~
$ xiphos
 


Alexzee

Well-Known Member
Credits
4,024
That was just a small portion of the instruction of the install file.
The install.md file is over 390 lines long!
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
5,839
Generally with a tar.bz it's as simple as:
Not necessarily, I wish it were the case all of the time :)

Have a read of these two articles and see if they help

https://www.howtogeek.com/105413/how-to-compile-and-install-from-source-on-ubuntu/

and

https://itsfoss.com/install-software-from-source-code/

For Debian-based distros, both reference the package

build-essentials

Do you know if you have that?

Code:
apt-cache policy build-essentials

# if negative, then

sudo apt-get -y install build-essentials
Be aware, if you are not, that apps introduced in such a fashion are not updated automatically, unless an auto-update feature is built into them.

They do not fall under the gamut of the supported Repo packages and installed PPAs that can be found in Synaptic.

I don't typically use tars, so I am at my limit here.

Cheers

Wizard
 

Alexzee

Well-Known Member
Credits
4,024
Not necessarily, I wish it were the case all of the time :)

Have a read of these two articles and see if they help

https://www.howtogeek.com/105413/how-to-compile-and-install-from-source-on-ubuntu/

and

https://itsfoss.com/install-software-from-source-code/

For Debian-based distros, both reference the package

build-essentials

Do you know if you have that?

Code:
apt-cache policy build-essentials

# if negative, then

sudo apt-get -y install build-essentials
Be aware, if you are not, that apps introduced in such a fashion are not updated automatically, unless an auto-update feature is built into them.

They do not fall under the gamut of the supported Repo packages and installed PPAs that can be found in Synaptic.

I don't typically use tars, so I am at my limit here.

Cheers

Wizard
I started reading the articles in the link's you posted.

Right, I know a lot of the programs that are installed from a tar.gz don't get updated much.

I plan to spend the upcoming week studying and reading about building, compiling, and installing tars.
Next time I boot into Elementary and LMDE I'll see if build essentials are installed.

Thanks for the help Wizard!-:)
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
5,839
Always welcome, my friend :)
 

Alexzee

Well-Known Member
Credits
4,024
Finally had time to read those articles.

Good reads!

I can see now that building from src is not as simple as:
./configure
make and
make install

A long time ago a well educated Linux user helped me to compile a program and configure wouldn't finish until I satisfied all of the pkg's that were missing. This went on for hours!

I need to do more reading, research and find out just how in depth installing from src get's because I don't want any surprises when I'm in the middle of a compilation.

Prior preparation prevents poor performance as I'm sure you'll agree.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
5,839
...and configure wouldn't finish until I satisfied all of the pkg's that were missing. This went on for hours!
Welcome to Dependency Hell - mwahahaha :p

Prior preparation prevents poor performance as I'm sure you'll agree.
Wholeheartedly.

:DWith the amount of knowledge there is to learn on all things Linux, I'll be reading and practising until the day I draw my last breath, I reckon. Still, it's never boring.

I'll be downloading Debbie later today, and installing on one of two computers, and I'll see about that xiphos. Will keep you posted if I learn something.

Cheers

Chris
 

Alexzee

Well-Known Member
Credits
4,024
Welcome to Dependency Hell - mwahahaha :p



Wholeheartedly.

:DWith the amount of knowledge there is to learn on all things Linux, I'll be reading and practising until the day I draw my last breath, I reckon. Still, it's never boring.

I'll be downloading Debbie later today, and installing on one of two computers, and I'll see about that xiphos. Will keep you posted if I learn something.

Cheers

Chris
Cool mate, thanks!
 

JasKinasis

Well-Known Member
Credits
2,929
On Debian based distro’s - One trick that has worked for me when building newer versions of older programs/packages that are already in the repos is to do this:
Code:
sudo apt build-dep xiphos
That should install ALL of the required development files for the version of xiphos that is in the repo. (And you can substitute xiphos for any other package you might be planning to build!!)

And obviously, in order to build software on Debian, you need the build-essential package installed - if you don’t already have it.

Next clone the latest version of the programs source code via git, or svn, or whatever version control system is in use.

Then run the configuration script. Or in this particular case - run cmake - to check the config and create the Makefiles.

9 times out of 10 - the dependencies haven’t changed and the configuration/cmake step will succeed and you can just run make and it will build properly, then you can install it.

But sometimes, some of the library dependencies might have changed. Using newer versions of libraries than those you have installed. Versions that aren’t yet available in your distro’s repo - and in that situation, the configuration will fail.

If that happens, you’ll have to download the build dependencies for those libraries and then clone and build/install those from source too, before reconfiguring/building the original program.

But I’ve rarely seen that kind of problem. Most of the time, the existing dependencies in the repo will allow the build to succeed first time!!
 

Alexzee

Well-Known Member
Credits
4,024
On Debian based distro’s - One trick that has worked for me when building newer versions of older programs/packages that are already in the repos is to do this:
Code:
sudo apt build-dep xiphos
That should install ALL of the required development files for the version of xiphos that is in the repo. (And you can substitute xiphos for any other package you might be planning to build!!)

And obviously, in order to build software on Debian, you need the build-essential package installed - if you don’t already have it.

Next clone the latest version of the programs source code via git, or svn, or whatever version control system is in use.

Then run the configuration script. Or in this particular case - run cmake - to check the config and create the Makefiles.

9 times out of 10 - the dependencies haven’t changed and the configuration/cmake step will succeed and you can just run make and it will build properly, then you can install it.

But sometimes, some of the library dependencies might have changed. Using newer versions of libraries than those you have installed. Versions that aren’t yet available in your distro’s repo - and in that situation, the configuration will fail.

If that happens, you’ll have to download the build dependencies for those libraries and then clone and build/install those from source too, before reconfiguring/building the original program.

But I’ve rarely seen that kind of problem. Most of the time, the existing dependencies in the repo will allow the build to succeed first time!!
Great details and good instructions! Thanks JasKinasis-:)

Just finished reading this about 'make':

Trying to wrap my head around all of that and this:

More complex installations require tailoring the Makefile according to the location of libraries.
Looks like there is plenty to learn.

My concern is if the developmental files that are already in the repo are non functional.
In other words will those files that make the program function all work.
It's been my experience that one or more of the Xiphos files are not right because the drop down menu fails to scroll.

I have to be sure that the files that are in the repo are Xiphos 4.2 not 4.1.

Maybe I'm wrong and it's not a developmental file problem and a gtk issue?
 
Last edited:

JasKinasis

Well-Known Member
Credits
2,929
From a quick look at the Debian repos - the current version in stable is 4.01.
But if you download the build dependencies for 4.1 and then clone the latest source for xiphos from their source control - I'm pretty certain that it should configure and build successfully. I haven't tried it personally, so I can't say for sure, but from a cursory glance at the build dependencies - it looks like it should work!
 

Alexzee

Well-Known Member
Credits
4,024
From a quick look at the Debian repos - the current version in stable is 4.01.
But if you download the build dependencies for 4.1 and then clone the latest source for xiphos from their source control - I'm pretty certain that it should configure and build successfully. I haven't tried it personally, so I can't say for sure, but from a cursory glance at the build dependencies - it looks like it should work!
I don't know how to clone the src for xiphos so I have some reading to do.
Thanks for checking in the Debian repos.
 

captain-sensible

Well-Known Member
Credits
6,564
this looks promising: https://github.com/crosswire/xiphos/releases/tag/4.2.1

and a mention about ubuntu : https://launchpad.net/~pkgcrosswire/+archive/ubuntu/ppa

to git clone form command line it would just be :

$ git https://github.com/crosswire/xiphos.git

there is a nice set of instructions to build via make or cmake

Build Xiphos On *Debian*, *Ubuntu*, or *Linux Mint*:

Code:
## 1. Install 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
    $ make install

## 2. Install 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
    $ cmake -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ..
    $ make -j2
    $ make install

## 3. Clone git

    $ git https://github.com/crosswire/xiphos.git

## 4. Create and enter the build directory

Create a build directory as a sibling of the xiphos directory:

    $ mkdir build
    $ ls
    build xiphos
    $ cd build

## 5. Install the required dependencies:

    $ sudo apt-get appstream-util cmake g++ desktop-file-utils fp-utils git 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 swig uuid-dev uuid-runtime yelp-tools xzip

## 6. Configuration:

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

## 7. Build and install

    $ make -j$(nproc) && make install


------------------------
cmake approach looks even easier to make a .deb , you might need to install cmake if you don't have it.
unfortunately being on slackware i can't play too far with this since it could start putting stuff in my system which , might try on linux Mint live , that has perisistence when i get a chance
 
Last edited:

JasKinasis

Well-Known Member
Credits
2,929
this looks promising: https://github.com/crosswire/xiphos/releases/tag/4.2.1

and a mention about ubuntu : https://launchpad.net/~pkgcrosswire/+archive/ubuntu/ppa



regarding code on git , you can use command line but there is always a choice of a zip download . if you go to top link there is a zip download link
The point of cloning the source was to build a newer version than the version in the Debian repos. So the OP may as well just download the latest source at the HEAD of the repo, rather than a tag for the older version.

Also, if you download the zip - it only contains the code - it doesn't have any of the git information, or the remote. So it's better to use git clone.
Then to update the program, you can simply use git pull to merge the latest updates to the source-code and then rebuild and reinstall using make and sudo make install.

If you use the zip option - in order to update, you will need to download a newer version of the zip and then configure, build and install. Again, it's easier to use git!
 

captain-sensible

Well-Known Member
Credits
6,564
The point of cloning the source was to build a newer version than the version in the Debian repos.
yes i totally agree ,but you can still get the latest release from github by downloading latest release; one way is using gitclone command but i'm old school so i do manual of latest release via zip

the only thing i don't do old school is with web dev with various deps , eg CodeIgniter that has bootstrap for front end so on that i do use :

$ composer update



i didn't want to complicate things with remote master,and all that your local is out of date with master stuff
 
Last edited:

Alexzee

Well-Known Member
Credits
4,024
No luck with build-essentials on my Elementary box:

System-Product-Name:/home$ apt-cache policy build-essentials
N: Unable to locate package build-essentials
-System-Product-Name:/home$ sudo apt-get -y install build-essentials
[sudo] password for
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package build-essentials

Installed cmake as it wasn't installed.

System-Product-Name:/home$ sudo apt install cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-5.4.0-45-generic linux-hwe-5.4-headers-5.4.0-45 linux-image-5.4.0-45-generic
linux-modules-5.4.0-45-generic linux-modules-extra-5.4.0-45-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
cmake-data gcc gcc-7 libasan4 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5
libgcc-7-dev libitm1 libjsoncpp1 liblsan0 libmpx2 librhash0 libtsan0 libubsan0 libuv1
linux-libc-dev make manpages-dev


dpkg -L build-essentials
dpkg-query: package 'build-essentials' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents

Off to read the cmake file and look for build essentials and do some more reading.
 

Alexzee

Well-Known Member
Credits
4,024
I've got dependencies issue's-

sudo dpkg -i build-essential_12.4ubuntu1_amd64.deb
[sudo] password for c:
Selecting previously unselected package build-essential.
(Reading database ... 197784 files and directories currently installed.)
Preparing to unpack build-essential_12.4ubuntu1_amd64.deb ...
Unpacking build-essential (12.4ubuntu1) ...
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.2); however:
Package g++ is not installed.
build-essential depends on dpkg-dev (>= 1.17.11); however:
Package dpkg-dev is not installed.

dpkg: error processing package build-essential (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
build-essential
@c-System-Product-Name:~/Downloads$ sudo apt install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
g++ : Depends: g++-7 (>= 7.4.0-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
 

Alexzee

Well-Known Member
Credits
4,024
I think it's ok now-

c-System-Product-Name:~/Downloads$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
dpkg-dev fakeroot g++ g++-7 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libfakeroot libstdc++-7-dev
Suggested packages:
debian-keyring g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg libstdc++-7-doc
The following NEW packages will be installed:
dpkg-dev fakeroot g++ g++-7 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libfakeroot libstdc++-7-dev

The build-essential .deb pkg is now installed-

-System-Product-Name:~/Downloads$ dpkg -L build-essential
/.
/usr
/usr/share
/usr/share/build-essential
/usr/share/build-essential/essential-packages-list
/usr/share/build-essential/list
/usr/share/doc
/usr/share/doc/build-essential
/usr/share/doc/build-essential/AUTHORS
/usr/share/doc/build-essential/changelog.gz
/usr/share/doc/build-essential/copyright
/usr/share/doc/build-essential/essential-packages-list
/usr/share/doc/build-essential/list
 

Alexzee

Well-Known Member
Credits
4,024
Now I have to see if all of the dependencies are installed:

chmcmd Creates a Compressed HTML help file (chm)
CMake Cross-platform make system
Gtk+-2.0 or GTK+-3.0 The GIMP Toolkit
WebKit1 or Webkit2 Port to Gtk+ of the WebKit rendering engine
appstream-util Utility to validate AppStream metadata
biblesync Protocol to support Bible software shared co-navigation
dbus-glib API for use of D-Bus from GLib applications
desktop-file-validate Validates a desktop file
gcc GCC, the GNU Compiler Collection
gconfmm C++ wrappers for GConf
gtkhtml Lightweight HTML rendering/editing engine
intltool An internationalization tool
intltool Set of tools to centralize translation
itstool Translates XML documents with PO files
libgsf The G Structured File Library
libuuid universally unique identifier library
libxml2 XML C parser and toolkit
make A GNU tool which simplifies the build process for users
minizip Minizip contrib in zlib
sword >= 1.8.1 CrossWire Bible Society's Bible software
xmllint Validates an XML file against an XSD schema
yelp-build

It's the weekend and I have to take a break.
 



Top