Bug 251575 - security/php74-openssl fails to build with libressl
Summary: security/php74-openssl fails to build with libressl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-04 07:56 UTC by Simeon Simeonov
Modified: 2020-12-04 21:58 UTC (History)
1 user (show)

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


Attachments
php74-openssl build log (15.50 KB, text/plain)
2020-12-04 07:56 UTC, Simeon Simeonov
no flags Details
patch from Upstream (556 bytes, patch)
2020-12-04 09:41 UTC, Andrej Ebert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 2020-12-04 21:58:16 UTC
A fix was already committed:
https://svnweb.freebsd.org/changeset/ports/556964

:)