Table of Contents
This manual describes how to build Enduro/X on fresh installed Ubuntu 14.04 and Centos 6.x. Process includes description of kernel configuration, required package installation and finally finishing all with unit test completion.
This installation manual assumes that OS user for installation is user1, located at /home/user1. The Enduro/X system will build at path /home/user1/endurox.
To get Enduro/X unit tested and running, environmental configuration is required see ex_adminman(guides)(Enduro/X Administration Manual, Setup System) section.
This chapter describes how to install dependencies on different GNU/Linux flavors and later does get the source code and builds it.
This chapter describes package installation commands on different Linux distributions.
$ su - root # emerge sync # emerge -av indent asciidoc dblatex libxml2 cmake dia \ flex bison zlib openssl app-crypt/gpgme dev-vcs/git
The same goes on Raspbian (Raspberry Pi OS)
$ sudo apt-get update $ sudo apt-get install indent asciidoc dblatex libxml2-dev \ cmake dia flex bison gcc g++ zlib1g-dev \ libssl-dev libcrypto++9 libcrypto++-dev \ libgpgme11-dev libxml2-dev git
$ sudo apt-get update $ sudo apt-get install indent asciidoc dblatex libxml2-dev \ cmake dia flex bison gcc g++ zlib1g-dev \ libssl-dev libcrypto++9 libcrypto++-dev \ libgpgme11-dev libxml2-dev git
$ sudo apt-get update $ sudo apt-get install indent asciidoc dblatex libxml2-dev \ cmake dia flex bison gcc g++ zlib1g-dev \ libssl-dev libcrypto++-dev \ libgpgme11-dev libxml2-dev libxml2-utils git
For Linux Mint Mate 19+ additional packages are required (or you get following error during build):
a2x: ERROR: missing configuration file: /etc/asciidoc/dblatex/asciidoc-dblatex.xsl
Install:
$ sudo apt-get update asciidoc-dblatex
As some packages like ‘dia’ does not exists in base Centos install, then few of them we will borrow from Fedora project via epel-release. Which should be installed in following way: Download the latest epel-release rpm from (e.g. epel-release-6-8.noarch.rpm or later) http://dl.fedoraproject.org/pub/epel/6/x86_64/ Install epel-release rpm:
$ su - root # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -Uvh epel-release*rpm
Now install system depenencies
# yum update # yum groupinstall 'Development Tools' # yum install git cmake asciidoc \ openssl openssl-devel \ gpgme-devel dia libxml2-devel # exit $
Now install system dependencies
But if you run build on Oracle Linux, you need to enable optional repo for asciidoc/gpgme-devel/dblatex
# yum install yum-utils # yum-config-manager --enable ol7_optional_latest
# yum groupinstall 'Development Tools' # yum install git cmake asciidoc openssl openssl-devel \ gpgme-devel redhat-lsb dblatex libxml2-devel
Centos 7 does not ship with ‘dia’ package. Thus we will install Fodra Core package: dia-0.97.2-5.fc19.x86_64.rpm. Also we need to install additional deps to run dia.
# yum install -y cairo-gobject-devel gtk2 gtk2-devel gdk-pixbuf2-devel \ libglade2-devel libgnomeui.x86_64 wget libgnomeui # wget http://ftp.scientificlinux.org/linux/fedora/releases/19/Fedora/x86_64/os/Packages/d/dia-0.97.2-5.fc19.x86_64.rpm # rpm -i --nodeps dia-0.97.2-5.fc19.x86_64.rpm
Seems that RHEL/Centos/Oracle Linux 7 ship with old CMake package which generates defective RPMs. Thus it The installation might give you following errors
$ sudo rpm -i *.rpm file /usr/share/man from install of endurox-3.5.1-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64 file /usr/share/man/man3 from install of endurox-3.5.1-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64 file /usr/share/man/man5 from install of endurox-3.5.1-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64 file /usr/share/man/man8 from install of endurox-3.5.1-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64 $ cmake --version cmake version 2.8.12.2
Install new CMake from sources:
$ su - root # yum remove cmake # exit $ cd $ wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz $ tar -xzf cmake-3.7.2.tar.gz $ cd cmake-3.7.2 $ ./configure $ make $ su - root # make install # cmake --version cmake version 3.7.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
To install all required dependencies, you need following sets of DVDs (or other sources), or later
Add these in the "Configured Software Repositories dialog" in YaST tool. Also ensure that RPM database is updated of available packages. One way to do this is Open the "Software Management" in the YaST, it will re-scan the available software sources.
installation of packages:
# zypper install git-core cmake flex bison gcc libxml2 libgpgme11 gcc-c++ \ libxml2-devel libgpgme-devel asciidoc cmake dia rpm-build
Also Enduro/X includes documentation in sources, thus additional config is needed
so that Dia
package can build illustrations needed for manuals.
$ sudo mkdir /etc/asciidoc/filters/dia $ sudo -s # cat << EOF > /etc/asciidoc/filters/dia/dia-filter.conf # # AsciiDoc Dia filter configuration file. # # Version: 0.1 [blockdef-listing] dia-style=template="dia-block",subs=(),posattrs=("style","file","target","size"),filter='dia -t png -e "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" "{outdir}/{file}" {size?-s {size}} > /dev/null' [dia-block] template::[image-blockmacro] EOF
# useradd -m user1 # su - user1 $ cd /home/user1 $ git clone https://github.com/endurox-dev/endurox endurox
This code bellow creates ndrx_home executable file which loads basic environment, so that you can use sample configuration provided by Enduro/X in sampleconfig directory. This also assumes that you are going to install to $HOME/endurox/dist folder.
$ cat << EOF > $HOME/ndrx_home #!/bin/bash # Where app domain lives export NDRX_APPHOME=$HOME/endurox # Where NDRX runtime lives export NDRX_HOME=$HOME/endurox/dist/bin # Debug config too export NDRX_DEBUG_CONF=$HOME/endurox/sampleconfig/debug.conf # NDRX config too. export NDRX_CONFIG=$HOME/endurox/sampleconfig/ndrxconfig.xml # Access for binaries export PATH=$PATH:$HOME/endurox/dist/bin # LIBPATH for .so export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/endurox/dist/lib:$HOME/endurox/dist/lib64 # UBF/FML field tables export FLDTBLDIR=$HOME/endurox/ubftest/ubftab # To complete unit tests: export NDRX_MSGSIZEMAX=1049600 # Increase stack size ulimit -s 30751 EOF $ chmod +x $HOME/ndrx_home
If you develop in Gnome (e.g. Mate) session, then do ‘export DESKTOP_SESSION=gnome’ before run IDE (e.g. NetBeans).
Enduro/X basically consists of two parts: . XATMI runtime; . UBF/FML buffer processing. Each of these two sub-systems have own units tests.
$ cd /home/user1/endurox/ubftest $ ./ubfunit1 2>/dev/null Running "main"... Completed "main": 5751 passes, 0 failures, 0 exceptions.
ATMI testing might take some time. Also ensure that you have few Gigabytes of free disk space, as logging requires some space. To run the ATMI tests do following:
$ cd /home/user1/endurox/atmitest $ nohup ./run.sh & $ tail -f /home/user1/endurox/atmitest/test.out ... Setting domain 2 Server executable = tpbridge Id = 101 : Shutdown succeeded. Server executable = convsv21 Id = 50 : Shutdown succeeded. Server executable = atmi.sv21 Id = 30 : Shutdown succeeded. Server executable = tmsrv Id = 10 : Shutdown succeeded. Shutdown finished. 4 processes stopped. atmiclt21: no process found ************ FINISHED TEST: [test021_xafull/run.sh] with 0 ************ Running "main"... Running "main"... Completed "main": 21 passes, 0 failures, 0 exceptions.
At finish you have a configured system which is read to process the transactions by Enduro/X runtime. It is possible to copy the binary version (dist) folder to other same architecture machine and run it there with out need of building. This process is described in [BINARY_INSTALL] guide.