5

I have this error when I trying to run Wikitude examples. How can I solve this.

Error:error: C:/Users/se/Desktop/wwww/Examples/SDKExamples/plugins/src/main/cpp/jni/../lib/x86/libippicv.a(jmp_icvippiMulC_32f_C1IR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object

Error:error: linker command failed with exit code 1 (use -v to see invocation)

Community
  • 1
  • 1
Lucas
  • 170
  • 3
  • 14
  • That is a very interesting issue, did that happen with an unmodified example app? What Android NDK version are you using? – Someone Nov 21 '17 at 08:38
  • 1
    it happened unmodified example app. I fetch sdk from wikitude web side and directly start examples. Latest version of NDK – Lucas Nov 23 '17 at 09:42
  • I also get this error when using opencv and C++ NDK. It appears when I try either to build the project or to run it on an emulator. Using a physical device (both 'run' and 'debug') it doesn't happen. – Marco Dec 25 '17 at 13:25
  • To keep NDK16 without downgrading check my answer [here](https://stackoverflow.com/a/48600775/2752983) – abggcv Feb 04 '18 at 15:49

3 Answers3

7

I have the same error, sorry can't add a comment as don't have enough reputation.

Error:error: /Users/alex/Projects/Android/docsign/opencv/src/sdk/native/3rdparty/libs/x86/libippicv.a(jmp_icvippiTranspose_32s_C4IR_as.s.o): relocation R_386_GOTOFF against preemptible symbol icv_ippJumpIndexForMergedLibs cannot be used when making a shared object

This is the latest Android Studio and NDK, and I am using OpenCV,

Android Studio 3.0.1 NDK 16.0.4442984

This does not happen on my other machine which does not have NDK updated.

Update: The guys maintaining the OpenCV for android advised me to add the following line to the CMake file in order to avoid the errors, when compiling with new NDK.

set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a")

https://github.com/opencv/opencv/issues/10229#issuecomment-370326899

alekshandru
  • 169
  • 1
  • 3
0

I've had the exact same problem, but think I have found a work-around to this problem. I think the problem lies in the newer version of NDK, so you could try to re-install it.

Go to SDK Manager and navigate to Appearance & Behavior/System Settings/Android SDK.

In the tab menu choose SDK Tools and deselect the NDK checkbox -> Apply. After uninstalling -> mark NDK and Apply again.

Also, after installing NDK, remove the build folder in your project (only the one with the intermediates folder in it).

Your errors will still occur when you Make the project, but your code will run when you hit Debug.

This work-around worked for me, so I hope this works for you too.

Tostifrosti
  • 143
  • 9
0

The wikitude Android samples will not currently build with Android NDK 16. You need to downgrade your Android NDK to 14.

Alternatively you can just remove the plugins features from the build. To do this remove the include for ':plugins' from the settings.gradle file and the lines referencing ':plugins' in the main build.gradle.

BrentM
  • 5,671
  • 3
  • 31
  • 38