Re: ARM Cross-Compile using GNU EABI

"Leandro Galvez" <[email protected]> Thu, 14 Feb 2008 15:11:22 +0800
Newsgroups gmane.comp.java.vm.kaffe.general
Message-ID <[email protected]>
Hi All,

    I've finally managed to cross compile my kaffe using the configuration 
commands at the end of the mail for libraries, classpath and kaffe. But 
executing any java application from the device produces the output attached 
in the log file. Please help me figure out what is wrong and what I can do 
to fix this problem.

Thanks and best regards,
Leandro Galvez

CC=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-gcc 
CPP=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-cpp 
CXX=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-g++ 
RANLIB=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-ranlib 
../libtool-1.5.24/configure --prefix=/mnt/nfsshare/usr/local/libtool --host=arm-linux
CC=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-gcc 
CPP=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-cpp 
CXX=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-g++ 
RANLIB=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-ranlib 
../zziplib-0.13.49/configure --prefix=/mnt/nfsshare/usr/local/zziplib --host=arm-linux

CC=arm-angstrom-linux-gnueabi-gcc CPP=arm-angstrom-linux-gnueabi-cpp 
CXX=arm-angstrom-linux-gnueabi-g++ 
../classpath/configure --prefix=/mnt/nfsshare/usr/local/classpath --exec-prefix=/mnt/nfsshare/usr/local/classpath 
 --disable-gtk-peer --host=arm-linux

KAFFEH=/usr/local/kaffe/bin/kaffeh CC=arm-angstrom-linux-gnueabi-gcc 
NM=arm-angstrom-linux-gnueabi-nm AR=arm-angstrom-linux-gnueabi-ar 
CPP=arm-angstrom-linux-gnueabi-cpp CXX=arm-angstrom-linux-gnueabi-g++ 
../kaffe/configure --prefix=/mnt/nfsshare/usr/local/kaffe --exec-prefix=/mnt/nfsshare/usr/local/kaffe 
 --host=arm-linux --with-classpath-prefix=/mnt/nfsshare/usr/local/classpath  
--disable-native-awt --with-includes="/mnt/nfsshare/usr/local/libtool/include" 
 --with-libraries="/mnt/nfsshare/usr/local/libtool/lib" --with-jikes

----- Original Message ----- 
From: "Dalibor Topic" <[email protected]>
To: "Leandro Galvez" <[email protected]>
Cc: "Kiyo Inaba" <[email protected]>; <[email protected]>
Sent: Tuesday, February 12, 2008 8:50 PM
Subject: Re: [kaffe] ARM Cross-Compile using GNU EABI


> Leandro Galvez wrote:
>> Hello again,
>>
>>    Is there a way to just download the binaries of the libraries  kaffe 
>> is dependent on and just install it on the target machine?
>>
> That depends on your target platform. If it is a Linux distribution, for 
> example, that has kaffe packaged for it, then that's quite likely.
> If it is, for example, a research platform, then that's quite unlikely.
>
> cheers,
> dalibor topic
>
>

_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
output.log (application/octet-stream, 13.1 KB)
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfsshare/usr/local/zlib/lib:/mnt/nfsshar e/usr/local/libtool/lib:/mnt/nfsshare/usr/local/zziplib/lib /mnt/nfsshare/usr/lo cal/kaffe/bin/kaffe -fullversion
java full version "kaffe-1.4.2"

kaffe VM "1.1.9-pre"

Copyright (c) 1996-2008 Kaffe.org project contributors (please see
  the source code for a full list of contributors).  All rights reserved.
Portions Copyright (c) 1996-2002 Transvirtual Technologies, Inc.

The Kaffe virtual machine is free software, licensed under the terms of
the GNU General Public License.  Kaffe.org is a an independent, free software
community project, not directly affiliated with Transvirtual Technologies,
Inc.  Kaffe is a Trademark of Transvirtual Technologies, Inc.  Kaffe comes
with ABSOLUTELY NO WARRANTY.

Engine: Just-in-time v3   Version: 1.1.9-pre   Java Version: 1.4
Heap defaults: minimum size: 5 MB, maximum size: unlimited
Stack default size: 64 KB
Configuration/Compilation options:
)  Compile date     : Thu Feb 14 12:40:15 SGT 2008
  Compile host     : Galvez-ubuntuvm
  Install prefix   : /mnt/nfsshare/usr/local/kaffe
  Thread system    : unix-pthreads
  Garbage Collector: kaffe-gc
  CC               : arm-angstrom-linux-gnueabi-gcc
  CFLAGS           : -Wall -W -Wextra -fno-strict-aliasing -fno-omit-frame-pointer -fsigned-char -pthread-isystem/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os
  LDFLAGS          : 
  ChangeLog head   : 2008-02-03  Dalibor Topic  <[email protected]>
# 
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfsshare/usr/local/zlib/lib:/mnt/nfsshar e/usr/local/libtool/lib:/mnt/nfsshare/usr/local/zziplib/lib /mnt/nfsshare/usr/lo cal/kaffe/bin/kaffe -fullversion
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfsshare/usr/local/zlib/lib:/mnt/nfsshar e/usr/local/libtool/lib:/mnt/nfsshare/usr/local/zziplib/lib /mnt/nfsshare/usr/lo cal/kaffe/bin/kaffe -vmdebug ALL -jar Hello.jar 
pagealloc(5246976) => 0x35000
5246976 unused bytes in heap addr range
gc_system_alloc: 5246976 byte at 0x14060

gc_primitive_free: freeing block 0x14060 (501000 bytes, 501)
gc_primitive_free: added 0x501000 bytes @ 0x14060 to freelist 20 @ 0x400b0a44

gc_primitive_alloc: got to allocate 0x4000 bytes
gc_primitive_alloc: found best_fit 0x14060 diff 0x4fd000 (0x501000 - 0x4000)
gc_primitive_alloc: splitted remaining 0x4fd000 bytes @ 0x14100
gc_primitive_alloc: 0x4000 bytes from freelist @ 0x14060
initCollector()
initCollector() done
initNativeThreads(0x10000)
initialized

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14100 diff 0x4fc000 (0x4fd000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4fc000 bytes @ 0x14128
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14100
gc_heap_malloc: small block 56 at 0x14100 free 0x3908c

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14128 diff 0x4fb000 (0x4fc000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4fb000 bytes @ 0x14150
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14128
gc_heap_malloc: small block 312 at 0x14128 free 0x3a010
Adding persistent reference for object 0x3a018

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14150 diff 0x4fa000 (0x4fb000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4fa000 bytes @ 0x14178
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14150
gc_heap_malloc: small block 20 at 0x14150 free 0x3b13c
Detected stackSize 1048576
create first  0x3a018 [java:(nil)]
initNativeThreads(0x10000) done
utf8ConstInit()

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14178 diff 0x4f9000 (0x4fa000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4f9000 bytes @ 0x141a0
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14178
gc_heap_malloc: small block 36 at 0x14178 free 0x3c0c4

gc_primitive_alloc: got to allocate 0x2000 bytes
gc_primitive_alloc: found best_fit 0x141a0 diff 0x4f7000 (0x4f9000 - 0x2000)
gc_primitive_alloc: splitted remaining 0x4f7000 bytes @ 0x141f0
gc_primitive_alloc: 0x2000 bytes from freelist @ 0x141a0
large block covers 2 pages
gc_heap_malloc: large block 4104 at 0x3d004
utf8ConstInit() done
gc_heap_malloc: freelist 36 at 0x14178 free 0x3c0ec

gc_primitive_alloc: got to allocate 0x2000 bytes
gc_primitive_alloc: found best_fit 0x141f0 diff 0x4f5000 (0x4f7000 - 0x2000)
gc_primitive_alloc: splitted remaining 0x4f5000 bytes @ 0x14240
gc_primitive_alloc: 0x2000 bytes from freelist @ 0x141f0
large block covers 2 pages
gc_heap_malloc: large block 4104 at 0x3f004
initClasspath()

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14240 diff 0x4f4000 (0x4f5000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4f4000 bytes @ 0x14268
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14240
gc_heap_malloc: small block 158 at 0x14240 free 0x41034
initClasspath(): ':/mnt/nfsshare/usr/local/kaffe/jre/lib/kaffe-vminterface.jar:/mnt/nfsshare/usr/local/kaffe/jre/lib/rt.jar:/mnt/nfsshare/usr/local/kaffe/lib/tools.jar'
insertClasspath(): '' append
insertClasspath(): '/mnt/nfsshare/usr/local/kaffe/jre/lib/kaffe-vminterface.jar' append

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14268 diff 0x4f3000 (0x4f4000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4f3000 bytes @ 0x14290
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14268
gc_heap_malloc: small block 84 at 0x14268 free 0x42054
insertClasspath(): '/mnt/nfsshare/usr/local/kaffe/jre/lib/rt.jar' append

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14290 diff 0x4f2000 (0x4f3000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4f2000 bytes @ 0x142b8
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14290
gc_heap_malloc: small block 69 at 0x14290 free 0x43064
insertClasspath(): '/mnt/nfsshare/usr/local/kaffe/lib/tools.jar' append
gc_heap_malloc: freelist 68 at 0x14290 free 0x430b4
gc_heap_free: memory 0x41034 size 160

gc_primitive_free: freeing block 0x14240 (1000 bytes, 1)
gc_primitive_free: added 0x1000 bytes @ 0x14240 to freelist 0 @ 0x400b09f4

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14240 diff 0x0 (0x1000 - 0x1000)
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14240
gc_heap_malloc: small block 157 at 0x14240 free 0x41034
initClasspath() done, got /mnt/nfsshare/usr/local/kaffe/jre/lib/kaffe-vminterface.jar:/mnt/nfsshare/usr/local/kaffe/jre/lib/rt.jar:/mnt/nfsshare/usr/local/kaffe/lib/tools.jar
initNative()
gc_heap_malloc: freelist 247 at 0x14128 free 0x3a200
got lpath /mnt/nfsshare/usr/local/kaffe/jre/lib/arm:/mnt/nfsshare/usr/local/kaffe/lib:/mnt/nfsshare/usr/local/classpath/lib/classpath::/usr/lib:/mnt/nfsshare/usr/local/zlib/lib:/mnt/nfsshare/usr/local/libtool/lib:/mnt/nfsshare/usr/local/zziplib/lib and libraryPath /mnt/nfsshare/usr/local/kaffe/jre/lib/arm:/mnt/nfsshare/usr/local/kaffe/lib:/mnt/nfsshare/usr/local/classpath/lib/classpath::/usr/lib:/mnt/nfsshare/usr/local/zlib/lib:/mnt/nfsshare/usr/local/libtool/lib:/mnt/nfsshare/usr/local/zziplib/lib
trying to load /mnt/nfsshare/usr/local/kaffe/jre/lib/arm/libkaffevm

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x142b8 diff 0x4f1000 (0x4f2000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4f1000 bytes @ 0x142e0
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x142b8
gc_heap_malloc: small block 61 at 0x142b8 free 0x4407c
Native lib /mnt/nfsshare/usr/local/kaffe/jre/lib/arm/libkaffevm
	LOAD desc=0x24a48 index=0 loader=(nil)
Couldn't find JNI_OnLoad in library /mnt/nfsshare/usr/local/kaffe/jre/lib/arm/libkaffevm.
Error message is /mnt/nfsshare/usr/local/kaffe/jre/lib/arm/libkaffevm-1.1.9-pre.so: undefined symbol: JNI_OnLoad.
initNative() done
create names and signatures
gc_heap_malloc: freelist 33 at 0x14178 free 0x3c114
gc_heap_malloc: freelist 33 at 0x14178 free 0x3c13c

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x142e0 diff 0x4f0000 (0x4f1000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4f0000 bytes @ 0x14308
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x142e0
gc_heap_malloc: small block 28 at 0x142e0 free 0x450f0
gc_heap_malloc: freelist 31 at 0x142e0 free 0x45110
gc_heap_malloc: freelist 29 at 0x142e0 free 0x45130
gc_heap_malloc: freelist 40 at 0x14178 free 0x3c164

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14308 diff 0x4ef000 (0x4f0000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4ef000 bytes @ 0x14330
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14308
gc_heap_malloc: small block 43 at 0x14308 free 0x460a4
gc_heap_malloc: freelist 38 at 0x14178 free 0x3c18c
gc_heap_malloc: freelist 35 at 0x14178 free 0x3c1b4
gc_heap_malloc: freelist 35 at 0x14178 free 0x3c1dc
gc_heap_malloc: freelist 37 at 0x14178 free 0x3c204
gc_heap_malloc: freelist 34 at 0x14178 free 0x3c22c
gc_heap_malloc: freelist 34 at 0x14178 free 0x3c254
gc_heap_malloc: freelist 40 at 0x14178 free 0x3c27c
done
initBaseClasses()
initTypes()

gc_primitive_alloc: got to allocate 0x1000 bytes
gc_primitive_alloc: found best_fit 0x14330 diff 0x4ee000 (0x4ef000 - 0x1000)
gc_primitive_alloc: splitted remaining 0x4ee000 bytes @ 0x14358
gc_primitive_alloc: 0x1000 bytes from freelist @ 0x14330
gc_heap_malloc: small block 180 at 0x14330 free 0x4702c
newClass @0x47034
Adding persistent reference for object 0x47034
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b154
gc_heap_malloc: freelist 29 at 0x142e0 free 0x45150
gc_heap_malloc: freelist 26 at 0x142e0 free 0x45170
gc_heap_malloc: freelist 30 at 0x142e0 free 0x45190
gc_heap_malloc: freelist 152 at 0x14240 free 0x410d4
gc_heap_malloc: freelist 180 at 0x14330 free 0x470ec
newClass @0x470f4
Adding persistent reference for object 0x470f4
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b16c
gc_heap_malloc: freelist 30 at 0x142e0 free 0x451b0
gc_heap_malloc: freelist 26 at 0x142e0 free 0x451d0
gc_heap_malloc: freelist 31 at 0x142e0 free 0x451f0
gc_heap_malloc: freelist 152 at 0x14240 free 0x41174
gc_heap_malloc: freelist 180 at 0x14330 free 0x471ac
newClass @0x471b4
Adding persistent reference for object 0x471b4
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b184
gc_heap_malloc: freelist 28 at 0x142e0 free 0x45210
gc_heap_malloc: freelist 26 at 0x142e0 free 0x45230
gc_heap_malloc: freelist 29 at 0x142e0 free 0x45250
gc_heap_malloc: freelist 152 at 0x14240 free 0x41214
gc_heap_malloc: freelist 180 at 0x14330 free 0x4726c
newClass @0x47274
Adding persistent reference for object 0x47274
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b19c
gc_heap_malloc: freelist 29 at 0x142e0 free 0x45270
gc_heap_malloc: freelist 26 at 0x142e0 free 0x45290
gc_heap_malloc: freelist 30 at 0x142e0 free 0x452b0
gc_heap_malloc: freelist 152 at 0x14240 free 0x412b4
gc_heap_malloc: freelist 180 at 0x14330 free 0x4732c
newClass @0x47334
Adding persistent reference for object 0x47334
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b1b4
gc_heap_malloc: freelist 32 at 0x142e0 free 0x452d0
gc_heap_malloc: freelist 26 at 0x142e0 free 0x452f0
gc_heap_malloc: freelist 33 at 0x14178 free 0x3c2a4
gc_heap_malloc: freelist 152 at 0x14240 free 0x41354
gc_heap_malloc: freelist 180 at 0x14330 free 0x473ec
newClass @0x473f4
Adding persistent reference for object 0x473f4
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b1cc
gc_heap_malloc: freelist 29 at 0x142e0 free 0x45310
gc_heap_malloc: freelist 26 at 0x142e0 free 0x45330
gc_heap_malloc: freelist 30 at 0x142e0 free 0x45350
gc_heap_malloc: freelist 152 at 0x14240 free 0x413f4
gc_heap_malloc: freelist 180 at 0x14330 free 0x474ac
newClass @0x474b4
Adding persistent reference for object 0x474b4
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b1e4
gc_heap_malloc: freelist 30 at 0x142e0 free 0x45370
gc_heap_malloc: freelist 26 at 0x142e0 free 0x45390
gc_heap_malloc: freelist 31 at 0x142e0 free 0x453b0
gc_heap_malloc: freelist 152 at 0x14240 free 0x41494
gc_heap_malloc: freelist 180 at 0x14330 free 0x4756c
newClass @0x47574
Adding persistent reference for object 0x47574
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b1fc
gc_heap_malloc: freelist 31 at 0x142e0 free 0x453d0
gc_heap_malloc: freelist 26 at 0x142e0 free 0x453f0
gc_heap_malloc: freelist 32 at 0x142e0 free 0x45410
gc_heap_malloc: freelist 152 at 0x14240 free 0x41534
gc_heap_malloc: freelist 180 at 0x14330 free 0x4762c
newClass @0x47634
Adding persistent reference for object 0x47634
gc_heap_malloc: freelist 20 at 0x14150 free 0x3b214
gc_heap_malloc: freelist 29 at 0x142e0 free 0x45430
gc_heap_malloc: freelist 26 at 0x142e0 free 0x45450
gc_heap_malloc: freelist 30 at 0x142e0 free 0x45470
gc_heap_malloc: freelist 152 at 0x14240 free 0x415d4
initTypes() done
gc_heap_malloc: freelist 41 at 0x14308 free 0x460d4
gc_heap_malloc: freelist 152 at 0x14240 free 0x41674
Calling internal class loader for startup class java/lang/Object
Scanning for class java/lang/Object
gc_heap_malloc: freelist 32 at 0x142e0 free 0x45490
Scanning for element java/lang/Object.class
Processing classpath entry '/mnt/nfsshare/usr/local/kaffe/jre/lib/kaffe-vminterface.jar'
Opening JAR file /mnt/nfsshare/usr/local/kaffe/jre/lib/kaffe-vminterface.jar for java/lang/Object.class
Bus error
#