Bug 266546 - lang/php80 Fails to build with openssl from ports
Summary: lang/php80 Fails to build with openssl from ports
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-22 12:42 UTC by fsbruva
Modified: 2022-09-23 22:01 UTC (History)
1 user (show)

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


Attachments
php80: Patch to consult opensslconf.h for compiled options. (2.40 KB, text/plain)
2022-09-22 12:42 UTC, fsbruva
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fsbruva 2022-09-22 12:42:07 UTC
Created attachment 236745 [details]
php80: Patch to consult opensslconf.h for compiled options.

If openssl is configured & built with any combination of the supported 'make config' options unchecked (deselected):
MD2
MD4
RMD160

then when building php, linking results in this output (or similar):

ld: error: undefined symbol: EVP_md4
>>> referenced by openssl.c
>>>               ext/openssl/openssl.o:(php_openssl_get_evp_md_from_algo)
>>> did you mean: EVP_md5
>>> defined in: /usr/local/lib/libcrypto.so

This issue has been reported upstream at https://github.com/php/php-src/issues/8430 and fix suggested at https://github.com/php/php-src/pull/8431 , but the PR has become stalled for several months now. 

In the meantime, this patch enables php to be built with rational avoidance of obsolete and unsafe hash functions.
Comment 1 Muhammad Moinur Rahman freebsd_committer 2022-09-23 22:01:47 UTC
Can you confirm whether if this is platform specific or generic to unix alike operating system?