Arm-linux-gnueabihf cross compiler ffmpeg

Recommended for you: Get network issues from WhatsUp Gold. Not end users.
Taobao bought a support Android and Ubuntu board to research development, burning software from the download, burn the image file, SSH to the server configuration, toss about, and compile ffmpeg, let ffmpeg run on the target board, met a lot of problems, tossing a day finally done, issue record encounter .


Cross compiler tool download :
https://launchpad.net/linaro-toolchain-binaries/+download
Which I download is :
gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.xz (md5, sig) arm-linux-gnueabihf crosscompiler for Linux

In the CentOS 64 environment cross compiler ffmpeg

./configure --sysroot=/home/arm_linux/arm-linux-gnueabihf/libc --enable-cross-compile --arch=arm --target-os=linux --cross-prefix=/home/arm_linux/bin/arm-linux-gnueabihf-

Suggest the following error:

arm-linux-gnueabihf/arm-linux-gnueabihf/bin/gcc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
C compiler test failed.

The above execution error
[root@localhost ffmpeg-1.1.3]# yum install ld-linux.so.2
After the settlement.

And then continue to configure, they encountered the following error :

[root@localhost ffmpeg-1.1.3]# /usr/routing/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc test.c
/usr/routing/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
This error later in the 32 bit systems to solve.


Compiled after the completion of execution on the target machine, error :


root@cubieboard2:/home/linaro# ldd ffmpeg
./ffmpeg: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17' not found (required by ./ffmpeg)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6ee2000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6ec6000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6de2000)
        /lib/ld-linux-armhf.so.3 (0xb6f58000)

This is because the version and the target machine cross compiler tool glibc library on the glibc version of the library is inconsistent,
The solution is a static link library glibc, execute the following command to generate the Mkaefile file.
./configure --sysroot=/home/arm_linux/arm-linux-gnueabihf/libc --enable-cross-compile --arch=arm --target-os=linux --cross-prefix=/home/arm_linux/bin/arm-linux-gnueabihf- --extra-libs=/home/arm_linux/arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabihf/libc.a
make
Down on the target machine to see the normal :

root@cubieboard2:/home/linaro# ldd ffmpeg
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6ec6000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6ea3000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6e88000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6da4000)
        /lib/ld-linux-armhf.so.3 (0xb6f3c000)

But when running problems :
root@cubieboard2:/home/linaro# ./ffmpeg
unexpected reloc type in static binaryAborted
It seems the static link library libc is not a method. . .

There is a move, is directly from the target machine to libc.so.6 and librt.so.1 two database replication to cross compile machine, covering the source file, and then re compile.

Implementation of ffmpeg, can now be carried out, but a loss, a decoding failure situations, PC no problem:
[h264 @ 0x15b80a0] RTP: missed 28 packets
[h264 @ 0x15b80a0] RTP: missed 5 packets
[h264 @ 0x15b80a0] error while decoding MB 75 37, bytestream (-10)
[h264 @ 0x15b80a0] concealing 614 DC, 614 AC, 614 MV errors in P frame
RTP: missed 3 packets=17.1 size=    1062kB time=00:00:41.48 bitrate= 209.7kbits/s dup=0 drop=5    
[h264 @ 0x15b80a0] RTP: missed 6 packets
[h264 @ 0x15b80a0] RTP: missed 3 packets
    Last message repeated 1 times
[h264 @ 0x15b80a0] RTP: missed 6 packets
[h264 @ 0x15b80a0] RTP: missed 3 packets
[h264 @ 0x15b80a0] RTP: missed 6 packets
[h264 @ 0x15b80a0] RTP: missed 3 packets
[h264 @ 0x15b80a0] RTP: missed 6 packets
RTP: missed 28 packets17.1 size=    1062kB time=00:00:41.48 bitrate= 209.7kbits/s dup=0 drop=5    
[h264 @ 0x15b80a0] error while decoding MB 61 34, bytestream (-5)
[h264 @ 0x15b80a0] concealing 868 DC, 868 AC, 868 MV errors in P frame
[h264 @ 0x15b80a0] RTP: missed 25 packets
[h264 @ 0x15b80a0] error while decoding MB 40 34, bytestream (-7)
[h264 @ 0x15b80a0] concealing 889 DC, 889 AC, 889 MV errors in P frame
[h264 @ 0x15b80a0] RTP: missed 49 packets
[h264 @ 0x15b80a0] error while decoding MB 9 20, bytestream (-20)





Do embedded development in general is cheating. . . .
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Brenda at December 09, 2013 - 1:31 AM