Bug 11860 - Support for LibreSSL
Support for LibreSSL
Status: NEW
Product: ClamAV
Classification: ClamAV
Component: libclamav
ALL
x86_64 GNU/Linux
: P3 normal
: 0.99.4
Assigned To: ClamAV team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-23 12:47 EDT by Steven Morgan
Modified: 2017-12-17 02:12 EST (History)
3 users (show)

See Also:
QA Contact:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Morgan 2017-06-23 12:47:58 EDT
Note from clamav-devel by Mark Allan <markjallan@gmail.com>:

Hi all,

Is there a way to compile ClamAV using LibreSSL instead of OpenSSL?

I keep getting an error during ./config phase:

> configure: error: Your OpenSSL installation is misconfigured or missing


I eventually figured it's because the system I'm compiling on has LibreSSL 2.2.7 instead of OpenSSL that I was expecting.

I don't really want to start having to build and bundle OpenSSL with my ClamAV build.

Thanks
Mark
Comment 1 Mark Allan 2017-06-23 17:45:12 EDT
Sorry for not spotting this line earlier. I run my builds from a perl script and I was only looking at the stderr output, the stdout (which I redirect to a log file) contains the following line:

checking for SSL_library_init in -lssl... no

Not sure if this helps or not.
Comment 2 Eiichi Yokota 2017-06-24 04:08:35 EDT
I think this is not the direct answer what mark wants, but it may be of some help.

1. I compiled and installed libressl-2.5.4.
------------------
export CXXFLAGS="-O3"
export CFLAGS="-O3"
./configure --prefix=/usr/local/libressl

make && make check

sudo make install
------------------


2. I try to build the latest clamav-devel-0.99.3.
------------------
export CFLAGS="-O3 -march=nocona"
export CXXFLAGS="-O3 -march=nocona"
export CPPFLAGS="-I/usr/local/pcre2/include -I/usr/local/libressl/include"
./configure --prefix=/usr/local/clamXav --build=x86_64-apple-darwin`uname -r` --with-pcre=/usr/local/pcre2 --with-openssl=/usr/local/libressl --with-system-llvm=/usr/local/clang+llvm-3.6.2-x86_64-apple-darwin/bin/llvm-config


3. I can complete building.
make[4]: Nothing to be done for `all'.
============================================================================
Testsuite summary for ClamAV 0.99.3-beta1
============================================================================
# TOTAL: 13
# PASS:  6
# SKIP:  7
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================


4. Build environment
------------------
macOS Sierra Version 10.12.5
Darwin Kernel Version 16.6.0
CLTools_Executables Version: 8.3.2.0.1
Comment 3 Eiichi Yokota 2017-06-24 17:56:51 EDT
Additional information, I can confirm as below after installing libressl-2.5.4:
---
openssl version
LibreSSL 2.5.4
which openssl
/usr/local/libressl/bin/openssl
Comment 4 Eiichi Yokota 2017-07-13 08:51:35 EDT
The latest stable release LibreSSL 2.5.5 and the latest development release LibreSSL 2.6.0 have been released, so I tested to build the latest clamav-devel-0.99.3 using them.
I have successfully completed the building in both cases.