Installation of 20.04 from source

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

horstL
Posts: 7
Joined: Sat Oct 24, 2015 4:32 pm

Installation of 20.04 from source

Post by horstL »

hi

what I'm trying todo is build from source for prep of docker environment based on centos:8

but I got stuck on the point where the build requires the static lib of ssl / crypto with info missing (and yes it's not available, but I also can't find it in the repo...) how can I solve this problem ?!

my steps to this point. (following the guidelines from wiki for 20.04 )

base build server: (only used for getting the build binaries / and the war file: this two outputs will be taken in the docker image)
all done as ROOT user
1) setup centos 8 with minimum installation / incl. headless management
2) base prep:

Code: Select all

dnf -y install epel-release
dnf -y update -y

dnf -y install gcc make
dnf -y install git
3) python 3:

Code: Select all

dnf -y install gcc-c++

dnf -y install gdbm-devel
dnf -y install libgcrypt-devel
dnf -y install ncurses-devel
dnf -y install libxml2-devel
dnf -y install readline-devel
dnf -y install sqlite-devel

dnf -y install openssl-devel bzip2-devel libffi-devel

dnf -y install zlib-devel
4) download and compile python3.8.3

Code: Select all

curl -o Python-3.8.3.tar.xz https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tar.xz
tar -xaf Python-3.8.3.tar.xz
cd Python-3.8.3
./configure --enable-optimizations
sudo make altinstall
ln -s /usr/local/bin/python3.8 /usr/bin/python3

which python3
5) upgrade py packages

Code: Select all

python3 -m pip install --upgrade pip 
python3 -m pip install py3dns
python3 -m pip install xlrd xlwt xlutils
python3 -m pip install paramiko pyspf dnspython dkimpy
python3 -m pip install pycrypto
python3 -m pip install requests
python3 -m pip install httpie
python3 -m pip install setproctitle
python3 -m pip install inotify
python3 -m pip install aiodns aiohttp aiohttp-xmlrpc aiosmtpd
(@maschoff you have a tipo in the last line "-" is missing before m)
6) checkout source as user

Code: Select all

git clone https://github.com/agnitas-org/openemm.git openemm
cd openemm 
su -
7) precondition backend

Code: Select all

dnf -y install m4
8) build backend

Code: Select all

cd openemm/backend

./build-backend.py
and here is my problem

Code: Select all

make: Leaving directory '/home/horst/openemm/backend/src/c/lib'
make: Entering directory '/home/horst/openemm/backend/src/c/xmlback'
cc -L. -L../lib -o xmlback entity.o xmlback.o parse.o create.o replace.o modify.o protect.o convert.o append.o blockmail.o block.o tagpos.o tracker.o mailtypedefinition.o links.o blockspec.o fix.o postfix.o dcache.o receiver.o tag.o dyn.o media.o columns.o url.o link_resolve.o field.o dataset.o encrypt.o mailtrack.o codec.o eval.o counter.o rblock.o misc.o sqllike.o data.o none.o generate.o count.o preview.o head.o strmap.o uid.o alua.o tfunc.o tflua.o xbp.o grammar/parse.o grammar/transform.o -lagn -lslang -lsqlite3 -llua -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic -lxml2 -lz -ldl -lm
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make: *** [Makefile:29: xmlback] Error 1
make: Leaving directory '/home/horst/openemm/backend/src/c/xmlback'
failure: call to make -C src/c/xmlback all results in 2
lib dir /lib64/

Code: Select all

ls -la /lib64/libssl

libssl.so         libssl.so.1.1     libssl.so.1.1.1c  
and no libssl.a it depends on build info -Bstatic -lssl -lcrypto but where do I get it ?

br for your help

horst
ud
Posts: 154
Joined: Thu Aug 17, 2006 9:56 am
Location: Munich, Germany
Contact:

Re: Installation of 20.04 from source

Post by ud »

Hello,

since I build the binaries on one system for different target system, I'm using the static libraries of openssl as they differ on the target systems. Sadly, it looks like there are no (more) static libraries provided in centos 8, so as a quick fix you can edit src/c/xmlback/Makefile and remove "-Wl,-Bstatic" and "-Wl,-Bdynamic" from LIBS definition. I'm looking forward for a more permanent solution for the future.

-- ud
horstL
Posts: 7
Joined: Sat Oct 24, 2015 4:32 pm

Re: Installation of 20.04 from source

Post by horstL »

hi ud,

thanx for response,
I found info from Redhat because of using a pre/adapted compiled version of openssl that the static lib will not be available at all (I just don't find the linke anymore)
it can't be exchanged with the opensource openssl lib because of the changes from redhat

I changed it to the dynamic one and build runs now through

br horst
Post Reply