Skip to main content

build error midp for arm linux

5 replies [Last post]
trollsid
Offline
Joined: 2009-05-24

Hello.
I have some issues when compiling phoneme features for arm-linux platform:

If romizer fails, increase your heap size.
E.g., =HeapCapacity80M

Starting free heap = 78572 KB
Loading classes...Done! in 1.718 seconds
... reading system property: microedition.encoding
Fatal signal SIGSEGV: errno=0; code=1; addr=(nil)
[Dumping all threads]
Current thread = 0x40002000

[Thread: 0x40002000 *** CURRENT ***]
task ID 0x1
Stack Trace (id=0) [
[ 0] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[ 1]
#
# VM Error, assertion failure
#
# Error ID: /home/troll/qtopia/java/phoneme_feature/cldc/src/vm/share/runtime/Frame.cpp, 507
#
# assert(in_gc_state() || raw_method()->is_method(), "Sanity check")

how i can fix this issue?

Message was edited by: trollsid

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
borman
Offline
Joined: 2008-08-25

Finally there's a fix for this problem. For us, disabling [b]ENABLE_CODE_OPTIMIZER[/b] in cldc/build/
/
.cfg fixed this bug. I mean, the bug is seen with optimizer, but not seen without it. Influance of other parameters not checked, you can check it in http://github.com/borman/phoneme-qtopia/blob/fb24c1fd7cc156be34d8c562316...

Is there a bug tracker here to post this bug? Seems like the one i chose the last time ( https://phoneme.dev.java.net/issues/show_bug.cgi?id=43 ) is not checked by anybody as there is no activity within more than half a year.

danila
Offline
Joined: 2006-09-25

ENABLE_CODE_OPTIMIZER flag covers a small subset of compiler optimizations that are known to be unstable.
It is disabled by default until all bugs are fixed.
ENABLE_INTERNAL_CODE_OPTIMIZER and ENABLE_TRAMPOLINE are by default set to false for the same reason.
Please post this bug to the issue tracker.

I will check about the progress and status of the issue you already posted.

trollsid
Offline
Joined: 2009-05-24

What heap size need for build midp normaly?
try whith 128mb,160mb,256mb heapsize (phoneME Feature mr4)

[b]Starting free heap = 104787 KB
Loading classes...Done! in 2.12 seconds
... reading system property: microedition.encoding
Fatal signal SIGSEGV: errno=0; code=1; addr=(nil)
[Dumping all threads]
Current thread = 0x40002080

[Thread: 0x40002080 *** CURRENT ***]
task ID 0x1
Stack Trace (id=0) [
[ 0] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[ 1] EntryFrame
[ 2] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[ 3] EntryFrame
[ 4] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[ 5] EntryFrame
[ 6] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[ 7] EntryFrame
[ 8] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[ 9] EntryFrame
[10] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[11] EntryFrame
[12] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[13] EntryFrame
[14] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[15] EntryFrame
[16] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[17] EntryFrame
[18] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[19] EntryFrame
[20] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[21] EntryFrame
[22] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[23] EntryFrame
[24] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[25] EntryFrame
[26] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[27] EntryFrame
[28] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[29] EntryFrame
[30] com/sun/cldchi/jvm/JVM.createSysImage bci=0
[31] EntryFrame
]

[Finished dumping all threads]
[/b]

Message was edited by: trollsid

Message was edited by: trollsid

town
Offline
Joined: 2009-07-01

I have also got this error message during building midp, increasing the heapsize for romizer does not work for me.
I have tried different version of phoneme, such as phoneme_feature-mr2-rel-src-b23-08_may-2007.zip, phoneme_feature-mr4-rel-src-b01-20_apr_2009.zip and also the lasted code on phoneme feature svn repository, but the result of building midp for arm linux is all like the aboved: generating ROMImage.cpp failed.
I have alse tried different version of arm linux toolchain, such as gcc-3.4.5-glibc-2.3.6, gcc-4.1.0-glibc-2.3.6, gcc-4.2.1-glibc-2.3.2..., but the result of building midp for arm linux is all like the aboved.
It will be greatly appreciated if you could give your advice on this issue, Thanks.

Following is my buid scripts for cldc and midp:
build-cldc.sh
. setup.sh
make -C $HOME/cldc/build/javacall_linux_arm \
GNU_TOOLS_DIR=$GNU_TOOLS_DIR \
JDK_DIR=$JDK_DIR \
ENABLE_PCSL=true \
PCSL_OUTPUT_DIR=$Output/pcsl \
JAVACALL_OUTPUT_DIR=$Output/javacall \
JVMWorkSpace=$HOME/cldc \
JVMBuildSpace=$Output/cldc \
TOOLS_DIR=$HOME/tools \
TOOLS_OUTPUT_DIR=$Output/tools \
USE_DEBUG=true \
USE_DEBUG_ROMGEN=true \
USE_DEBUG_ROMGEN_SYMBOLS=true \
$1
if [ $? -ne 0 ]; then
echo "cldc_status=failed" >> $Log
else
echo "cldc_status=OK" >> $Log
fi
. $Scripts/teardown.sh

build-sjwc.sh
. setup.sh
make -C $HOME/midp/build/javacall \
GNU_TOOLS_DIR=$GNU_TOOLS_DIR \
JDK_DIR=$JDK_DIR \
JAVACALL_PLATFORM=linux_arm_gcc \
JAVACALL_OUTPUT_DIR=$Output/javacall \
PCSL_OUTPUT_DIR=$Output/pcsl \
CLDC_DIST_DIR=$Output/cldc/javacall_linux_arm/dist \
TOOLS_DIR=$HOME/tools \
TOOLS_OUTPUT_DIR=$Output/tools \
TARGET_CPU=arm \
CPU=arm \
MIDP_OUTPUT_DIR=$Output/midp \
USE_DEBUG=true \
USE_DEBUG_ROMGEN=true \
USE_DEBUG_ROMGEN_SYMBOLS=true \
$1
if [ $? -ne 0 ]; then
echo "sjwc_status=failed" >> $Log
else
echo "sjwc_status=OK" >> $Log
fi
. $Scripts/teardown.sh

danila
Offline
Joined: 2006-09-25

Try to increase the heapsize for romizer.
The rule that runs romizer is located in midp/build/common/makefiles/cldc_vm.gmk:

$(MIDP_OUTPUT_DIR)/ROMImage.cpp: $(MIDP_CLASSES_ZIP) \
$(ROMGEN_CMD) \
$(MIDP_DIR)/build/common/config/rom.config
@echo " ... generating $@" $(LOG)

@rm -f $(ROMGEN_CFG_LST);
@for f in $(ROMGEN_CFG_FILES); do \
echo "Include $$f" >> $(ROMGEN_CFG_LST); \
done

@echo $(ROMGEN_CMD) $(ROMGEN_ARGS) \
-cp $(MIDP_CLASSES_ZIP) \
-romize =HeapCapacity96M \
$(foreach path, $(ROMGEN_INCLUDE_PATHS), \
-romincludepath $(path)) $(LOG)

@cd $(MIDP_OUTPUT_DIR); \
$(ROMGEN_CMD) $(ROMGEN_ARGS) \
-cp $(MIDP_CLASSES_ZIP) \
-romize =HeapCapacity96M \
$(foreach path, $(ROMGEN_INCLUDE_PATHS), \
-romincludepath $(path)) $(LOG)