Bug 251575

Summary: security/php74-openssl fails to build with libressl
Product: Ports & Packages Reporter: Simeon Simeonov <sgs>
Component: Individual Port(s)Assignee: Torsten Zuehlsdorff <tz>
Status: Closed FIXED    
Severity: Affects Only Me CC: andrej
Priority: --- Flags: bugzilla: maintainer-feedback? (tz)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
php74-openssl build log
none
patch from Upstream none

Description Simeon Simeonov 2020-12-04 07:56:32 UTC
Created attachment 220238 [details]
php74-openssl build log

security/php74-openssl-7.4.13_1 fails to build (see attachment) against libressl:

--- xp_ssl.lo ---
 cc -I. -I/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl -DPHP_ATOM_INC -I/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/include -I/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/main -I/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -fstack-protector-strong -c /usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/xp_ssl.c  -fPIC -DPIC -o .libs/xp_ssl.o
--- openssl.lo ---
/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/openssl.c:6501:8: error: use of undeclared identifier 'EVP_CIPH_OCB_MODE'
                case EVP_CIPH_OCB_MODE:
                     ^
/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/openssl.c:6506:49: error: use of undeclared identifier 'EVP_CIPH_OCB_MODE'
                        mode->set_tag_length_always = cipher_mode == EVP_CIPH_OCB_MODE;
                                                                     ^
/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/openssl.c:6509:30: error: use of undeclared identifier 'EVP_CTRL_AEAD_GET_TAG'
                        mode->aead_get_tag_flag = EVP_CTRL_AEAD_GET_TAG;
                                                  ^
/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/openssl.c:6510:30: error: use of undeclared identifier 'EVP_CTRL_AEAD_SET_TAG'
                        mode->aead_set_tag_flag = EVP_CTRL_AEAD_SET_TAG;
                                                  ^
/usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl/openssl.c:6511:28: error: use of undeclared identifier 'EVP_CTRL_AEAD_SET_IVLEN'
                        mode->aead_ivlen_flag = EVP_CTRL_AEAD_SET_IVLEN;
                                                ^
5 errors generated.
*** [openssl.lo] Error code 1

make[1]: stopped in /usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl
1 error

make[1]: stopped in /usr/ports/security/php74-openssl/work/php-7.4.13/ext/openssl
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Andrej Ebert 2020-12-04 09:29:35 UTC
There's an upstream bug open:

https://bugs.php.net/bug.php?id=80368

There's also a patch:

https://bugs.php.net/patch-display.php?bug=80368&patch=check_SSL_OCB_support&revision=1606827655

I'll try and test it in a few minutes.
Comment 2 Andrej Ebert 2020-12-04 09:41:39 UTC
Created attachment 220242 [details]
patch from Upstream

This is the patch from
https://bugs.php.net/patch-display.php?bug=80368&patch=check_SSL_OCB_support&revision=1606827655
Comment 3 Andrej Ebert 2020-12-04 09:45:10 UTC
Builds fine with the patch and seems to work on:

FreeBSD 12.1-STABLE r362988

php74-openssl-7.4.13_1

libressl-devel-3.2.2

I'll test it with libressl 3.3.0 in a few minutes.
Comment 4 Andrej Ebert 2020-12-04 14:46:41 UTC
(In reply to Andrej Ebert from comment #3)

works with libressl 3.3.0 too.
Comment 5 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2020-12-04 21:58:16 UTC
A fix was already committed:
https://svnweb.freebsd.org/changeset/ports/556964

:)