[Libav-user] Can not load ffmpeg 3.4.1 under Android because link not found

Cooky cookyinformation at gmail.com
Wed Jan 31 23:46:29 EET 2018


Hello,

no success.
I think the problem are the links begin with "ff_...". See 
(libavcodecObjDump.txt)

-----Urspr√ľngliche Nachricht----- 
From: Carl Eugen Hoyos
Sent: Sunday, January 28, 2018 5:42 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice 
and libavfilter.
Subject: Re: [Libav-user] Can not load ffmpeg 3.4.1 under Android because 
link not found

2018-01-26 23:02 GMT+01:00 Cooky <cookyinformation at gmail.com>:

> NDK=/home/urs/Documents/android-ndk-r12b

Unrelated: Isn't this old?

> SYSROOT=$NDK/platforms/android-14/arch-arm/
> TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
> function build_one
> {
> ./configure \
>     --prefix=$PREFIX \
>     --enable-shared \
>     --disable-static \
>     --disable-doc \

>     --disable-ffmpeg \
>     --disable-ffplay \
>     --disable-ffprobe \
>     --disable-ffserver \

There is --disable-programs

>     --disable-avdevice \
>     --disable-doc \

>     --disable-symver \

This is unneeded once you fix target-os below

>     --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \

>     --target-os=linux \

Should be android

>     --arch=arm \

>     --enable-cross-compile \

Unneeded with --cross-prefix

>     --sysroot=$SYSROOT \

>     --extra-cflags="-Os -fpic $ADDI_CFLAGS" \

If this is needed, it is a bug that we would like to know of.
As-is, this makes your bug report invalid because we only
support flags for paths here, not other flags.

There is --enable-small and --cpu which you probably want.

>     --extra-ldflags="$ADDI_LDFLAGS" \
>     $ADDITIONAL_CONFIGURE_FLAG
> make clean
> make
> make install
> }
>
>
> CPU=armv7-a
> PREFIX=$(pwd)/android/$CPU
> ADDI_CFLAGS="-marm -march=$CPU"
> build_one
>
>
>
> with the same script i can also compile the version 3.4.1.
>
> The problem is, if i try to load the libs under Android with
>
> Java.Lang.JavaSystem.LoadLibrary("avutil-55");
> Java.Lang.JavaSystem.LoadLibrary("swresample-2");
> Java.Lang.JavaSystem.LoadLibrary("avcodec-57");
> ...
> avutil-55 and swresample-2 load fine, but avcodec-57 fails with the error
> message:
>
>
> Java.Lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol
> "ff_h264_mediacodec_hwaccel" referenced by
> "/data/app/App12.App12-1/lib/arm/libavcodec-57.so"...

My suspicion is that you forgot once to run "make distclean",
your configure line should not allow this symbol to be created.

Carl Eugen
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libavcodecObjDump.txt
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180131/8f4fb7c7/attachment.txt>


More information about the Libav-user mailing list