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

Can not build package an lib for changing src? #2

Closed
chihung93 opened this issue Jan 12, 2021 · 4 comments
Closed

Can not build package an lib for changing src? #2

chihung93 opened this issue Jan 12, 2021 · 4 comments

Comments

@chihung93
Copy link

Hello, good morning @Aghajari
I can not build your lib to AAR.
Please help me to build it to modify some code and improve.

I run this gradle script:

install {
    repositories.mavenInstaller {
        pom.project {
            packaging 'aar'
            groupId artifact.groupId
            artifactId artifact.id
            version artifact.version
            name artifact.id // pom.project.name must be same as bintray.pkg.name
            url artifact.siteUrl
            inceptionYear '2020' // HARDCODED
            licenses {
                license { // HARDCODED
                    name 'The Apache Software License, Version 2.0'
                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    distribution 'repo'
                }
            }
            scm {
                connection artifact.gitUrl
                developerConnection artifact.gitUrl
                url artifact.siteUrl
            }
        }
    }
}

My Error:

/Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:26: error: undefined reference to 'pixman_composite_over_n_8888_asm_neon'



Execution failed for task ':AXrLottie:externalNativeBuildRelease'.
> Build command failed.
  Error while executing process /Users/henry/Library/Android/sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /Users/henry/Downloads/AXrLottie-master/AXrLottie/.cxx/cmake/release/armeabi-v7a jlottie jlz4 rlottie rlottie-image-loader rlottie2gif}
  ninja: Entering directory `/Users/henry/Downloads/AXrLottie-master/AXrLottie/.cxx/cmake/release/armeabi-v7a'
  [1/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper_sse2.cpp.o
  [2/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_math.cpp.o
  [3/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_raster.cpp.o
  [4/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_stroker.cpp.o
  [5/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdebug.cpp.o
  [6/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vrect.cpp.o
  [7/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper_neon.cpp.o
  [8/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper_common.cpp.o
  [9/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vbrush.cpp.o
  [10/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vpathmesure.cpp.o
  [11/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vpainter.cpp.o
  [12/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vbitmap.cpp.o
  [13/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/velapsedtimer.cpp.o
  [14/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vmatrix.cpp.o
  [15/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdasher.cpp.o
  [16/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieproxymodel.cpp.o
  [17/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vinterpolator.cpp.o
  [18/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/varenaalloc.cpp.o
  [19/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vpath.cpp.o
  [20/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vrle.cpp.o
  [21/41] Building CXX object CMakeFiles/rlottie2gif.dir/gif/gif.cpp.o
  [22/41] Linking CXX shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie2gif.so
  [23/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vbezier.cpp.o
  [24/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vimageloader.cpp.o
  [25/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper.cpp.o
  [26/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawable.cpp.o
  [27/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottiekeypath.cpp.o
  [28/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vraster.cpp.o
  [29/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieitem_capi.cpp.o
  [30/41] Building CXX object CMakeFiles/jlottie.dir/lottie.cpp.o
  In file included from /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:14:
  In file included from /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/gif/gif.h:63:
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/gif/../lottie.h:8:1: warning: typedef requires a name [-Wmissing-declarations]
  typedef struct LottieWrapper{
  ^~~~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/gif/../lottie.h:13:1: warning: typedef requires a name [-Wmissing-declarations]
  typedef struct LottieInfo{
  ^~~~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:116:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:116:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:169:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:169:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:244:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || bitmap == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:244:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || bitmap == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:322:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:322:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:330:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:330:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:346:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:346:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:354:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:354:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:369:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:369:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:381:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:381:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:393:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:393:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:405:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:405:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:417:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:417:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:429:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:429:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:441:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:441:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:453:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:453:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:465:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:465:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:477:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL || layer == nullptr) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:477:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL || layer == nullptr) {
              ~~ ^~~~
                 0
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:493:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
      if (ptr == NULL) {
          ~~~ ^  ~~~~
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:493:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
      if (ptr == NULL) {
              ~~ ^~~~
                 0
  38 warnings generated.
  [31/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieloader.cpp.o
  [32/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottiemodel.cpp.o
  [33/41] Building CXX object src/vector/stb/CMakeFiles/rlottie-image-loader.dir/stb_image.cpp.o
  [34/41] Linking CXX shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie-image-loader.so
  [35/41] Building C object CMakeFiles/jlz4.dir/lz4/lz4.c.o
  [36/41] Linking C shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/libjlz4.so
  [37/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieanimation.cpp.o
  [38/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieitem.cpp.o
  [39/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieparser.cpp.o
  [40/41] Linking CXX shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie.so
  FAILED: /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie.so 
  : && /Users/henry/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi16 --gcc-toolchain=/Users/henry/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/henry/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -std=c++14 -Oz -DNDEBUG  -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,librlottie.so -o /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie.so CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_math.cpp.o CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_raster.cpp.o CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_stroker.cpp.o CMakeFiles/rlottie.dir/src/vector/vrect.cpp.o CMakeFiles/rlottie.dir/src/vector/vdasher.cpp.o CMakeFiles/rlottie.dir/src/vector/vbrush.cpp.o CMakeFiles/rlottie.dir/src/vector/vbitmap.cpp.o CMakeFiles/rlottie.dir/src/vector/vpainter.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_common.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_sse2.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_neon.cpp.o CMakeFiles/rlottie.dir/src/vector/vrle.cpp.o CMakeFiles/rlottie.dir/src/vector/vpath.cpp.o CMakeFiles/rlottie.dir/src/vector/vpathmesure.cpp.o CMakeFiles/rlottie.dir/src/vector/vmatrix.cpp.o CMakeFiles/rlottie.dir/src/vector/velapsedtimer.cpp.o CMakeFiles/rlottie.dir/src/vector/vdebug.cpp.o CMakeFiles/rlottie.dir/src/vector/vinterpolator.cpp.o CMakeFiles/rlottie.dir/src/vector/vbezier.cpp.o CMakeFiles/rlottie.dir/src/vector/vraster.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawable.cpp.o CMakeFiles/rlottie.dir/src/vector/vimageloader.cpp.o CMakeFiles/rlottie.dir/src/vector/varenaalloc.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieitem.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieitem_capi.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieloader.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottiemodel.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieproxymodel.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieparser.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieanimation.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottiekeypath.cpp.o  -Wl,--version-script=/Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/rlottie.expmap -ldl -Wl,--no-undefined -latomic -lm && :
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:17: error: undefined reference to 'pixman_composite_src_n_8888_asm_neon'
  /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:26: error: undefined reference to 'pixman_composite_over_n_8888_asm_neon'
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.
@Aghajari
Copy link
Owner

Aghajari commented Jan 12, 2021

Hi,
You don't have to rebuild c++ codes

https://github.com/Aghajari/AXrLottie/blob/master/AXrLottie/output/AXrLottie-release.aar

Open the aar and use .so files

@chihung93
Copy link
Author

Thanks @Aghajari , I mean in case rLottie has updated some code and your lib hasn't updated it, so I want to fork and build it for myself.

@Aghajari
Copy link
Owner

Aghajari commented Jan 15, 2021

Hi @chihung93 , AXrLottie is using latest version of rlottie, what do you mean by "rLottie has updated some code"?

I don't know the reason of your error, may there is a command that your OS doesn't support, i have built it with MacOS and everything is fine. (if you haven't changed my codes)

About the url bug on the other issue, i'll check it soon and i'll fix it in next update. thanks

@Aghajari
Copy link
Owner

Aghajari commented Feb 2, 2021

#4 (comment)

@Aghajari Aghajari closed this as completed Feb 2, 2021
Aghajari added a commit that referenced this issue Feb 3, 2021
* 1.0.5

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* 1.0.5

* CustomEndFrame fixed.

Co-authored-by: AmirHosseinAghajari <30867537+Aghajari@users.noreply.github.com>
Co-authored-by: AmirHossein Aghajari <amirhisein82.aa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants