diff mbox

[FFmpeg-devel] Fix static linking openssl library

Message ID 20170610081310.3224-1-atopilski@gmail.com
State New
Headers show

Commit Message

Alexandr Topilski June 10, 2017, 8:13 a.m. UTC
From: topilski <atopilski@gmail.com>

---
 configure | 1 +
 1 file changed, 1 insertion(+)

Comments

Ricardo Constantino June 10, 2017, 11:38 a.m. UTC | #1
On 10 June 2017 at 09:13, <atopilski@gmail.com> wrote:

> From: topilski <atopilski@gmail.com>
>
> ---
>  configure | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configure b/configure
> index 4ec8f21..c92dd1f 100755
> --- a/configure
> +++ b/configure
> @@ -5942,6 +5942,7 @@ enabled omx               && { check_header
> OMX_Core.h || die "ERROR: OpenMAX IL
>  enabled openssl           && { use_pkg_config openssl openssl/ssl.h
> OPENSSL_init_ssl ||
>                                 use_pkg_config openssl openssl/ssl.h
> SSL_library_init ||
>                                 check_lib openssl openssl/ssl.h
> SSL_library_init -lssl -lcrypto ||
> +                               check_lib openssl openssl/ssl.h
> SSL_library_init -lssl -lcrypto -ldl ||
>

Why not just use the pkg-config with the proper --static flag?


>                                 check_lib openssl openssl/ssl.h
> SSL_library_init -lssl32 -leay32 ||
>                                 check_lib openssl openssl/ssl.h
> SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
>                                 die "ERROR: openssl not found"; }
> --
> 2.10.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Alexandr Topilski June 10, 2017, 12:51 p.m. UTC | #2
Hi, on my machine i have built openssl libraries in static mode only, after
that i want to build ffmpeg library with https protocol support and
configuration failed (undefined reference to 'dlopen') in check_lib openssl
because for linking needed dl library, if linked .so libraries first
check(check_lib
openssl openssl/ssl.h SSL_library_init -lssl -lcrypto) successful.
ldd output is:
ldd /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
    linux-vdso.so.1 =>  (0x00007fff82a6a000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6795038000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6794c70000)
    /lib64/ld-linux-x86-64.so.2 (0x0000562ba7b11000)

small description of issue: https://github.com/FFmpeg/FFmpeg/pull/261

On Sat, Jun 10, 2017 at 2:38 PM, Ricardo Constantino <wiiaboo@gmail.com>
wrote:

> On 10 June 2017 at 09:13, <atopilski@gmail.com> wrote:
>
> > From: topilski <atopilski@gmail.com>
> >
> > ---
> >  configure | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/configure b/configure
> > index 4ec8f21..c92dd1f 100755
> > --- a/configure
> > +++ b/configure
> > @@ -5942,6 +5942,7 @@ enabled omx               && { check_header
> > OMX_Core.h || die "ERROR: OpenMAX IL
> >  enabled openssl           && { use_pkg_config openssl openssl/ssl.h
> > OPENSSL_init_ssl ||
> >                                 use_pkg_config openssl openssl/ssl.h
> > SSL_library_init ||
> >                                 check_lib openssl openssl/ssl.h
> > SSL_library_init -lssl -lcrypto ||
> > +                               check_lib openssl openssl/ssl.h
> > SSL_library_init -lssl -lcrypto -ldl ||
> >
>
> Why not just use the pkg-config with the proper --static flag?
>
>
> >                                 check_lib openssl openssl/ssl.h
> > SSL_library_init -lssl32 -leay32 ||
> >                                 check_lib openssl openssl/ssl.h
> > SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
> >                                 die "ERROR: openssl not found"; }
> > --
> > 2.10.2
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Alexandr Topilski June 22, 2017, 5:14 a.m. UTC | #3
Hi, i also wait you replay in attach you can find config.log, this
reproduced only on raspbian os, i used clean system. On Armbian, Debian
builded with ssl support without issues.


BR, Alex

On Sat, Jun 10, 2017 at 3:51 PM, Alexandr Topilski <atopilski@gmail.com>
wrote:

> Hi, on my machine i have built openssl libraries in static mode only,
> after that i want to build ffmpeg library with https protocol support and
> configuration failed (undefined reference to 'dlopen') in check_lib
> openssl because for linking needed dl library, if linked .so libraries
> first check(check_lib openssl openssl/ssl.h SSL_library_init -lssl
> -lcrypto) successful.
> ldd output is:
> ldd /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
>     linux-vdso.so.1 =>  (0x00007fff82a6a000)
>     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6795038000)
>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6794c70000)
>     /lib64/ld-linux-x86-64.so.2 (0x0000562ba7b11000)
>
> small description of issue: https://github.com/FFmpeg/FFmpeg/pull/261
>
> On Sat, Jun 10, 2017 at 2:38 PM, Ricardo Constantino <wiiaboo@gmail.com>
> wrote:
>
>> On 10 June 2017 at 09:13, <atopilski@gmail.com> wrote:
>>
>> > From: topilski <atopilski@gmail.com>
>> >
>> > ---
>> >  configure | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/configure b/configure
>> > index 4ec8f21..c92dd1f 100755
>> > --- a/configure
>> > +++ b/configure
>> > @@ -5942,6 +5942,7 @@ enabled omx               && { check_header
>> > OMX_Core.h || die "ERROR: OpenMAX IL
>> >  enabled openssl           && { use_pkg_config openssl openssl/ssl.h
>> > OPENSSL_init_ssl ||
>> >                                 use_pkg_config openssl openssl/ssl.h
>> > SSL_library_init ||
>> >                                 check_lib openssl openssl/ssl.h
>> > SSL_library_init -lssl -lcrypto ||
>> > +                               check_lib openssl openssl/ssl.h
>> > SSL_library_init -lssl -lcrypto -ldl ||
>> >
>>
>> Why not just use the pkg-config with the proper --static flag?
>>
>>
>> >                                 check_lib openssl openssl/ssl.h
>> > SSL_library_init -lssl32 -leay32 ||
>> >                                 check_lib openssl openssl/ssl.h
>> > SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
>> >                                 die "ERROR: openssl not found"; }
>> > --
>> > 2.10.2
>> >
>> > _______________________________________________
>> > ffmpeg-devel mailing list
>> > ffmpeg-devel@ffmpeg.org
>> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> >
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
>
Moritz Barsnick June 22, 2017, 8:07 a.m. UTC | #4
(This really belongs to ffmpeg-user.)

On Thu, Jun 22, 2017 at 08:14:56 +0300, Alexandr Topilski wrote:

> use_pkg_config openssl openssl/ssl.h SSL_library_init
> 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 -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
> check_ld cc -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
> check_cc -I/usr/local/include -L/usr/local/lib
> BEGIN /tmp/ffconf.QjUh7os0.c
>     1   #include <openssl/ssl.h>
>     2   #include <stdint.h>
>     3   long check_SSL_library_init(void) { return (long) SSL_library_init; }
>     4   int main(void) { int ret = 0;
>     5    ret |= ((intptr_t)check_SSL_library_init) & 0xFFFF;
>     6   return ret; }
> END /tmp/ffconf.QjUh7os0.c
> gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=armv6 -std=c11
> +-fomit-frame-pointer -marm -pthread -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux
> +-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline -isystem/opt/vc/include/IL -I/usr/local/include -L/usr/local/lib -c -o
> +/tmp/ffconf.YcV8E8C1.o /tmp/ffconf.QjUh7os0.c
> gcc -march=armv6 -Wl,--as-needed -Wl,-z,noexecstack -I/usr/local/include -L/usr/local/lib -o /tmp/ffconf.iIiIBDDZ /tmp/ffconf.YcV8E8C1.o
> +-lssl -lcrypto -L/opt/vc/lib/ -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lm -lbz2 -lz -pthread
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
> dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x20): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x2c): undefined reference to `dlclose'
> /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> dso_dlfcn.c:(.text+0x318): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x3bc): undefined reference to `dlerror'

If the static libcrypto.a requires "-dl", its pkg-config file should
say so, i.e.
$ pkg-config --static --libs openssl
should include "-dl". If not, I believe it's wrong (for your particular
library).

Moritz
Alexandr Topilski June 23, 2017, 7:19 a.m. UTC | #5
Hi, thank you for replay but output of pkg-config --static --libs openssl
is next:

-L/usr/local/lib -lssl -ldl -lcrypto -ldl

BR, Alex

On Thu, Jun 22, 2017 at 11:07 AM, Moritz Barsnick <barsnick@gmx.net> wrote:

> (This really belongs to ffmpeg-user.)
>
> On Thu, Jun 22, 2017 at 08:14:56 +0300, Alexandr Topilski wrote:
>
> > use_pkg_config openssl openssl/ssl.h SSL_library_init
> > 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 -I/usr/local/include
> -L/usr/local/lib -lssl -lcrypto
> > check_ld cc -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
> > check_cc -I/usr/local/include -L/usr/local/lib
> > BEGIN /tmp/ffconf.QjUh7os0.c
> >     1   #include <openssl/ssl.h>
> >     2   #include <stdint.h>
> >     3   long check_SSL_library_init(void) { return (long)
> SSL_library_init; }
> >     4   int main(void) { int ret = 0;
> >     5    ret |= ((intptr_t)check_SSL_library_init) & 0xFFFF;
> >     6   return ret; }
> > END /tmp/ffconf.QjUh7os0.c
> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=armv6 -std=c11
> > +-fomit-frame-pointer -marm -pthread -isystem/opt/vc/include/
> -isystem/opt/vc/include/interface/vmcs_host/linux
> > +-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline
> -isystem/opt/vc/include/IL -I/usr/local/include -L/usr/local/lib -c -o
> > +/tmp/ffconf.YcV8E8C1.o /tmp/ffconf.QjUh7os0.c
> > gcc -march=armv6 -Wl,--as-needed -Wl,-z,noexecstack -I/usr/local/include
> -L/usr/local/lib -o /tmp/ffconf.iIiIBDDZ /tmp/ffconf.YcV8E8C1.o
> > +-lssl -lcrypto -L/opt/vc/lib/ -lmmal_core -lmmal_util -lmmal_vc_client
> -lbcm_host -lm -lbz2 -lz -pthread
> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
> `dlfcn_globallookup':
> > dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
> > dso_dlfcn.c:(.text+0x20): undefined reference to `dlsym'
> > dso_dlfcn.c:(.text+0x2c): undefined reference to `dlclose'
> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> > dso_dlfcn.c:(.text+0x318): undefined reference to `dlsym'
> > dso_dlfcn.c:(.text+0x3bc): undefined reference to `dlerror'
>
> If the static libcrypto.a requires "-dl", its pkg-config file should
> say so, i.e.
> $ pkg-config --static --libs openssl
> should include "-dl". If not, I believe it's wrong (for your particular
> library).
>
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Alexandr Topilski June 23, 2017, 7:20 a.m. UTC | #6
Also i built openssl without any flags, simple execute: ./config && make &&
make install

On Fri, Jun 23, 2017 at 10:19 AM, Alexandr Topilski <atopilski@gmail.com>
wrote:

> Hi, thank you for replay but output of pkg-config --static --libs openssl
> is next:
>
> -L/usr/local/lib -lssl -ldl -lcrypto -ldl
>
> BR, Alex
>
> On Thu, Jun 22, 2017 at 11:07 AM, Moritz Barsnick <barsnick@gmx.net>
> wrote:
>
>> (This really belongs to ffmpeg-user.)
>>
>> On Thu, Jun 22, 2017 at 08:14:56 +0300, Alexandr Topilski wrote:
>>
>> > use_pkg_config openssl openssl/ssl.h SSL_library_init
>> > 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 -I/usr/local/include
>> -L/usr/local/lib -lssl -lcrypto
>> > check_ld cc -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
>> > check_cc -I/usr/local/include -L/usr/local/lib
>> > BEGIN /tmp/ffconf.QjUh7os0.c
>> >     1   #include <openssl/ssl.h>
>> >     2   #include <stdint.h>
>> >     3   long check_SSL_library_init(void) { return (long)
>> SSL_library_init; }
>> >     4   int main(void) { int ret = 0;
>> >     5    ret |= ((intptr_t)check_SSL_library_init) & 0xFFFF;
>> >     6   return ret; }
>> > END /tmp/ffconf.QjUh7os0.c
>> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>> -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=armv6 -std=c11
>> > +-fomit-frame-pointer -marm -pthread -isystem/opt/vc/include/
>> -isystem/opt/vc/include/interface/vmcs_host/linux
>> > +-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline
>> -isystem/opt/vc/include/IL -I/usr/local/include -L/usr/local/lib -c -o
>> > +/tmp/ffconf.YcV8E8C1.o /tmp/ffconf.QjUh7os0.c
>> > gcc -march=armv6 -Wl,--as-needed -Wl,-z,noexecstack
>> -I/usr/local/include -L/usr/local/lib -o /tmp/ffconf.iIiIBDDZ
>> /tmp/ffconf.YcV8E8C1.o
>> > +-lssl -lcrypto -L/opt/vc/lib/ -lmmal_core -lmmal_util -lmmal_vc_client
>> -lbcm_host -lm -lbz2 -lz -pthread
>> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
>> `dlfcn_globallookup':
>> > dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
>> > dso_dlfcn.c:(.text+0x20): undefined reference to `dlsym'
>> > dso_dlfcn.c:(.text+0x2c): undefined reference to `dlclose'
>> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
>> > dso_dlfcn.c:(.text+0x318): undefined reference to `dlsym'
>> > dso_dlfcn.c:(.text+0x3bc): undefined reference to `dlerror'
>>
>> If the static libcrypto.a requires "-dl", its pkg-config file should
>> say so, i.e.
>> $ pkg-config --static --libs openssl
>> should include "-dl". If not, I believe it's wrong (for your particular
>> library).
>>
>> Moritz
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
>
Alexandr Topilski June 23, 2017, 7:26 a.m. UTC | #7
Hi, thank you for reply but output of pkg-config --static --libs openssl is
next:
$ -L/usr/local/lib -lssl -ldl -lcrypto -ldl

Also i built openssl without any flags, simple execute: ./config &&
make && make install


On Thu, Jun 22, 2017 at 11:07 AM, Moritz Barsnick <barsnick@gmx.net> wrote:

> (This really belongs to ffmpeg-user.)
>
> On Thu, Jun 22, 2017 at 08:14:56 +0300, Alexandr Topilski wrote:
>
> > use_pkg_config openssl openssl/ssl.h SSL_library_init
> > 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 -I/usr/local/include
> -L/usr/local/lib -lssl -lcrypto
> > check_ld cc -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
> > check_cc -I/usr/local/include -L/usr/local/lib
> > BEGIN /tmp/ffconf.QjUh7os0.c
> >     1   #include <openssl/ssl.h>
> >     2   #include <stdint.h>
> >     3   long check_SSL_library_init(void) { return (long)
> SSL_library_init; }
> >     4   int main(void) { int ret = 0;
> >     5    ret |= ((intptr_t)check_SSL_library_init) & 0xFFFF;
> >     6   return ret; }
> > END /tmp/ffconf.QjUh7os0.c
> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=armv6 -std=c11
> > +-fomit-frame-pointer -marm -pthread -isystem/opt/vc/include/
> -isystem/opt/vc/include/interface/vmcs_host/linux
> > +-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline
> -isystem/opt/vc/include/IL -I/usr/local/include -L/usr/local/lib -c -o
> > +/tmp/ffconf.YcV8E8C1.o /tmp/ffconf.QjUh7os0.c
> > gcc -march=armv6 -Wl,--as-needed -Wl,-z,noexecstack -I/usr/local/include
> -L/usr/local/lib -o /tmp/ffconf.iIiIBDDZ /tmp/ffconf.YcV8E8C1.o
> > +-lssl -lcrypto -L/opt/vc/lib/ -lmmal_core -lmmal_util -lmmal_vc_client
> -lbcm_host -lm -lbz2 -lz -pthread
> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
> `dlfcn_globallookup':
> > dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
> > dso_dlfcn.c:(.text+0x20): undefined reference to `dlsym'
> > dso_dlfcn.c:(.text+0x2c): undefined reference to `dlclose'
> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> > dso_dlfcn.c:(.text+0x318): undefined reference to `dlsym'
> > dso_dlfcn.c:(.text+0x3bc): undefined reference to `dlerror'
>
> If the static libcrypto.a requires "-dl", its pkg-config file should
> say so, i.e.
> $ pkg-config --static --libs openssl
> should include "-dl". If not, I believe it's wrong (for your particular
> library).
>
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Alexandr Topilski July 6, 2017, 12:25 p.m. UTC | #8
Ping

On Fri, Jun 23, 2017 at 10:26 AM, Alexandr Topilski <atopilski@gmail.com>
wrote:

> Hi, thank you for reply but output of pkg-config --static --libs openssl
> is next:
> $ -L/usr/local/lib -lssl -ldl -lcrypto -ldl
>
> Also i built openssl without any flags, simple execute: ./config && make && make install
>
>
> On Thu, Jun 22, 2017 at 11:07 AM, Moritz Barsnick <barsnick@gmx.net>
> wrote:
>
>> (This really belongs to ffmpeg-user.)
>>
>> On Thu, Jun 22, 2017 at 08:14:56 +0300, Alexandr Topilski wrote:
>>
>> > use_pkg_config openssl openssl/ssl.h SSL_library_init
>> > 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 -I/usr/local/include
>> -L/usr/local/lib -lssl -lcrypto
>> > check_ld cc -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
>> > check_cc -I/usr/local/include -L/usr/local/lib
>> > BEGIN /tmp/ffconf.QjUh7os0.c
>> >     1   #include <openssl/ssl.h>
>> >     2   #include <stdint.h>
>> >     3   long check_SSL_library_init(void) { return (long)
>> SSL_library_init; }
>> >     4   int main(void) { int ret = 0;
>> >     5    ret |= ((intptr_t)check_SSL_library_init) & 0xFFFF;
>> >     6   return ret; }
>> > END /tmp/ffconf.QjUh7os0.c
>> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>> -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=armv6 -std=c11
>> > +-fomit-frame-pointer -marm -pthread -isystem/opt/vc/include/
>> -isystem/opt/vc/include/interface/vmcs_host/linux
>> > +-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline
>> -isystem/opt/vc/include/IL -I/usr/local/include -L/usr/local/lib -c -o
>> > +/tmp/ffconf.YcV8E8C1.o /tmp/ffconf.QjUh7os0.c
>> > gcc -march=armv6 -Wl,--as-needed -Wl,-z,noexecstack
>> -I/usr/local/include -L/usr/local/lib -o /tmp/ffconf.iIiIBDDZ
>> /tmp/ffconf.YcV8E8C1.o
>> > +-lssl -lcrypto -L/opt/vc/lib/ -lmmal_core -lmmal_util -lmmal_vc_client
>> -lbcm_host -lm -lbz2 -lz -pthread
>> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
>> `dlfcn_globallookup':
>> > dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
>> > dso_dlfcn.c:(.text+0x20): undefined reference to `dlsym'
>> > dso_dlfcn.c:(.text+0x2c): undefined reference to `dlclose'
>> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
>> > dso_dlfcn.c:(.text+0x318): undefined reference to `dlsym'
>> > dso_dlfcn.c:(.text+0x3bc): undefined reference to `dlerror'
>>
>> If the static libcrypto.a requires "-dl", its pkg-config file should
>> say so, i.e.
>> $ pkg-config --static --libs openssl
>> should include "-dl". If not, I believe it's wrong (for your particular
>> library).
>>
>> Moritz
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
>
Alexandr Topilski July 27, 2017, 1:51 p.m. UTC | #9
That's all what puppies can do, good work, please close issue! I will patch
build by hands for raspberry.

On Thu, Jul 6, 2017 at 3:25 PM, Alexandr Topilski <atopilski@gmail.com>
wrote:

> Ping
>
> On Fri, Jun 23, 2017 at 10:26 AM, Alexandr Topilski <atopilski@gmail.com>
> wrote:
>
>> Hi, thank you for reply but output of pkg-config --static --libs openssl
>> is next:
>> $ -L/usr/local/lib -lssl -ldl -lcrypto -ldl
>>
>> Also i built openssl without any flags, simple execute: ./config && make && make install
>>
>>
>> On Thu, Jun 22, 2017 at 11:07 AM, Moritz Barsnick <barsnick@gmx.net>
>> wrote:
>>
>>> (This really belongs to ffmpeg-user.)
>>>
>>> On Thu, Jun 22, 2017 at 08:14:56 +0300, Alexandr Topilski wrote:
>>>
>>> > use_pkg_config openssl openssl/ssl.h SSL_library_init
>>> > 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 -I/usr/local/include
>>> -L/usr/local/lib -lssl -lcrypto
>>> > check_ld cc -I/usr/local/include -L/usr/local/lib -lssl -lcrypto
>>> > check_cc -I/usr/local/include -L/usr/local/lib
>>> > BEGIN /tmp/ffconf.QjUh7os0.c
>>> >     1   #include <openssl/ssl.h>
>>> >     2   #include <stdint.h>
>>> >     3   long check_SSL_library_init(void) { return (long)
>>> SSL_library_init; }
>>> >     4   int main(void) { int ret = 0;
>>> >     5    ret |= ((intptr_t)check_SSL_library_init) & 0xFFFF;
>>> >     6   return ret; }
>>> > END /tmp/ffconf.QjUh7os0.c
>>> > gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>>> -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=armv6 -std=c11
>>> > +-fomit-frame-pointer -marm -pthread -isystem/opt/vc/include/
>>> -isystem/opt/vc/include/interface/vmcs_host/linux
>>> > +-isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline
>>> -isystem/opt/vc/include/IL -I/usr/local/include -L/usr/local/lib -c -o
>>> > +/tmp/ffconf.YcV8E8C1.o /tmp/ffconf.QjUh7os0.c
>>> > gcc -march=armv6 -Wl,--as-needed -Wl,-z,noexecstack
>>> -I/usr/local/include -L/usr/local/lib -o /tmp/ffconf.iIiIBDDZ
>>> /tmp/ffconf.YcV8E8C1.o
>>> > +-lssl -lcrypto -L/opt/vc/lib/ -lmmal_core -lmmal_util
>>> -lmmal_vc_client -lbcm_host -lm -lbz2 -lz -pthread
>>> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
>>> `dlfcn_globallookup':
>>> > dso_dlfcn.c:(.text+0x10): undefined reference to `dlopen'
>>> > dso_dlfcn.c:(.text+0x20): undefined reference to `dlsym'
>>> > dso_dlfcn.c:(.text+0x2c): undefined reference to `dlclose'
>>> > /usr/local/lib/libcrypto.a(dso_dlfcn.o): In function
>>> `dlfcn_bind_func':
>>> > dso_dlfcn.c:(.text+0x318): undefined reference to `dlsym'
>>> > dso_dlfcn.c:(.text+0x3bc): undefined reference to `dlerror'
>>>
>>> If the static libcrypto.a requires "-dl", its pkg-config file should
>>> say so, i.e.
>>> $ pkg-config --static --libs openssl
>>> should include "-dl". If not, I believe it's wrong (for your particular
>>> library).
>>>
>>> Moritz
>>> _______________________________________________
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel@ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>>
>>
>>
>
diff mbox

Patch

diff --git a/configure b/configure
index 4ec8f21..c92dd1f 100755
--- a/configure
+++ b/configure
@@ -5942,6 +5942,7 @@  enabled omx               && { check_header OMX_Core.h || die "ERROR: OpenMAX IL
 enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
                                use_pkg_config openssl openssl/ssl.h SSL_library_init ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
+                               check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -ldl ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
                                die "ERROR: openssl not found"; }