Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build Android aar with LTS #99

Closed
laisuki1109 opened this issue Jul 16, 2021 · 7 comments
Closed

Unable to build Android aar with LTS #99

laisuki1109 opened this issue Jul 16, 2021 · 7 comments
Assignees
Labels
android Affect Android platform no-issue-activity question Further information is requested scripts Affect build scripts v4.4 Affects v4.4 release

Comments

@laisuki1109
Copy link

Description

After export the environment to run the android.sh. It can build the all platform on API level 24.
With This command
./android.sh --enable-fontconfig --enable-libxml2 --enable-x264 --enable-x265 --enable-gpl
Then cause I wanted to build the aar for LTS so I run this command
./android.sh --enable-fontconfig --enable-libxml2 --enable-x264 --enable-x265 --enable-gpl --lts
but it show this

Building arm-v7a platform on API level 16

libiconv: ok
libxml2: ok
x264: ok
x265: ok
libpng: ok
libuuid: ok
expat: ok
cpu-features: ok
freetype: ok
fontconfig: failed

See build.log for details

Expected behavior
build aar file

Current behavior
fail to build

To Reproduce
./android.sh --enable-fontconfig --enable-libxml2 --enable-x264 --enable-x265 --enable-gpl --lts

Screenshots
If applicable, add screenshots to help explain your problem.

Logs

fcformat.c:769:38: warning: expression which evaluates to zero treated as a null pointer constant of type 'FcChar8 *' (aka 'unsigned char *') [-Wnon-literal-null-conversion]
            FcNameUnparseValueList (buf, l, '\0');
                                            ^~~~
fcfreetype.c:1369:11: warning: address of array 'os2->achVendID' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (os2->achVendID && os2->achVendID[0] != 0)
            ~~~~~^~~~~~~~~ ~~
  CC       fclist.lo
  CC       fcmatch.lo
  CC       fcmatrix.lo
  CC       fcname.lo
2 warnings generated.
  CC       fcobjs.lo
  CC       fcopentype.lo
1 warning generated.
  CC       fcpat.lo
  CC       fcrange.lo
  CC       fcserialize.lo
  CC       fcstat.lo
  CC       fcstr.lo
  CC       fcweight.lo
  CC       fcxml.lo
  CC       ftglue.lo
  CCLD     fcarch
  CCLD     libfontconfig.la
Making all in fc-cache
  CC       fc-cache.o
  CCLD     fc-cache
ld: error: undefined symbol: posix_fadvise
>>> referenced by fccache.c
>>>               fccache.o:(FcDirCacheMapFd) in archive ../src/.libs/libfontconfig.a
>>> referenced by fccache.c
>>>               fccache.o:(FcDirCacheMapFd) in archive ../src/.libs/libfontconfig.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [fc-cache] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Environment

  • Platform: Android
  • Architecture: arm-v7a, arm-v7a-neon, arm64-v8a, x86, x86_64
  • Version v4.4
  • Cocoapods version (if applicable) [e.g. 1.9.1]
  • Android Studio version 4.1
  • Android NDK version 22.0

Other
Add any other context about the problem here.

@laisuki1109
Copy link
Author

I have set the Android NDK to v22.1.7171670

@laisuki1109
Copy link
Author

Here is the full log build.log

@laisuki1109 laisuki1109 changed the title Unable to build Android aar withLTS Unable to build Android aar withLTS #android Jul 16, 2021
@laisuki1109 laisuki1109 changed the title Unable to build Android aar withLTS #android Unable to build Android aar with LTS Jul 16, 2021
@laisuki1109
Copy link
Author

Additionally, I wanna ask is there have any reference for me to know which lib i should enable for compress video ? Thank you!

@tanersener
Copy link
Collaborator

A similar error was reported before. But I couldn't reproduce it. See #85

@tanersener tanersener added android Affect Android platform question Further information is requested scripts Affect build scripts v4.4 Affects v4.4 release labels Jul 16, 2021
@laisuki1109
Copy link
Author

@tanersener
I want to confirm that is import AAR and implementation 'com.arthenica:ffmpeg-kit-video:4.4' are al required action or, I just need to implement either one will be ok?

@tanersener
Copy link
Collaborator

You need only one of them to use ffmpeg-kit. However, if you import AAR you also need to manually add smart-exception dependency. ffmpeg-kit depends on smart-exception. See https://github.com/tanersener/ffmpeg-kit/blob/main/android/ffmpeg-kit-android-lib/build.gradle#L44.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Affect Android platform no-issue-activity question Further information is requested scripts Affect build scripts v4.4 Affects v4.4 release
Projects
None yet
Development

No branches or pull requests

2 participants