Internal compiler error when compiling icu4c with debuggable = true

303 views
Skip to first unread message

Peter Tseng

unread,
Apr 5, 2011, 6:42:03 PM4/5/11
to android-ndk
I'm getting the following error compiling icu4c (http://
android.git.kernel.org/?p=platform/external/icu4c.git;a=summary):

Compile thumb : icuuc <= ucnvmbcs.c
/Users/peter/Dev/android/android-ndk-r5b/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc -
MMD -MP -MF /Users/peter/Dev/android/code/mobile/android/uploader/
trunk/obj/local/armeabi/objs-debug/icuuc/ucnvmbcs.o.d.org -fpic -
ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -
D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -
march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-
pointer -fno-strict-aliasing -finline-limit=64 -Iimports/imports/icu4c/
common -Iimports/imports/icu4c/common/../i18n -I/Users/peter/Dev/
android/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/include -I/Users/
peter/Dev/android/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/libs/
armeabi/include -Iimports/imports/icu4c/common -DANDROID '-
DICU_DATA_DIR_PREFIX_ENV_VAR="ANDROID_ROOT"' '-DICU_DATA_DIR="/usr/
icu"' -D_REENTRANT -DU_COMMON_IMPLEMENTATION -O3 -
DU_HAVE_NL_LANGINFO_CODESET=0 -DPIC -fPIC -Wa,--noexecstack -O0 -g -I/
Users/peter/Dev/android/android-ndk-r5b/platforms/android-9/arch-arm/
usr/include -c imports/imports/icu4c/common/ucnvmbcs.c -o /Users/
peter/Dev/android/code/mobile/android/uploader/trunk/obj/local/armeabi/
objs-debug/icuuc/ucnvmbcs.o && rm -f /Users/peter/Dev/android/code/
mobile/android/uploader/trunk/obj/local/armeabi/objs-debug/icuuc/
ucnvmbcs.o.d && mv /Users/peter/Dev/android/code/mobile/android/
uploader/trunk/obj/local/armeabi/objs-debug/icuuc/ucnvmbcs.o.d.org /
Users/peter/Dev/android/code/mobile/android/uploader/trunk/obj/local/
armeabi/objs-debug/icuuc/ucnvmbcs.o.d
imports/imports/icu4c/common/ucnvlat1.c: In function
'_Latin1FromUnicodeWithOffsets':
imports/imports/icu4c/common/ucnvlat1.c:315: internal compiler error:
in reload, at reload1.c:1173
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [/Users/peter/Dev/android/code/mobile/android/uploader/trunk/
obj/local/armeabi/objs-debug/icuuc/ucnvlat1.o] Error 1
make: *** Waiting for unfinished jobs....

What causes this is setting debuggable to true in the manifest xml
file. When I remove the file before calling ndk-build, the error
doesn't occur.

Related issue (probably the same):
http://groups.google.com/group/android-ndk/browse_thread/thread/6f88a3946a7da53b

Compiler command without debug (that succeeds):
/Users/peter/Dev/android/android-ndk-r5b/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc -
MMD -MP -MF /Users/peter/Dev/android/code/mobile/android/build/trunk/
obj/local/armeabi/objs/icuuc/ucnvlat1.o.d.org -fpic -ffunction-
sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -
D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -
march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-
pointer -fno-strict-aliasing -finline-limit=64 -Iimports/imports/icu4c/
common -Iimports/imports/icu4c/common/../i18n -I/Users/peter/Dev/
android/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/include -I/Users/
peter/Dev/android/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/libs/
armeabi/include -Iimports/imports/icu4c/common -DANDROID '-
DICU_DATA_DIR_PREFIX_ENV_VAR="ANDROID_ROOT"' '-DICU_DATA_DIR="/usr/
icu"' -D_REENTRANT -DU_COMMON_IMPLEMENTATION -O3 -
DU_HAVE_NL_LANGINFO_CODESET=0 -DPIC -fPIC -Wa,--noexecstack -O2 -
DNDEBUG -g -I/Users/peter/Dev/android/android-ndk-r5b/platforms/
android-9/arch-arm/usr/include -c imports/imports/icu4c/common/
ucnvlat1.c -o /Users/peter/Dev/android/code/mobile/android/build/trunk/
obj/local/armeabi/objs/icuuc/ucnvlat1.o && rm -f /Users/peter/Dev/
android/code/mobile/android/build/trunk/obj/local/armeabi/objs/icuuc/
ucnvlat1.o.d && mv /Users/peter/Dev/android/code/mobile/android/build/
trunk/obj/local/armeabi/objs/icuuc/ucnvlat1.o.d.org /Users/peter/Dev/
android/code/mobile/android/build/trunk/obj/local/armeabi/objs/icuuc/
ucnvlat1.o.d

Gabe Martin

unread,
Apr 6, 2011, 3:05:30 PM4/6/11
to andro...@googlegroups.com
Peter,

I had the same problem. It builds successfully in release (NDK_DEBUG=0) but fails with an ICE for debug builds (NDK_DEBUG=1).  What I ended up doing was compiling the library in release then packaging it's output as a prebuilt that I then include in my larger project.

It's a workaround but it works.



--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


Peter Tseng

unread,
Apr 6, 2011, 3:17:50 PM4/6/11
to android-ndk
Thanks for your response.

I ended up doing pretty much the same thing. I prebuilt icu4c, and
created another Android.mk to allow other modules (libxml2) to
import. I don't expect to have to debug icu4c, so this should
suffice.


For reference, my Android.mk for exporting prebuilt (you'll probably
have to tweak the paths if you use this):

# Allow other modules to include this as a prebuilt because this
module
# doesn't seem to build if APP_OPTIM := debug (internal compiler
error)

ifneq ($(AS_ICU4C_DEFINED), true)
AS_ICU4C_DEFINED := true

##################################################

LOCAL_PATH := $(call my-dir)

##################################################

include $(CLEAR_VARS)
LOCAL_MODULE := libicui18n
LOCAL_SRC_FILES := ../android-build/obj/local/$(TARGET_ARCH_ABI)/
libicui18n.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../i18n
include $(PREBUILT_STATIC_LIBRARY)

##################################################

include $(CLEAR_VARS)
LOCAL_MODULE := libicuuc
LOCAL_SRC_FILES := ../android-build/obj/local/$(TARGET_ARCH_ABI)/
libicuuc.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../common
include $(PREBUILT_STATIC_LIBRARY)

##################################################

endif # AS_ICU4C_DEFINED
> >http://groups.google.com/group/android-ndk/browse_thread/thread/6f88a...
Reply all
Reply to author
Forward
0 new messages