[kaffe] Link problem on running kaffe vm on qt-embedded
KIM, Seong-beom
sbkim at mail.marusys.com
Mon Mar 3 20:02:02 PST 2003
Hello Tony,
How about testing libawt.so using dlopen() system call?
It tells you the reason when it fails to load the library.
This is a simple test code that I used.
I hope it can be a help. :-)
Best regards,
KIM, Seong-beom
############
#include <dlfcn.h>
#include <stdio.h>
typedef int (*JNIFUNC)( void*, long );
int main( int argc, char* argv[] )
{
void* handle;
int value;
JNIFUNC function;
if ( argc < 2 )
{
printf( "load file symbol\n" );
return -1;
}
handle = dlopen( argv[1], RTLD_NOW );
if ( !handle )
{
printf( "dlopen() failed... %s\n", dlerror() );
return -1;
}
if ( argc >= 3 )
{
function = (JNIFUNC)dlsym( handle, argv[2] );
}
if ( !function )
{
printf( "dlsym() failed... %s\n", dlerror() );
return -1;
}
value = function( NULL, 0 );
printf( "return value is %d\n", value );
return 0;
}
----- Original Message -----
From: Tony Marl
To: kaffe at kaffe.org
Sent: Tuesday, March 04, 2003 12:31 PM
Subject: [kaffe] Link problem on running kaffe vm on qt-embedded
Dear all,
I wrote a HelloWorld.java file listed below:
***************************
import java.awt.*;
class MyFrame extends Frame
{
public MyFrame()
{
setTitle("HelloFrame");
setSize(300,200);
}
}
public class HelloFrame
{
public static void main(String[] args)
{
Frame frame = new MyFrame();
frame.show();
}
}
************************************************
I tested this code in linux,and used kaffe vm and qt-embedded( if used kaffe vm and X11, there was no problem).
When I run it -- kaffe -verbose HelloFrame --, the exceptions happened:
**************************************************************************************
Loading java/lang/Object.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/Serializable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Cloneable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Class.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/String.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Comparable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/CharSequence.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/System.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Void.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Boolean.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Byte.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Number.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Character.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Short.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Integer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Long.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Float.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Double.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/util/Ptr.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ClassLoader.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Throwable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ArrayIndexOutOfBoundsException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/IndexOutOfBoundsException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/RuntimeException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Exception.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/NullPointerException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ArithmeticException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ClassNotFoundException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/NoClassDefFoundError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/LinkageError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Error.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/StackOverflowError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/VirtualMachineError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/IOException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/String$ICComp.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Comparator.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Thread.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Runnable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/lang/ApplicationResource.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/RuntimePermission.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/security/BasicPermission.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/security/Permission.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/security/Guard.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ThreadGroup.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Properties.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Hashtable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Dictionary.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Map.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/InputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/BufferedInputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/FilterInputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/StdInputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/PrintStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/FilterOutputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/OutputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/BufferedOutputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/StdOutputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/StdErrorStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/FileInputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/FileDescriptor.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/FileOutputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/ObjectStreamField.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/HashMap.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/AbstractMap.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/IllegalArgumentException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/HashMap$Entry.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/AbstractMapEntry.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Map$Entry.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Package.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/lang/SystemClassLoader.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/SecurityManager.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/HashSet.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/AbstractSet.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/AbstractCollection.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Collection.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Set.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/net/URL.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/NoSuchElementException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Enumeration.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Vector.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/AbstractList.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/List.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/net/MalformedURLException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/StringTokenizer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/File.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/zip/ZipFile.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/zip/ZipConstants.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/zip/ZipEntry.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/StringBuffer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ArrayStoreException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/Array.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/StringIndexOutOfBoundsException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Random.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Runtime.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Class$CallStack.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/lang/MemoryAdvice.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/FileNotFoundException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/UnsatisfiedLinkError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/NativeLibrary.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Vector$1.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/VerifyError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/OutOfMemoryError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading HelloFrame.class
Loading MyFrame.class
Loading java/awt/Frame.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Window.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Container.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Component.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/image/ImageObserver.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/MenuContainer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Component$TreeLock.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Rectangle.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/geom/Rectangle2D.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/geom/RectangularShape.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Shape.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Defaults.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Color.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Font.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/BorderLayout.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/LayoutManager2.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/LayoutManager.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Cursor.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Insets.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Toolkit.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Dimension.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/FontMetrics.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Toolkit$1.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/peer/LightweightPeer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/peer/ComponentPeer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/Toolkit$2.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/peer/WindowPeer.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/NativeCollector.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/awt/AWTError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ExceptionInInitializerError.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/CharToByteConverter.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/UnsupportedEncodingException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/CharToByteDefault.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/CharToByteIconv.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/ClassCastException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/InstantiationException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/IllegalAccessException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/io/ConverterAlias.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/ObjectInputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/ObjectInput.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/DataInput.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/ObjectStreamConstants.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/Locale.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Character$CharacterProperties.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading kaffe/util/IntegerHashtable.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/ByteArrayOutputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/ByteArrayInputStream.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/util/zip/ZipException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/Math.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/InvocationTargetException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/NoSuchMethodException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/Modifier.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/Constructor.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/AccessibleObject.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/Member.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/ReflectPermission.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/lang/reflect/Method.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
Loading java/io/InterruptedIOException.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
java.lang.ExceptionInInitializerError: [exception was java.lang.UnsatisfiedLinkError: libawt: not found]
at HelloFrame.main(HelloFrame.java:18)
java.lang.UnsatisfiedLinkError: libawt: not found
at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
at java.lang.Throwable.<init>(Throwable.java:38)
at java.lang.Error.<init>(Error.java:81)
at java.lang.LinkageError.<init>(LinkageError.java:21)
at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:21)
at java.lang.Runtime.loadLibrary(Runtime.java:151)
at java.lang.System.loadLibrary(System.java:250)
at java.awt.Toolkit.<clinit>(Toolkit.java:107)
at java.awt.Color.setNativeValue(Color.java:285)
at java.awt.Color.<clinit>(Color.java:54)
at java.awt.Defaults.<clinit>(Defaults.java:144)
at java.awt.Window.<init>(Window.java:34)
at java.awt.Window.<clinit>(Window.java:26)
at HelloFrame.main(HelloFrame.java:18)
Loading kaffe/lang/Application.class(/usr/local/kaffe/jre/lib/rt.jar) [compressed]
*********************************************************************************************
I don't understand how it couldn't find libawt, since I have made kaffe vm followed the steps listing in the FAQ/FAQ.awt and have added the libawt.so path to the LD_LIBRARY_PATH.
Dose kaffe support qt-embedded well? Are there any restrictions on compiling kaffe and qt-embedded? What 's wrong on earth?
kaffe is kaffe20021222.tar.gz, and qte is qt-embedded-free-3.0.3.
Beat regards,
Tony
------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kaffe.org/pipermail/kaffe/attachments/20030303/09c0f584/attachment-0008.htm
More information about the kaffe
mailing list