#7086 closed defect (invalid)
ffmpeg does not install with OpenSSL support
Reported by: | supredoe | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
- Unable to compile ffmpeg with OpenSSL 1.0.1j
- Not able to upgrade OpenSSL version; receiving compiler errors about undefined references to BIO_clear_flags and BIO_set_flags
====
Error message output:
LD ffmpeg_g
libavformat/libavformat.a(tls_openssl.o): In function `url_bio_ctrl':
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:204: undefined reference to `BIO_clear_flags'
libavformat/libavformat.a(tls_openssl.o): In function `url_bio_bread':
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:179: undefined reference to `BIO_clear_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:181: undefined reference to `BIO_set_flags'
libavformat/libavformat.a(tls_openssl.o): In function `url_bio_bwrite':
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:193: undefined reference to `BIO_clear_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:195: undefined reference to `BIO_set_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:193: undefined reference to `BIO_clear_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:195: undefined reference to `BIO_set_flags'
collect2: error: ld returned 1 exit status
====
How to reproduce:
- openssl version 1.01j can be downloaded here:
https://www.openssl.org/source/old/1.0.1/openssl-1.0.1j.tar.gz
---
- the ./configure command is as follows:
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-gpl --enable-libx264 --enable-openssl --enable-libfdk_aac --enable-nonfree --enable-libmp3lame
---
ffmpeg version is the most recent version available from:
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
---
built on 2018.03.15
Change History (7)
follow-up: 2 comment:1 by , 7 years ago
comment:2 by , 7 years ago
Replying to heleppkes:
Seems to me like your build environment is somehow screwed up, and pulling in headers from OpenSSL 1.1, and then trying to link against 1.0.1?
Is there a way to specify the exact location of the headers to be used?
I've previously tried hard-coding the absolute path to #include <openssl/bio.h>
(so it would be #include </usr/lib/openssl/bio.h>), but the same errors persist.
Is there a different way to be sure that the correct headers are used?
comment:3 by , 7 years ago
Update:
Copied the openssl 1.0.1j header files directly to /usr/include (cp -L -R include/openssl /usr/include).
Recompiling ffmpeg now.
Hopefully this will clear up any possible version conflict regarding headers.
---
Outcome (eight minutes later):
No effect. The same errors still persist.
follow-up: 5 comment:4 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 3.4 → unspecified |
A default compilation of openssl 1.0.1j provides definitions for BIO* in libcrypto.a here.
Maybe pkg-config is the culprit, all your external dependencies are also supposed to work without pkg-config.
comment:5 by , 7 years ago
Replying to cehoyos:
A default compilation of openssl 1.0.1j provides definitions for BIO* in libcrypto.a here.
Maybe pkg-config is the culprit, all your external dependencies are also supposed to work without pkg-config.
All dependencies have been reinstalled for system-wide install (no longer installing into "$HOME/ffmpeg_build/").
Attempted re-compile of ffmpeg with the following ./configure line:
./configure --enable-gpl --enable-libx264 --enable-openssl --enable-libfdk_aac --enable-nonfree --enable-libmp3lame
Note that pkg-config is no longer specified.
===
Same errors occur:
LD ffmpeg_g
libavformat/libavformat.a(tls_openssl.o): In function `url_bio_ctrl':
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:204: undefined reference to `BIO_clear_flags'
libavformat/libavformat.a(tls_openssl.o): In function `url_bio_bread':
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:179: undefined reference to `BIO_clear_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:181: undefined reference to `BIO_set_flags'
libavformat/libavformat.a(tls_openssl.o): In function `url_bio_bwrite':
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:193: undefined reference to `BIO_clear_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:195: undefined reference to `BIO_set_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:193: undefined reference to `BIO_clear_flags'
/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c:195: undefined reference to `BIO_set_flags'
===
Also, openSSL is installed in /usr/include. The directory /usr/local/include/openssl is a softlink to /usr/include/openssl.
comment:6 by , 7 years ago
Edited the file "/local-directory-name/ffmpeg/latest_git_20180316/ffmpeg/libavformat/tls_openssl.c" to hard-code the path to openSSL headers:
===
#include </usr/include/openssl/bio.h>
#include </usr/include/openssl/ssl.h>
#include </usr/include/openssl/err.h>
===
The file bio.h usr/include/openssl/bio.h contains BIO_set_flags and BIO_clear_flags as well, as is excerpted unchanged below, directly from the file "bio.h":
===
void BIO_set_flags(BIO *b, int flags);
int BIO_test_flags(const BIO *b, int flags);
void BIO_clear_flags(BIO *b, int flags);
#define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
#define BIO_set_retry_special(b) \
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
#define BIO_set_retry_read(b) \
BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
#define BIO_set_retry_write(b) \
BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
/* These are normally used internally in BIOs */
#define BIO_clear_retry_flags(b) \
BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
#define BIO_get_retry_flags(b) \
BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
===
Are there other options and possibilities, in case this doesn't work? (Re-installing the entire operating system isn't an option.)
comment:7 by , 7 years ago
Update:
Hardcoding the openSSL header locations (see previous comment) had no effect.
Issue is still unresolved.
Seems to me like your build environment is somehow screwed up, and pulling in headers from OpenSSL 1.1, and then trying to link against 1.0.1?