diff mbox

[FFmpeg-devel] PATCH to configure for openssl-1.1.0

Message ID alpine.LNX.2.00.1609012044580.10353@bruno
State Changes Requested
Headers show

Commit Message

Joseph Parmelee Sept. 2, 2016, 2:52 a.m. UTC
Greetings:

I found that ffmpeg configure crashes with the new openssl-1.1.0.  This is
due to changes made in openssl-1.1.0 to both the header file ssl.h and to
the libraries libssl.so and libcrypto.so.  The symbol SSL_library_init no
longer exists in either library; it has been replaced by OPENSSL_init_ssl in
libssl.so and is defined as a macro in ssl.h.  Neither symbol exists in
libcrypto.so.

The attached patch fixes the problem for me (building from source) but
further changes may be necessary for others as this patch only fixes the
first part of the OR.  The ffmpeg build and install appear to work correctly
with this patch applied to the source on a 686 linux system.

Yours,

Joseph W. Parmelee
jparmele@wildbear.com


     [ Part 2, "PATCH"  Text/PLAIN (Name: "configure.patch") ~856 bytes. ]
     [ Unable to print this part. ]

Comments

Michael Niedermayer Sept. 3, 2016, 9:10 a.m. UTC | #1
On Thu, Sep 01, 2016 at 08:52:34PM -0600, Joseph Parmelee wrote:
> 
> Greetings:
> 
> I found that ffmpeg configure crashes with the new openssl-1.1.0.

what do you mean by crash ?


> This is
> due to changes made in openssl-1.1.0 to both the header file ssl.h and to
> the libraries libssl.so and libcrypto.so.  The symbol SSL_library_init no
> longer exists in either library;

openssl changed its ABI ?


> it has been replaced by OPENSSL_init_ssl in
> libssl.so and is defined as a macro in ssl.h.  Neither symbol exists in
> libcrypto.so.
> 

> The attached patch fixes the problem for me (building from source) but
> further changes may be necessary for others as this patch only fixes the
> first part of the OR.  The ffmpeg build and install appear to work correctly
> with this patch applied to the source on a 686 linux system.

this patch makes the changed test fail as OPENSSL_init_ssl
does not exist in previous openssl
conftemp...c: In function 'check_OPENSSL_init_ssl':
conftemp...c:2:51: error: 'OPENSSL_init_ssl' undeclared (first use in this function)
conftemp...c:2:51: note: each undeclared identifier is reported only once for each function it appears in

or said differently this effectively disables pkg-config with openssl
prior to 1.1.0

[...]
diff mbox

Patch

--- configure.orig	2016-08-08 16:53:00.000000000 -0600
+++ configure	2016-08-31 12:09:34.338899431 -0600
@@ -5781,7 +5781,7 @@ 
                                     add_cflags -isystem/opt/vc/include/IL ; }
                                 check_header OMX_Core.h ; } ||
                                die "ERROR: OpenMAX IL headers not found"; }
-enabled openssl           && { use_pkg_config openssl openssl/ssl.h SSL_library_init ||
+enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                                check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||