Android NDK r18b support

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

Android NDK r18b support

Taner Sener
Hello,

I’m trying to compile git master with Android NDK r18b but having the
following errors. The same method works on the older NDK releases, so it
looks like something has changed in the new NDK r18b. Do you have any ideas
how to resolve it? Also I don’t need v4l2 actually, disabling the
compilation of libavdevice/v4l2.c will also help me but I guess it is not
possible.

I'm using the following steps to cross-compile ffmpeg:



cd $ANDROID_NDK_ROOT/build/tools

./make_standalone_toolchain.py --arch arm --api 21 --stl libc++
--install-dir $ANDROID_NDK_ROOT/toolchains/test-arm

./configure
--cross-prefix=$ANDROID_NDK_ROOT/toolchains/test-arm/bin/arm-linux-androideabi-
--sysroot=$ANDROID_NDK_ROOT/toolchains/test-arm/sysroot --arch=arm
--target-os=android

make

---------------------------------------------

...

libavdevice/v4l2.c:135:9: error: assigning to 'int (*)(int, unsigned long,
...)' from incompatible type

      '<overloaded function type>'

        SET_WRAPPERS();

        ^~~~~~~~~~~~~~

libavdevice/v4l2.c:121:17: note: expanded from macro 'SET_WRAPPERS'

    s->ioctl_f  = prefix ## ioctl;      \

                ^           ~~~~~

/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/test-arm/sysroot/usr/include/bits/ioctl.h:56:5:
note: candidate function

      has type mismatch at 2nd parameter (expected 'unsigned long' but has
'unsigned int')

int ioctl(int __fd, unsigned __request, ...) __overloadable __enable_if(1,
"") __RENAME(ioctl);

    ^

/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/test-arm/sysroot/usr/include/bits/ioctl.h:36:5:
note: candidate function

      has type mismatch at 2nd parameter (expected 'unsigned long' but has
'int')

int ioctl(int __fd, int __request, ...);

    ^

1 error generated.

make: *** [libavdevice/v4l2.o] Error 1



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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Davood Falahati-2
>
>
> > I'm using the following steps to cross-compile ffmpeg
>
Follow this:
https://github.com/falahati1987/ffmpeg4Android

Hope it would help


- Davood Falahati

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Carl Eugen Hoyos-2
In reply to this post by Taner Sener
2018-12-06 22:38 GMT+01:00, Taner Sener <[hidden email]>:

> Hello,
>
> I’m trying to compile git master with Android NDK r18b but having the
> following errors. The same method works on the older NDK releases, so it
> looks like something has changed in the new NDK r18b. Do you have any ideas
> how to resolve it? Also I don’t need v4l2 actually, disabling the
> compilation of libavdevice/v4l2.c will also help me but I guess it is not
> possible.
>
> I'm using the following steps to cross-compile ffmpeg:
>
>
>
> cd $ANDROID_NDK_ROOT/build/tools
>
> ./make_standalone_toolchain.py --arch arm --api 21 --stl libc++
> --install-dir $ANDROID_NDK_ROOT/toolchains/test-arm
>
> ./configure
> --cross-prefix=$ANDROID_NDK_ROOT/toolchains/test-arm/bin/arm-linux-androideabi-
> --sysroot=$ANDROID_NDK_ROOT/toolchains/test-arm/sysroot --arch=arm
> --target-os=android

Work-around is to add: --disable-indev=v4l2

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Carl Eugen Hoyos-2
In reply to this post by Davood Falahati-2
2018-12-06 22:52 GMT+01:00, Davood Falahati <[hidden email]>:
>>
>>
>> > I'm using the following steps to cross-compile ffmpeg
>>
> Follow this:
> https://github.com/falahati1987/ffmpeg4Android

> --extra-cflags="-DANDROID -fPIC
> -I$HOME/work/FFMPEG/ffmpeg-build/armeabi-v7a/include
> -ffunction-sections -funwind-tables -fstack-protector -march=arm
> -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer
> -fstrict-aliasing -funswitch-loops -finline-limit=300" \
>  --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib
> -L$HOME/work/FFMPEG/ffmpeg-build/armeabi-v7a/lib -lx264
> -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog " \

Are any of those useful?
If yes, why shouldn't we add them to our configure script?

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Taner Sener
In reply to this post by Carl Eugen Hoyos-2
> Work-around is to add: --disable-indev=v4l2

Thanks Carl, this flag saved my day.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Carl Eugen Hoyos-2
2018-12-06 23:43 GMT+01:00, Taner Sener <[hidden email]>:
>> Work-around is to add: --disable-indev=v4l2
>
> Thanks Carl, this flag saved my day.

Patch (ugly) sent:
http://ffmpeg.org/pipermail/ffmpeg-devel/2018-December/237289.html

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

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Carl Eugen Hoyos-2
In reply to this post by Taner Sener
2018-12-06 22:38 GMT+01:00, Taner Sener <[hidden email]>:

> I’m trying to compile git master with Android NDK r18b but having the
> following errors. The same method works on the older NDK releases,
> so it looks like something has changed in the new NDK r18b. Do you
> have any ideas how to resolve it?

v4l2 compilation error should be fixed in current FFmpeg git head.

Thank you for the report, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Android NDK r18b support

Taner Sener
> v4l2 compilation error should be fixed in current FFmpeg git head.
>
> Thank you for the report, Carl Eugen

You're welcome. Thank you for the fix too.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".