Skip to content

libgnustl_shared.so is not the latest #9410

Closed

Description

@hezheop

react native native library libgnustl_shared.so only 661KB, But when I use a thirdparty sdk, it also has a libgnustl_shared.so , and It will show this error

Path in archive: lib/armeabi-v7a/libgnustl_shared.so Origin 1: /Users/hezhe/PaintMall/android/app/build/intermediates/exploded-aar/com.facebook.react/react-native/0.24.0-rc3/jni/armeabi-v7a/libgnustl_shared.so Origin 2: /Users/hezhe/PaintMall/android/app/src/main/jniLibs/armeabi-v7a/libgnustl_shared.so You can ignore those files in your build.gradle: android { packagingOptions { exclude 'lib/armeabi-v7a/libgnustl_shared.so' } }

So I delete the thirdparty 's libgnustl_shared.so ,but its libgnustl_shared.so is 714KB , I think the two .so file are not the same, so It showed this error:

08-14 15:05:12.963 16877-16877/com.paintmall E/art: dlopen("/data/app/com.paintmall-1/lib/arm/libqupai-media-jni.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_ZSt24__throw_out_of_range_fmtPKcz" referenced by "libqupai-media-jni.so"...

But I'm not sure ,so I copy the react native's libgnustl_shared.so to replace the thirdparty demo's
libgnustl_shared.so and it showed the same error, now I confirmed that issue. I must use this thirdparty sdk ,what should I do ? Do I build react native from source can solve this problem?
If yes, how ? thanks :) I'm in hurry ~~~ bacause this thirdparty does the most important job in our app ....Without that,our app can't be submited

Activity

  1. overminder commented on Aug 18, 2016

    @overminder

    This symbol comes from gcc-4.9's libgnustl_shared.so while ReactAndroid is built with gcc-4.8.

    You have four choices:

    • Rebuild your APK by excluding gcc-4.8's libgnustl_shared.so (i.e., the smaller one) and keeping the one from gcc-4.9. I highly doubt that this would work though..
    • Rebuild ReactAndroid in gcc-4.8 but link against gnustl statically.
    • Rebuild ReactAndroid in gcc-4.9.
    • Ask qupaicloud's developers to send you a special build of libqupai-media-jni.so built with gcc-4.8.
  2. hey99xx commented on Dec 7, 2016

    @hey99xx

    @overminder do know you what it takes to link against gnustl statically? Even if one dev (qupaicloud) does a special favor and makes a custom build, most devs will not be so nice.

    This will in the long term lead to dependency hell and this problem is probably outside the domain for most JavaScript or even Android developers. If it takes to make changes Application.mk & Android.mk files, do you know how to proceed?

  3. hramos commented on May 25, 2017

    @hramos
    Contributor

    Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.

  4. locked as resolved and limited conversation to collaborators on Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions