Skip to main content

Compiling and installing

11 replies [Last post]
hallenberg
Offline
Joined: 2007-01-05

I finally managed to get the source to compile, but what remains is to figure out what I need to transfer to the device. Unfortunately I'm a bit low on space so just transferring the whole midp/build/linux_fb_gcc/output/ directory is not an option at the moment. There seems to be a lot of redundant files in there... It would be nice to have a "make dist" option or similar, that creates a package with everything that is needed.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rerlin
Offline
Joined: 2007-01-03

Hi,

when compiling phoneMe feature I got following error

romgen -cp /path/to/phoneME_feature/cldc/build/classes.zip +GenerateGNUCode =HeapCapacity8M -romconfig /path/to/phoneME_feature/cldc/src/vm/cldctest_rom.cfg -romincludepath /path/to/phoneME_feature/cldc/src/vm +RewriteROMConstantPool +EnableAllROMOptimizations -romize

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

class not found: java/lang/Object

#
# VM Error, Internal Error
#
# Error ID: /path/to/phoneME_feature/cldc/src/vm/share/runtime/Throw.cpp, 225
#
# Fatal: Couldn't load specified class during bootstrapping, please check classpath
#
Trace/breakpoint trap

I tried to increase used heap size first from 8 to 80 and them increasing it by 10M up to 800M. I checked that the java/lang/Object really exist in /path/to/phoneME_feature/cldc/build/classes.zip package.

what I am doing wrong ?

-Rerlin

danila
Offline
Joined: 2006-09-25

Hi Rerlin,

it maybe because JVMBuildSpace ends with a slash.
Try to do a clean rebuild without a slash.

Danila

jonathan
Offline
Joined: 2003-06-12

All you need is:

$MIDP_OUTPUT_DIR/appdb
$MIDP_OUTPUT_DIR/bin
$MIDP_OUTPUT_DIR/lib

Regards,
Jonathan

hallenberg
Offline
Joined: 2007-01-05

Thanks!

Now I need to figure out why some midlets that install on the provided binary don't install on my own (at default configuration), some midlets throw null pointer exceptions at run time and other midlets seem to work just fine...

hallenberg
Offline
Joined: 2007-01-05

I can't seem to get a grip of what's wrong here, the output is sparse to say the least. I'm trying to run http://wap.jbenchmark.com/JBenchmark2.jar. It works just fine with the provided Linux/ARM binary, but if I compile my own binary I get:

Uncaught exception: java.lang.NullPointerException
- java.lang.System..unknown.(), bci=4

Sometimes nothing is printed to the console. It seems like similar errors occur when a class is missing, but now I'm just guessing. If so, how can I find out what I did wrong in the compilation process?

hallenberg
Offline
Joined: 2007-01-05

I'm sorry if I repeat myself, but I really can't seem to figure out what the problem is here. Something must be wrong in the configuration and it's all a bit confusing without proper documentation on MR2 (the build instructions are for MR1) and an army of environment variables that have to be correct. Apparently some member of java.lang.System is missing with the default configuration. I've included the variables I'm setting at the bottom, in case it helps anyone.

Also, a lot of the JSR's are missing. I can't tell if it's because they've been moved into the midp path or if it's because they aren't included at all.

The installation of one Midlet crashes when it's trying to add itself to the pushlist as an sms listener (InvalidJadException 48). This worked just fine in the binary release.

I would really appreciate some input on the problems... Thanks

/ Tomas

--------------------------
All environment variables are added in the beginning of the top level makefile.

Environment variables when building PCSL:
export PCSL_PLATFORM=linux_arm_gcc
export GNU_TOOLS_DIR=/opt/phoneME_feature/montavista-emu
export NETWORK_MODULE=bsd/generic
(I'm using arm-linux-gcc for crosscompiling since I don't have monta vista, so the montavista-emu dir contains symlinks to the correct binaries. This way I could leave the makefiles as intact as possible)

Environment variables when building CLDC:
export JVMWorkSpace = /opt/phoneME_feature/cldc
export JDK_DIR = /opt/j2sdk1.4.2_13
export ENABLE_PCSL = true
export ENABLE_ISOLATES = true
export PCSL_OUTPUT_DIR = /opt/phoneME_feature/pcsl/output
export GNU_TOOLS_DIR = /opt/phoneME_feature/montavista-emu
(built from the linux_arm_926 directory)

Environment variables when building MIDP:
export PCSL_OUTPUT_DIR=/opt/phoneME_feature/pcsl/output
export CPU=arm
export JDK_DIR=/opt/j2sdk1.4.2_13
export CLDC_DIST_DIR=/opt/phoneME_feature/cldc/build/linux_arm_926/dist
export GNU_TOOLS_DIR = /opt/phoneME_feature/montavista-emu
(built from the linux_fb_gcc directory)

jonathan
Offline
Joined: 2003-06-12

Well, one thing that jumps out at me is that you're building CLDC with ENABLE_ISOLATES=true but you didn't build MIDP with the corresponding flag:

USE_MULTIPLE_ISOLATES=true

I hope this helps.

hallenberg
Offline
Joined: 2007-01-05

Thanks, but that actually seemed to make things worse =) Now JBenchmark2 doesn't even start. I receive no error message or anything, usertest just quits to the console. I will test with other midlets during the course of the day.

/ Tomas

hallenberg
Offline
Joined: 2007-01-05

I got an error message this time (it seems quite random if you get one or not):
java.lang.NullPointerException
- java.lang.System..unknown.(), bci=4
- .unknown..run(), bci=3
- java.lang.Thread.run(), bci=5
REPORT: handleFatalError: uncaught exception in isolate 2 event processing thread

hallenberg
Offline
Joined: 2007-01-05

I tried compiling CLDC without the 926-specific optimizations (using the linux_arm-directory instead) and now JBenchmark2 runs as it's supposed to. I'll investigate it more when I get the time.

/ Tomas

danila
Offline
Joined: 2006-09-25

Hi Tomas,

you're right, some optimizations enabled in linux_arm_926 configuration are not stable yet. We are working to improve
it.

Danila