Solved Apache24 fails after LibreSSL 2.7.2: mod_ssl.so: Undefined symbol "OPENSSL_malloc_init"

LibreSSL 2.7+ is a big change and it caused a host of issues for me, most of which I've resolved with the patches posted on the LibreSSL wiki, but www/apache24 is still refusing to budge and the port was updated with the patch for the security/libressl update some time ago..

my env:
apache24-2.4.33
libressl-2.7.2_1
FreeBSD 10.3-RELEASE-p28 #0 r330946
(portmaster)


When I try a apachectl restart I get:

Code:
Apache24 will not start:
httpd: Syntax error on line 130 of /usr/local/etc/apache24/httpd.conf: Cannot load libexec/apache24/mod_ssl.so into server: /usr/local/libexec/apache24/mod_ssl.so: Undefined symbol "OPENSSL_malloc_init"

The following innocuous seeming error reported during the build seems relevant

Code:
--- mod_ssl.slo ---
mod_ssl.c:404:5: warning: implicit declaration of function 'OPENSSL_malloc_init' is invalid in C99 [-Wimplicit-function-declaration]
    OPENSSL_malloc_init();


mod_ssl.c: +/- 405:
C:
    /* We must register the library in full, to ensure our configuration
     * code can successfully test the SSL environment.
     */
#if MODSSL_USE_OPENSSL_PRE_1_1_API
    (void)CRYPTO_malloc_init();
#else
    OPENSSL_malloc_init();
#endif
    ERR_load_crypto_strings();
    SSL_load_error_strings();
    SSL_library_init();
#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
    ENGINE_load_builtin_engines();
#endif
    OpenSSL_add_all_algorithms();
    OPENSSL_load_builtin_modules();

I don't see a declaration in mod_ssl.h. I believe the function is declared in OPENSSL_malloc, e.g. int OPENSSL_malloc_init(void) and that maybe the latest version of LibreSSL replaced the OpenSSL code that contained this declaration without replacing it. Or something like that. Maybe.

Any hints?
 
Back
Top