Cannot boot Android with Linaro's GCC 4.6

Bug #803600 reported by Zach Pfeffer on 2011-06-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Fix Released
High
Chao Yang

Bug Description

https://wiki.linaro.org/Platform/Android/Builds/Wip/Build1AsacPandaGccLinaro4.6Noprelink?action=AttachFile&do=view&target=minicom.cap.txt

E/Zygote ( 937): Error preloading android.util.Patterns.
 400 E/Zygote ( 937): java.lang.ExceptionInInitializerError
 401 E/Zygote ( 937): at java.lang.Class.classForName(Native Method)
 402 E/Zygote ( 937): at java.lang.Class.forName(Class.java:234)
 403 E/Zygote ( 937): at java.lang.Class.forName(Class.java:181)
 404 E/Zygote ( 937): at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:297)
 405 E/Zygote ( 937): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:564)
 406 E/Zygote ( 937): at dalvik.system.NativeStart.main(Native Method)
 407 E/Zygote ( 937): Caused by: java.util.regex.PatternSyntaxException: Syntax error U_REGEX_NUMBER_TOO_BIG near index 32:
 408 E/Zygote ( 937): [a-zA-Z0-9\+\.\_\%\-\+]{1,256}\@[a-zA-Z0-9][a-zA-Z0-9\-]{0,64}(\.[a-zA-Z0-9][a-zA-Z0-9\-]{0,25})+
 409 E/Zygote ( 937): ^
 410 E/Zygote ( 937): at java.util.regex.Pattern.compileImpl(Native Method)
 411 E/Zygote ( 937): at java.util.regex.Pattern.compile(Pattern.java:400)
 412 E/Zygote ( 937): at java.util.regex.Pattern.<init>(Pattern.java:383)
 413 E/Zygote ( 937): at java.util.regex.Pattern.compile(Pattern.java:374)
 414 E/Zygote ( 937): at android.util.Patterns.<clinit>(Patterns.java:146)
 415 E/Zygote ( 937): ... 6 more
 416 D/AndroidRuntime( 937): Shutting down VM

Zach Pfeffer (pfefferz) on 2011-06-29
Changed in linaro-android:
status: New → Incomplete
importance: Undecided → High
milestone: none → 11.07
Loïc Minier (lool) wrote :

Details? :-)

Alexander Sack (asac) on 2011-07-11
summary: - Cannot compile Android with Linaro's GCC 4.6
+ Cannot boot Android with Linaro's GCC 4.6
description: updated
Zach Pfeffer (pfefferz) wrote :

Chao Yang is working on this.

Changed in linaro-android:
assignee: nobody → Chao Yang (chaoyang)
Chao Yang (chaoyang) wrote :

 toolchain-4.6-2011.06-0 got segmentation fault when building Linaro android panda-11.07-release and panda-11.06-release as below. It also got same issues when compiling other files such as e_log.c, e_log10.c. Detailed log is enclosed.

bionic/libm/src/e_cosh.c: In function 'cosh':
bionic/libm/src/e_cosh.c:86:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [out/target/product/pandaboard/obj/SHARED_LIBRARIES/libm_intermediates/src/e_cosh.o] Error 1

Chao Yang (chaoyang) wrote :

When building Linaro Android panda-11.06-release with toolchain-4.6-2011.05-0, the following error found due to gcc 4.6 applying stricter rules. The error can be fixed if "-Werror=address" is removed from gcc options. But the ideal solution would be fix the error in dbus code.

target thumb C: dbus-daemon <= external/dbus/bus/config-parser.c
external/dbus/bus/config-parser.c: In function 'include_file':
external/dbus/bus/config-parser.c:2040:7: error: the comparison will always evaluate as 'false' for the address of 'tmp_error' will never be NULL [-Werror=address]
external/dbus/bus/config-parser.c:2056:7: error: the comparison will always evaluate as 'false' for the address of 'tmp_error' will never be NULL [-Werror=address]
cc1: some warnings being treated as errors

Chao Yang (chaoyang) on 2011-07-13
Changed in linaro-android:
status: Incomplete → In Progress
Chao Yang (chaoyang) wrote :

dbus error has been fixed and an updated dbus git uploaded onto linaro git. Please use " <project name="platform/external/dbus" path="external/dbus" revision="4bda01d38f1ef164d76bb8e266caaabfd549ef9c"/>" to replace the original dbus configuration in .repo/manifests/*.xml

gcc error (https://bugs.launchpad.net/gcc-linaro/+bug/809768) can be avoided by the toolchain below which integrates a workaround patch. Please note: this is not a formal fix, just for test purpose.
http://people.linaro.org/~kwerner/linaro-4.6-toolchain-install.tar.bz2

Then the linaro android can be built with toolchain-4.6-2011.06-0

Chao Yang (chaoyang) wrote :

Linaro Android built with gcc 4.6 fails to be up and running. The error in Bug Description is found.
It is found that icu4c misbehaves when it is built with gcc 4.6, which results in java regular expression parsing failed.
If libicui18n.so and libicuuc.so are replaced with those built with gcc 4.5, the issue is gone.
Investigation is ongoing.

Chao Yang (chaoyang) wrote :

libicui18n.so does not function correctly when building against gcc 4.6. The problem could be fixed by changing optimization option -O3 to -O2 in icu4c. Patch icu4c_gcc_4.6_issue.patch is enclosed.

Alexander Sack (asac) wrote :

with this patch, does android boot to UI?

Chao Yang (chaoyang) wrote :

Yes, Android 1107 can boot to UI with this patch in addition to the patch of dbus and the gcc's patch from https://bugs.launchpad.net/gcc-linaro/+bug/809768. Therefore, to build android 1107 with gcc 4.6 1107, the following 3 patches are needed:

1. dbus patch (dbus_4.6_dbus_building_errors.patch attached)
2. icu4c_gcc_4.6_issue.patch (attached above)
3. gcc patch from https://bugs.launchpad.net/gcc-linaro/+bug/809768

The proper gcc fixing patch has been enclosed in https://bugs.launchpad.net/gcc-linaro/+bug/809768. Please note this patch does not go to gcc 1107 release. I have gcc 1107 source code and binary patched with this fix. The source code can be found in http://people.linaro.org/~chaoyang/gcc-linaro-4.6-2011.07-0-bug-809768.tar.bz2. The gcc binary can be found in http://people.linaro.org/~chaoyang/android-toolchain-eabi-linaro-4.6-2011.07-bug-809768.tar.bz2.

The building instructions can be found in https://wiki.linaro.org/Platform/Android/BuildingAndroidWithGcc4.6

Chao Yang (chaoyang) wrote :

git patches for dbus and icu4c are attached

Alexander Sack (asac) wrote :

this was fixed and we use linaro 4.6 by default in our official images for the candidate rleease today.

Changed in linaro-android:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers