Unsatisfied Link Error: Unknow weak reloc type 3.

This topic contains 7 replies, has 5 voices, and was last updated by  Ricardo 2 years, 7 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #31881

    Hello, recently I had our game Spiral Episode 1 working on the MIPS Creator CI20 dev board with Android 4.4, our game uses Unreal Engine 3. Everything worked fine except for one thing, I had to disable the lip-sync library we’re using, and it is probably a bug in your side or maybe in Google NDK side, the game crashes when opened with the following error: “java.lang.UnsatisfiedLinkError: dlopen failed: unknown weak reloc type 3 @ 0x4cfc9724 (243884)”.

    Basically the engine is compiled as a shared library into the file libUnrealEngine.so. Also the lip-sync library we are compiling it statically into the file libLipSync.a. Then when we compile the engine it uses the libLipSync.a to link statically. This works for ARM and x86, so I figure it is a bug of the linker in MIPS. I can send to you a readelf of the library if you think it would help.


    PS: I forgot to mention we are using Androd NDK r10c with GCC 4.9.



    For CI20 related issues, it’s worth checking the following groups:



    You may wish to subscribe to the lists.


    reloc type 3 is R_ARM_REL32… is the lipsync library ARM code?

    Looking at the linker R_ARM_REL32 is not expected at the point where this error message is generated so the most likely thing is that the symbol should have been resolved in some other way. Would it be possible to provide a copy of the app (or a cut down version…) that exhibits the problem so that I can look into it?



    Hello Chrisdearman, I just made sure that the lipsync library linked is MIPS code (I tried to link with the ARM version and it didn’t work, it showed the error “skipping incompatible library”). I guess I could send you the APK privately for you to run it, I wouldn’t feel comfortable making it available publicly. You work for ImgTec? It doesn’t tell in your profile.



    I’m having exactly the same issue… @aaronruizmora how did you solve your problem?



    the problem was that I was using gcc 4.9. I solved it by using gcc 4.8


    Hi @ricardoquesada , sorry it took so long to reply, I wasn’t available for some time. The problem you are having is related to GCC 4.9. It is to do with the way that the MIPS linker is handling weak symbols that do not have a default implementation. @chrisdearman has modified the MIPS linker to handle this case, but he told me it will take a while for the linker change to get propagated so for now use GCC 4.8 if you can.

    @chrisdearman do you know if your change has been already added to the latest version of the Android NDK?




    @aaronruizmora yes, thanks for the info. I realized that it was a bug in gcc 4.9, but I wans’t sure what was the bug. Hopefully it is fixed in gcc 5.0

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.