from Mali binaries on android breaks down with platform built with -O3

Bug #954783 reported by Kalle Vahlman on 2012-03-14
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

My own builds and build #200 from

end up not booting correctly due to some kind of linking/missing symbol problem:

D/libEGL ( 2953): loaded /system/lib/egl/
E/libEGL ( 2953): load_driver(/system/lib/egl/ Cannot load library: link_image[1936]: 1497 could not load needed library '' for '' (link_image[1936]: 1497 could not load needed library '' for '' (reloc_library[1285]: 1497 cannot locate '__aeabi_llsr'...
E/libEGL ( 2953): ))
D/AndroidRuntime( 2953): Shutting down VM
W/dalvikvm( 2953): threadid=1: thread exiting with uncaught exception (group=0xa000f1f8)
E/AndroidRuntime( 2953): FATAL EXCEPTION: main
E/AndroidRuntime( 2953): java.lang.RuntimeException: eglConfig not initialized
E/AndroidRuntime( 2953): at android.view.HardwareRenderer$GlRenderer.initializeEgl(
E/AndroidRuntime( 2953): at android.view.HardwareRenderer$GlRenderer.initialize(
E/AndroidRuntime( 2953): at android.view.ViewRootImpl.performTraversals(
E/AndroidRuntime( 2953): at android.view.ViewRootImpl.handleMessage(
E/AndroidRuntime( 2953): at android.os.Handler.dispatchMessage(
E/AndroidRuntime( 2953): at android.os.Looper.loop(
E/AndroidRuntime( 2953): at
E/AndroidRuntime( 2953): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2953): at java.lang.reflect.Method.invoke(
E/AndroidRuntime( 2953): at$
E/AndroidRuntime( 2953): at
E/AndroidRuntime( 2953): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1632): Force finishing activity

Thomas Espersson (espersson) wrote :

Is this not seen in build #199 or previous builds? How can you tell what the differences are in build #200 from previous? I tried this link
But that just says "no changes"

Kalle Vahlman (kvahlman) wrote :

I'm not sure, I only tested the latest build from there to confirm that it's not just my own build that is broken.

Thomas Espersson (espersson) wrote :

Kalle, what was the impact when using this build, didn't boot at all or was it booting but with these errors in the log?

The test results from the Linaro build seems to pass (all except CTS):

Kalle Vahlman (kvahlman) wrote :

The symptoms are that UI either does not come up at all, or comes up with a crash notice for launcher.

Which would AFAIK mean that eg. glmark could not be successfully run. However,

doesn't really reveal what made this test pass. There is "no measurement taken" and no logs nor other info offered.

Further information:

I've now tested builds #200, #195 and #176 and can confirm that #176 is working while the two later ones don't. Looking at the build history at

something "big" happened after #176 as there are a lot of failed builds after that which could be a hint for the cause of this. I'll try #191 to narrow it down more as well.

Kalle Vahlman (kvahlman) wrote :

Interestingly #191 and #192 work too, so something happened between builds #192 and #195 to break this.

Thomas Espersson (espersson) wrote :

Kalle, please update with your findings from the continued investigation

Changed in igloocommunity:
assignee: Thomas Espersson (espersson) → Kalle Vahlman (kvahlman)
Kalle Vahlman (kvahlman) wrote :

The problem has been identified and verified to be caused by this change:,1561

In a nutshell, when the image is compiled with -O3 and more recent libgcc than what used to build the mali binaries, some symbols that requries are lost. I've tested that reverting that commit produces a working image.

As for solutions, from IRC discussions:

17:58 < bero> Well, the best thing to do would be to get a recompiled version that uses our compiler and -O3, to make sure it doesn't require __aeabi_llsr to be exported...

but I understood that bero is in the process of finding a way to inject the required implementations in somehow.

Changed in igloocommunity:
status: New → In Progress
summary: - Linking(?) problem with from Mali binaries on android
+ from Mali binaries on android breaks down with platform built
+ with -O3

Yes, currently investigating why -O3 affects this (probably a call to __aeabi_llsr in an underlying library is optimized away by -O3, causing the underlying library not to drag the symbol in at link time (it's supposed to come from libgcc.a)).

There may be a simple fix along the lines of

arm-linux-androideabi-gcc -shared -o -L. -lBrokenUMP -lgcc

But of course that's rather ugly...

Changed in igloocommunity:
assignee: Kalle Vahlman (kvahlman) → Anmar Oueja (anmar)
Patrik Klinger (patrik-klinger) wrote :

Kalle is not working on this bug ... .it should be assigned to someone that is actually working on it. We need to have this fixed ASAP (within 1-2 days).

Anmar Oueja (anmar) wrote :

libUMP needs to be recompiled by ST-Ericsson. Ideally Patrik Rid should do that. I am assigning it to him.

Changed in igloocommunity:
assignee: Anmar Oueja (anmar) → Patrik Ryd (patrik-ryd)
Anmar Oueja (anmar) wrote :

Sorry for the misspelled name :-(

There is a work around to address this problem for 12.03.

Anmar Oueja (anmar) wrote :

will move to 12.04 release since the work around suffices for the 12.03 release.

Changed in igloocommunity:
milestone: 2012.03 → 2012.04
Kalle Vahlman (kvahlman) wrote :

For the record, this seems to have been:

commit fccd4888194b7c7be0dea41eb10a92636175045d
Merge: f5cb4a6 bb3b30c
Author: Mathieu J. Poirier <email address hidden>
Date: Wed Mar 21 16:24:10 2012 +0000

    Merge "snowball: disabling -03 optimzation until we have new mali libs" into linaro_android_4.0.3

in the build.git component.

Kalle Vahlman (kvahlman) wrote :

I mean the work-around seems to have been...

The work around is in 'build/core/combo/' where 'ifneq' have been introduce to use '-03' for all boards except snowball. The additions are currently on line 69 and 86.

Changed in igloocommunity:
importance: Critical → Medium
Changed in igloocommunity:
assignee: Patrik Ryd (patrik-ryd) → Jayeeta Bandyopadhyay (jayeeta)
assignee: Jayeeta Bandyopadhyay (jayeeta) → vathsala (vathsala-nagaraju)
Changed in igloocommunity:
milestone: 2012.04 → 2012.05
status: In Progress → Confirmed
Anmar Oueja (anmar) wrote :

Anmar to check with Graphics WG to see if they can help.

Anmar Oueja (anmar) wrote :

Anmar pinged the graphics group. They promised they will look at it. However, they are at an important UMM summit now so not expecting an answer for a while.

Changed in igloocommunity:
milestone: 2012.05 → 2012.06
Changed in igloocommunity:
milestone: 2012.06 → 2012.07
Anmar Oueja (anmar) wrote :

I asked Appal to talk to the toolchain group. I assume nothing yet.

Changed in igloocommunity:
milestone: 2012.07 → 2012.08
Changed in igloocommunity:
milestone: 2012.08 → none
Changed in igloocommunity:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers