ERROR: openssl no encontrado durante FFmpeg ./configure

2

Estoy tratando de construir mi biblioteca FFmpeg en Ubuntu con las siguientes dependencias:

  • libogg (/ home / reccsi / Dev / build-x64 / libogg)
  • libvorbis (/ home / reccsi / Dev / build-x64 / libvorbis)
  • libvpx (/ home / reccsi / Dev / build-x64 / libvpx)
  • libopenssl (/ home / reccsi / Dev / build-x64 / libopenssl)

Los construí todos con éxito y agregué los archivos pkg-config a / usr / share / pkgconfig

Sin embargo, cuando configuro FFmpeg obtengo esto:

$ ./configure  --prefix=/home/reccsi/Dev/build-x64/ffmpeg/  --pkg-config-flags="--static" --enable-shared --enable-libvpx --enable-libvorbis --enable-openssl --enable-pic --enable-debug
ERROR: openssl not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
$

Pensé que era extraño, así que busqué en config.log y encontré esto:

(...lots of text)
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <vpx/vpx_encoder.h>
    2   #include <vpx/vp8cx.h>
    3   long check_vpx_codec_vp8_cx(void) { return (long) vpx_codec_vp8_cx; }
    4   int main(void) { return 0; }
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -c -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
gcc -Wl,--as-needed -Wl,-z,noexecstack -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -o /tmp/ffconf.gwkghql5 /tmp/ffconf.btwr26JX.o -lvpx -lm -lpthread -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread -lvorbisenc -lvorbis -logg -lm -llzma -lz -pthread
check_pkg_config vpx >= 1.3.0 vpx/vpx_decoder.h vpx/vp8dx.h vpx_codec_vp9_dx
pkg-config --exists --print-errors vpx >= 1.3.0
check_func_headers vpx/vpx_decoder.h vpx/vp8dx.h vpx_codec_vp9_dx -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread
check_ld cc -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread
check_cc -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <vpx/vpx_decoder.h>
    2   #include <vpx/vp8dx.h>
    3   long check_vpx_codec_vp9_dx(void) { return (long) vpx_codec_vp9_dx; }
    4   int main(void) { return 0; }
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -c -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
gcc -Wl,--as-needed -Wl,-z,noexecstack -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -o /tmp/ffconf.gwkghql5 /tmp/ffconf.btwr26JX.o -lvpx -lm -lpthread -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread -lvorbisenc -lvorbis -logg -lm -llzma -lz -pthread
check_pkg_config vpx >= 1.3.0 vpx/vpx_encoder.h vpx/vp8cx.h vpx_codec_vp9_cx
pkg-config --exists --print-errors vpx >= 1.3.0
check_func_headers vpx/vpx_encoder.h vpx/vp8cx.h vpx_codec_vp9_cx -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread
check_ld cc -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread
check_cc -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <vpx/vpx_encoder.h>
    2   #include <vpx/vp8cx.h>
    3   long check_vpx_codec_vp9_cx(void) { return (long) vpx_codec_vp9_cx; }
    4   int main(void) { return 0; }
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -c -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
gcc -Wl,--as-needed -Wl,-z,noexecstack -I/home/reccsi/Dev/build-x64/libvpx/include -L/home/reccsi/Dev/build-x64/libvpx/lib -o /tmp/ffconf.gwkghql5 /tmp/ffconf.btwr26JX.o -lvpx -lm -lpthread -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread -L/home/reccsi/Dev/build-x64/libvpx/lib -lvpx -lm -lpthread -lvorbisenc -lvorbis -logg -lm -llzma -lz -pthread
check_pkg_config openssl openssl/ssl.h SSL_library_init
pkg-config --exists --print-errors openssl
check_func_headers openssl/ssl.h SSL_library_init -lssl -lcrypto -ldl
check_ld cc -lssl -lcrypto -ldl
check_cc
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <openssl/ssl.h>
    2   long check_SSL_library_init(void) { return (long) SSL_library_init; }
    3   int main(void) { return 0; }
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -c -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
In file included from /usr/include/openssl/evp.h:66:0,
                 from /usr/include/openssl/x509.h:73,
                 from /usr/include/openssl/ssl.h:156,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/local/include/openssl/opensslconf.h:18:3: error: #error OPENSSL_ALGORITHM_DEFINES no longer supported
 # error OPENSSL_ALGORITHM_DEFINES no longer supported
   ^
In file included from /usr/include/openssl/ssl.h:165:0,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/include/openssl/kssl.h:72:18: fatal error: krb5.h: No such file or directory
 #include <krb5.h>
                  ^
compilation terminated.
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto
check_header openssl/ssl.h
check_cpp
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <openssl/ssl.h>
    2   int x;
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -E -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
In file included from /usr/include/openssl/evp.h:66:0,
                 from /usr/include/openssl/x509.h:73,
                 from /usr/include/openssl/ssl.h:156,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/local/include/openssl/opensslconf.h:18:3: error: #error OPENSSL_ALGORITHM_DEFINES no longer supported
 # error OPENSSL_ALGORITHM_DEFINES no longer supported
   ^
In file included from /usr/include/openssl/ssl.h:165:0,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/include/openssl/kssl.h:72:18: fatal error: krb5.h: No such file or directory
 #include <krb5.h>
                  ^
compilation terminated.
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32
check_header openssl/ssl.h
check_cpp
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <openssl/ssl.h>
    2   int x;
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -E -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
In file included from /usr/include/openssl/evp.h:66:0,
                 from /usr/include/openssl/x509.h:73,
                 from /usr/include/openssl/ssl.h:156,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/local/include/openssl/opensslconf.h:18:3: error: #error OPENSSL_ALGORITHM_DEFINES no longer supported
 # error OPENSSL_ALGORITHM_DEFINES no longer supported
   ^
In file included from /usr/include/openssl/ssl.h:165:0,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/include/openssl/kssl.h:72:18: fatal error: krb5.h: No such file or directory
 #include <krb5.h>
                  ^
compilation terminated.
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32
check_header openssl/ssl.h
check_cpp
BEGIN /tmp/ffconf.2Hr4i7dx.c
    1   #include <openssl/ssl.h>
    2   int x;
END /tmp/ffconf.2Hr4i7dx.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -I/home/reccsi/Dev/build-x64/libvpx/include -E -o /tmp/ffconf.btwr26JX.o /tmp/ffconf.2Hr4i7dx.c
In file included from /usr/include/openssl/evp.h:66:0,
                 from /usr/include/openssl/x509.h:73,
                 from /usr/include/openssl/ssl.h:156,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/local/include/openssl/opensslconf.h:18:3: error: #error OPENSSL_ALGORITHM_DEFINES no longer supported
 # error OPENSSL_ALGORITHM_DEFINES no longer supported
   ^
In file included from /usr/include/openssl/ssl.h:165:0,
                 from /tmp/ffconf.2Hr4i7dx.c:1:
/usr/include/openssl/kssl.h:72:18: fatal error: krb5.h: No such file or directory
 #include <krb5.h>
                  ^
compilation terminated.
ERROR: openssl not found

¿Alguien más ha visto esto experimentado?

bot1131357
fuente
No edite una solución en su pregunta. En su lugar, publíquelo como una respuesta separada a continuación. Consulte stackoverflow.com/help/self-answer
Matt

Respuestas:

1
$ git clone https://github.com/FFmpeg/FFmpeg.git
$ cd FFmpeg

$ ./configure --help | egrep -i '(ssl|tls)'
                           if openssl, librtmp or gmp is not used [no]
                           if openssl or librtmp is not used [no]
  --enable-gnutls          enable gnutls, needed for https support
                           if openssl is not used [no]
  --enable-openssl         enable openssl, needed for https support
                           if gnutls is not used [no]
  --disable-schannel       disable SChannel SSP, needed for TLS support on
                           Windows if openssl and gnutls are not used [autodetect]
  --disable-securetransport disable Secure Transport, needed for TLS support
                           on OSX if openssl and gnutls are not used [autodetect]

Por lo tanto, parece que habilita con --enable-openssl, pero agrega encabezados y bibliotecas a la antigua usanza:

$ export CFLAGS="-I/usr/local/ssl/include -L/usr/local/ssl/lib -Wl,-rpath=/usr/local/ssl/lib"
$ CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" ./configure --enable-openssl
...

configuredebe completar con una openssllista como una biblioteca externa:

install prefix            /usr/local
source path               .
C compiler                gcc
C library                 
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     yes
nasm                      yes
...
SSE enabled               yes
SSSE3 enabled             yes
AESNI enabled             yes
AVX enabled               yes
XOP enabled               yes
...
makeinfo enabled          yes
makeinfo supports HTML    no

Enabled programs:
ffmpeg             ffprobe            ffserver

External libraries:
bzlib              libxcb_shape           openssl
iconv              libxcb_shm             videotoolbox
libxcb             libxcb_xfixes          zlib
...

Y si inspeccionas config.log, verás algo similar a:

check_func_headers openssl/ssl.h SSL_library_init -I/opt/local/include -L/opt/local/lib -lssl -lcrypto
check_ld cc -I/opt/local/include -L/opt/local/lib -lssl -lcrypto
check_cc -I/opt/local/include -L/opt/local/lib
BEGIN /var/folders/mk/y7lk0xrx72lcn_2q3d12jcch0000gn/T//ffconf.FRvR3v3L.c
    1   #include <openssl/ssl.h>
    2   long check_SSL_library_init(void) { return (long) SSL_library_init; }
    3   int main(void) { return 0; }

El SSL_library_initme dice que FFmpeg solo se puede usar con OpenSSL 1.0.2 y versiones posteriores. Se deben usar otras pruebas para OpenSSL 1.1.0 y superior. Ver también Compilación e Instalación | Autoconf en la wiki de OpenSSL.

jww
fuente
¿Quiere decir que debería agregar encabezados y bibliotecas usando export CFLAGS? ¿Pkg-config no se ocuparía de eso?
bot1131357
@ bot1131357 - Tuck CFLAGSand CXXFLAGSaway para todos los proyectos de Autotool. Los molestos proyectos basados ​​en Autotool son los que ignoran CFLAGSy, CXXFLAGSpor lo tanto, debes hackear los archivos MAKE generados. Y siempre trate de usar -Wl,-rpath=/usr/local/ssl/liben Linux cuando compila contra un OpenSSL (u otras bibliotecas) no estándar.
jww