Bug 213819 - [patch] security/i2pd: v2.10.0 build fails
Summary: [patch] security/i2pd: v2.10.0 build fails
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-26 21:23 UTC by Igor Pavlov
Modified: 2016-12-25 17:42 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (amdmi3)


Attachments
Full build log (2.72 KB, application/x-gzip)
2016-10-26 21:23 UTC, Igor Pavlov
no flags Details
Add compatibility with LibreSSL (1.22 KB, patch)
2016-11-05 00:00 UTC, Igor Pavlov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Pavlov 2016-10-26 21:23:16 UTC
Created attachment 176200 [details]
Full build log

--- CMakeFiles/libi2pd.dir/Crypto.cpp.o ---
/usr/ports/security/i2pd/work/i2pd-2.10.0/Crypto.cpp:138:3: error: use of undeclared identifier 'DSA_set0_pqg'
                DSA_set0_pqg (dsa, BN_dup (dsap), BN_dup (dsaq), BN_dup (dsag));        
                ^
/usr/ports/security/i2pd/work/i2pd-2.10.0/Crypto.cpp:139:3: error: use of undeclared identifier 'DSA_set0_key'
                DSA_set0_key (dsa, NULL, NULL);
                ^

...

make[5]: stopped in /usr/ports/security/i2pd/work/i2pd-2.10.0
*** [CMakeFiles/libi2pd.dir/all] Error code 2

make[4]: stopped in /usr/ports/security/i2pd/work/i2pd-2.10.0
1 error

make[4]: stopped in /usr/ports/security/i2pd/work/i2pd-2.10.0
*** [all] Error code 2

make[3]: stopped in /usr/ports/security/i2pd/work/i2pd-2.10.0
1 error

make[3]: stopped in /usr/ports/security/i2pd/work/i2pd-2.10.0
===> Compilation failed unexpectedly.
Comment 1 Dmitry Marakasov freebsd_committer 2016-10-28 09:45:40 UTC
What's your system version and make.conf contents?
Comment 2 Igor Pavlov 2016-10-28 23:48:39 UTC
It's FreeBSD 11.0.

make.conf:

KERNCONF=GENERIC
CPUTYPE?=native
CFLAGS= -O2 -pipe -funroll-loops
COPTFLAGS= -O2 -pipe -funroll-loops
OPTIONS_UNSET=X11
OPTIONS_UNSET=DEBUG
MK_PROFILE=no
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
BUILD_STATIC=YES
WITH_PKGNG=yes
WITH_CPUFLAGS=YES
OPTIONS_SET=OPTIMIZED_CFLAGS
DEFAULT_VERSIONS+=ssl=libressl
Comment 3 Igor Pavlov 2016-10-28 23:56:41 UTC
The previous version had been successfully built without that issue.
Comment 4 Dmitry Marakasov freebsd_committer 2016-11-04 12:22:23 UTC
Obviously i2pd does not support libressl. In fact, I've tried to build it with DEFAULT_VERSIONS+=ssl=libressl, and the build failed because some dependencies do not build with libressl either.
Comment 5 Dmitry Marakasov freebsd_committer 2016-11-04 13:01:49 UTC
I've failed upstream bug: https://github.com/PurpleI2P/i2pd/issues/699 and marked the port broken with libressl.
Comment 6 commit-hook freebsd_committer 2016-11-04 13:02:31 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Nov  4 13:01:49 UTC 2016
New revision: 425318
URL: https://svnweb.freebsd.org/changeset/ports/425318

Log:
  - Mark BROKEN with LibreSSL

  PR:		213819
  Submitted by:	igor.arabesc.pavlov@gmail.com

Changes:
  head/security/i2pd/Makefile
Comment 7 Igor Pavlov 2016-11-05 00:00:05 UTC
Created attachment 176644 [details]
Add compatibility with LibreSSL

Patch contains the changes done in the i2pd trunk that are required for compatibility with LibreSSL.
Comment 8 Igor Pavlov 2016-12-21 21:58:50 UTC
i2pd port has been updated to the version 2.11.0 and it can be successfully built with the LibreSSL now.
It's time to remove the LibreSSL broken state from the Makefile.
Comment 9 Dmitry Marakasov freebsd_committer 2016-12-24 16:45:06 UTC
(In reply to Igor Pavlov from comment #8)
> i2pd port has been updated to the version 2.11.0 and it can be successfully
> built with the LibreSSL now.

It cannot, it fails with boost related link errors.
Comment 10 Igor Pavlov 2016-12-24 16:50:32 UTC
I've successfully built i2pd v2.11.0 with LibreSSL. And there were no boost related issues.

# pkg info | grep i2pd
i2pd-2.11.0_1

# pkg info | grep libressl
libressl-2.4.4

# pkg info | grep boost
boost-all-1.62.0
boost-docs-1.62.0
boost-jam-1.62.0
boost-libs-1.62.0_1Boost.Python)
Comment 11 Dmitry Marakasov freebsd_committer 2016-12-25 17:42:18 UTC
I'm building it in a clean poudriere jail with the following make.conf (options needed for curl to build):

DEFAULT_VERSIONS+=      ssl=libressl
OPTIONS_UNSET=          TLS_SRP
OPTIONS_SET=            GSAPI_NONE

and the port fails with:

CMakeFiles/i2pd.dir/Daemon.cpp.o: In function `boost::asio::ssl::detail::openssl_init_base::do_init::~do_init()':
/wrkdirs/usr/ports/security/i2pd/work/i2pd-2.11.0/Daemon.cpp:(.text._ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev[_ZN5boost4asio3ssl6detail17openssl_init_base7do_initD2Ev]+0x2c): undefined reference to `SSL_COMP_free_compression_methods'
CMakeFiles/i2pd.dir/I2PControl.cpp.o: In function `boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
/wrkdirs/usr/ports/security/i2pd/work/i2pd-2.11.0/I2PControl.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE]+0x3d): undefined reference to `SSLv3_client_method'
/wrkdirs/usr/ports/security/i2pd/work/i2pd-2.11.0/I2PControl.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE]+0x5b): undefined reference to `SSLv3_server_method'
/wrkdirs/usr/ports/security/i2pd/work/i2pd-2.11.0/I2PControl.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE]+0x15e): undefined reference to `SSLv3_method'

Until it builds fine, I can't remove BROKEN.