[Libav-user] Issue trying to build FFmpeg for ARM with librtmp support

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Issue trying to build FFmpeg for ARM with librtmp support

black copper

Hi,

 

I am trying to compile librtmp so I can build FFmpeg with RTMP support for ARM processor.

 

I already have the toolchain, and solo build of FFmpeg was also successful, and testing from inside the ARM processor was success as well.

 

My understanding:

-          Ffmpeg

o   Librtmp

§  Openssl

§  zlib

This hierarchy is required to build FFmepg.

 

So far I have built  openssl for ARM, and zlib for ARM, and, I can see it is located in right ARM output folder.

 

Prerequisites:

 

export LD_LIBRARY_PATH=/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/lib/

export CCPREFIX="/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/bin/arm-unknown-linux-uclibcgnueabi-"

export CFLAGS="-I/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/include"

export LDFLAGS="-L/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/lib/"

 

1-      Steps to build zlib:

 

CC=arm-linux-gcc

 

./configure --prefix=/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr

Make

Make install

 

2-      Steps to build openssl:

 

export cross=arm-linux-

./Configure dist --prefix=/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr

make CC="${cross}gcc" AR="${cross}ar r" RANLIB="${cross}ranlib"

make install

 

 

3-      Steps to build librtmp:

 

make CROSS_COMPILE=arm-linux- INC=-I/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/include LIB=-L/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/lib

 

above 1,2 steps are successful, with 3rd, I get this:

 

make CROSS_COMPILE=arm-linux- INC=-I/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/include LIB=-L/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/lib

make[1]: Entering directory '/home/user/Downloads/ip_code/rtmpdump/librtmp'

arm-linux-gcc -shared -Wl,-soname,librtmp.so.1  -o librtmp.so.1 rtmp.o log.o amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz

/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/bin/../lib/gcc/arm-unknown-linux-uclibcgnueabi/4.4.0/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: cannot find -lssl

/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/bin/../lib/gcc/arm-unknown-linux-uclibcgnueabi/4.4.0/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: cannot find -lcrypto

/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/bin/../lib/gcc/arm-unknown-linux-uclibcgnueabi/4.4.0/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: cannot find -lz

collect2: ld returned 1 exit status

Makefile:92: recipe for target 'librtmp.so.1' failed

make[1]: *** [librtmp.so.1] Error 1

make[1]: Leaving directory '/home/user/Downloads/ip_code/rtmpdump/librtmp'

Makefile:76: recipe for target 'librtmp/librtmp.a' failed

make: *** [librtmp/librtmp.a] Error 2

 

 

but in the output folder I can see the right files are there:

 

 

 

[user@localhost rtmpdump]$ cd /opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/lib

[user@localhost lib]$ ls

bin                  libavcodec.a      libgmp.so.10.0.2  libz.so

certs                libavdevice.a     libiberty.a       libz.so.1

engines              libavfilter.a     libmpfr.la        libz.so.1.2.11

gcc                  libavformat.a     libmpfr.so        man

include              libavutil.a       libmpfr.so.4      misc

ldscripts            libcrypto.a       libmpfr.so.4.0.1  openssl.cnf

lib                  libfakeroot-0.so  libpostproc.a     pkgconfig

libaacplus.a         libfakeroot.la    libssl.a          private

libaacplus.la        libfakeroot.so    libswresample.a   share

libaacplus.so        libgmp.la         libswscale.a

libaacplus.so.2      libgmp.so         libx264.a

libaacplus.so.2.0.2  libgmp.so.10      libz.a

[user@localhost lib]$

 

Any idea how to compile?

 

Thanks


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Issue trying to build FFmpeg for ARM with librtmp support

Carl Eugen Hoyos-2
2017-09-27 9:01 GMT+02:00 black copper <[hidden email]>:

> 3-      Steps to build librtmp:
>
> make CROSS_COMPILE=arm-linux-
> INC=-I/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/include
> LIB=-L/opt/toolchain_gnueabi-4.4.0_ARMv5TE/usr/lib
>
> above 1,2 steps are successful, with 3rd, I get this:

It appears you have an issue cross-compiling librtmp,
maybe you should ask there?

Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Issue trying to build FFmpeg for ARM with librtmp support

black copper

It appears you have an issue cross-compiling librtmp,
maybe you should ask there?


Hi:

Yes, I have already asked same on librtmp mailing list + forum. Just thought maybe someone in this mailing list has already experienced, so could guide better.

Thanks
 

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user