SUMMARY: Problems with kaffe-0.10.0 on OpenStep (LONG)

Aleksey Sudakov zander at rkinc.com
Sun Apr 5 10:57:36 PDT 1998


Looks like my message didn't get to the list, so here I go again. I am  
apologized if somebody receive it twice.

Begin forwarded message:

X-Nextstep-Mailer: Mail 4.2mach (Enhance 2.1)
From: Aleksey Sudakov <zander>
Date: Thu,  2 Apr 98 23:36:45 -0500
To: kaffe at kaffe.org
Subject: SUMMARY: Problems with kaffe-0.10.0 on OpenStep (LONG)
Reply-To: zander at rkinc.com

After fixing support.c I managed to get further with kaffe-0.10.0  
compilation on OpenStep. I will try to summarize all problems that I was  
unable to solve but first let me list the changes that need to be done to  
compile kaffe on OpenStep

1. Define uint. The best place for that is config/i386/nextstep3/md.h or  
config/m68k/nextstep3/md.h. Add the following line

typedef unsigned int uint;

2. Download gmp.2.0.2.pl2.NIHS.tar.gz from NeXT ftp sites (peak or peanuts)  
and install it. Then after running ./configure modify  
libraries/clib/math/Makefile to have -I/usr/local/includes in INCLUDES and  
also modify kaffe/kaffevm/Makefile to have -L/usr/local/lib -lmpg

Could we actually make ./configure put this automatically into Makefiles. I  
am not sure how to do that.

3. Add the following line to kaffe/kaffevm/inflate.h

#include <md.h>

4. Fix external.c
Change line
#include "../../packages/external_native.h"
to
#include "../../libraries/clib/external_native.h"
This bug only apears while compiling with static libraries


5. Somebody mentioned that kaffe needs zlib. I didn't get that problem, but  
just in case NeXTSTEP/OpenStep doesn't come with zlib, so you may also want  
to get one from http://www.cdrom.com/pub/infozip/zlib/

After that you will got the following results

A. For OpenStep both m68k and i386 with ./configure --with-engine=intrp  
(assuming shared libraries) kaffe compilation will fail during linking of  
kafeevm.a with following error

ln -s libkaffevm.o.0.100 libkaffevm.o
cc -g -seglinkedit -all_load  -I. -I./../kaffevm -I../../config  
-I./../../config -I../../include -I./../../include  -c main.c
cc -g -seglinkedit -all_load  -I. -I./../kaffevm -I../../config  
-I./../../config -I../../include -I./../../include   -o kaffe main.o  
../kaffevm/libkaffevm.o  -lm
/bin/ld: Undefined symbols:
_Kaffe_LockInterface
_Kaffe_ThreadInterface
_Tspinoff
_blockInts
*** Exit 1
Stop.

On m68k there is an extra undefined symbol _sysdepCallMethod

Any ideas how to fix that?



B. For OpenStep i386 (there is no jit for m68k) with ./configure  
--with-engine=jit (assuming shared libraries) kaffe compilation will fail  
with following error

cc -g -seglinkedit -all_load  -DNO_SHARED_VMLIBRARY -I. -I. -I./../../config  
-I../../config -I../../include -I./../../include -DTRANSLATOR -I./jit  
-DKVER=\"0.100\"  -c  jit/icode.c
jit/icode.c:3308: illegal statement, missing `)' after `willcatch'
jit/icode.c:3312: illegal function prototype, found `1'
jit/icode.c:3312: illegal function definition, found `)'
jit/icode.c:3328: illegal statement, missing `)' after `willcatch'
jit/icode.c:3332: illegal function prototype, found `1'
jit/icode.c:3332: illegal function definition, found `)'
*** Exit 1
Stop.

Any idea what is this all about?

C. For OpenStep both m68k and i386 with ./configure --with-engine=intrp  
--enable-staticlib kaffe compilation will fail during linking of kafeevm.a  
with following numerous undefined symbols

cc -g -seglinkedit -all_load  -I. -I./../kaffevm -I../../config  
-I./../../config -I../../include -I./../../include   -o kaffe main.o  
../kaffevm/libkaffevm.a  ../../libraries/clib/native/libnative.a  
../../libraries/clib/net/libnet.a ../../libraries/clib/zip/libzip.a  
../../libraries/clib/math/libmath.a  -lm  -lz  -L/usr/X11/lib -lX11
/bin/ld: Undefined symbols:
_Kaffe_java_io_FileDescriptor_initSystemFD_stub
_Kaffe_java_io_FileDescriptor_sync_stub
_Kaffe_java_io_FileDescriptor_valid_stub
_Kaffe_java_io_FileInputStream_available_stub
_Kaffe_java_io_FileInputStream_close_stub
_Kaffe_java_io_FileInputStream_open_stub
_Kaffe_java_io_FileInputStream_readBytes_stub
_Kaffe_java_io_FileInputStream_read_stub
_Kaffe_java_io_FileInputStream_skip_stub
_Kaffe_java_io_FileOutputStream_close_stub
_Kaffe_java_io_FileOutputStream_openAppend_stub
_Kaffe_java_io_FileOutputStream_open_stub
_Kaffe_java_io_FileOutputStream_writeBytes_stub
_Kaffe_java_io_FileOutputStream_write_stub
_Kaffe_java_io_File_canRead0_stub
_Kaffe_java_io_File_canWrite0_stub
_Kaffe_java_io_File_canonPath_stub
_Kaffe_java_io_File_delete0_stub
_Kaffe_java_io_File_exists0_stub
_Kaffe_java_io_File_isAbsolute_stub
_Kaffe_java_io_File_isDirectory0_stub
_Kaffe_java_io_File_isFile0_stub
_Kaffe_java_io_File_lastModified0_stub
_Kaffe_java_io_File_length0_stub
_Kaffe_java_io_File_list0_stub
_Kaffe_java_io_File_mkdir0_stub
_Kaffe_java_io_File_renameTo0_stub
_Kaffe_java_io_File_rmdir0_stub
_Kaffe_java_io_ObjectInputStream_allocateNewArray_stub
_Kaffe_java_io_ObjectInputStream_allocateNewObject_stub
_Kaffe_java_io_ObjectInputStream_inputClassFields_stub
_Kaffe_java_io_ObjectInputStream_invokeObjectReader_stub
_Kaffe_java_io_ObjectInputStream_loadClass0_stub
_Kaffe_java_io_ObjectOutputStream_invokeObjectWriter_stub
_Kaffe_java_io_ObjectOutputStream_outputClassFields_stub
_Kaffe_java_io_ObjectStreamClass_getClassAccess_stub
_Kaffe_java_io_ObjectStreamClass_getFieldAccess_stub
_Kaffe_java_io_ObjectStreamClass_getFieldSignatures_stub
_Kaffe_java_io_ObjectStreamClass_getFields0_stub
_Kaffe_java_io_ObjectStreamClass_getMethodAccess_stub
_Kaffe_java_io_ObjectStreamClass_getMethodSignatures_stub
_Kaffe_java_io_ObjectStreamClass_getSerialVersionUID_stub
_Kaffe_java_io_ObjectStreamClass_hasWriteObject_stub
_Kaffe_java_io_RandomAccessFile_close_stub
_Kaffe_java_io_RandomAccessFile_getFilePointer_stub
_Kaffe_java_io_RandomAccessFile_length_stub
_Kaffe_java_io_RandomAccessFile_open_stub
_Kaffe_java_io_RandomAccessFile_readBytes_stub
_Kaffe_java_io_RandomAccessFile_read_stub
_Kaffe_java_io_RandomAccessFile_seek_stub
_Kaffe_java_io_RandomAccessFile_writeBytes_stub
_Kaffe_java_io_RandomAccessFile_write_stub
_Kaffe_java_lang_ClassLoader_defineClass0_stub
_Kaffe_java_lang_ClassLoader_findSystemClass0_stub
_Kaffe_java_lang_ClassLoader_getSystemResourceAsName0_stub
_Kaffe_java_lang_ClassLoader_getSystemResourceAsStream0_stub
_Kaffe_java_lang_ClassLoader_init_stub
_Kaffe_java_lang_ClassLoader_resolveClass0_stub
_Kaffe_java_lang_Class_forName_stub
_Kaffe_java_lang_Class_getClassLoader_stub
_Kaffe_java_lang_Class_getComponentType_stub
_Kaffe_java_lang_Class_getConstructor0_stub
_Kaffe_java_lang_Class_getConstructors0_stub
_Kaffe_java_lang_Class_getField0_stub
_Kaffe_java_lang_Class_getFields0_stub
_Kaffe_java_lang_Class_getInterfaces_stub
_Kaffe_java_lang_Class_getMethod0_stub
_Kaffe_java_lang_Class_getMethods0_stub
_Kaffe_java_lang_Class_getModifiers_stub
_Kaffe_java_lang_Class_getName_stub
_Kaffe_java_lang_Class_getPrimitiveClass_stub
_Kaffe_java_lang_Class_getSigners_stub
_Kaffe_java_lang_Class_getSuperclass_stub
_Kaffe_java_lang_Class_isArray_stub
_Kaffe_java_lang_Class_isAssignableFrom_stub
_Kaffe_java_lang_Class_isInstance_stub
_Kaffe_java_lang_Class_isInterface_stub
_Kaffe_java_lang_Class_isPrimitive_stub
_Kaffe_java_lang_Class_newInstance_stub
_Kaffe_java_lang_Class_setSigners_stub
_Kaffe_java_lang_Compiler_command_stub
_Kaffe_java_lang_Compiler_compileClass_stub
_Kaffe_java_lang_Compiler_compileClasses_stub
_Kaffe_java_lang_Compiler_disable_stub
_Kaffe_java_lang_Compiler_enable_stub
_Kaffe_java_lang_Compiler_initialize_stub
_Kaffe_java_lang_Double_doubleToLongBits_stub
_Kaffe_java_lang_Double_longBitsToDouble_stub
_Kaffe_java_lang_Double_toString_stub
_Kaffe_java_lang_Double_valueOf0_stub
_Kaffe_java_lang_Double_valueOf_stub
_Kaffe_java_lang_Float_floatToIntBits_stub
_Kaffe_java_lang_Float_intBitsToFloat_stub
_Kaffe_java_lang_Float_toString_stub
_Kaffe_java_lang_Float_valueOf_stub
_Kaffe_java_lang_Math_IEEEremainder_stub
_Kaffe_java_lang_Math_acos_stub
_Kaffe_java_lang_Math_asin_stub
_Kaffe_java_lang_Math_atan2_stub
_Kaffe_java_lang_Math_atan_stub
_Kaffe_java_lang_Math_ceil_stub
_Kaffe_java_lang_Math_cos_stub
_Kaffe_java_lang_Math_exp_stub
_Kaffe_java_lang_Math_floor_stub
_Kaffe_java_lang_Math_log_stub
_Kaffe_java_lang_Math_pow_stub
_Kaffe_java_lang_Math_rint_stub
_Kaffe_java_lang_Math_sin_stub
_Kaffe_java_lang_Math_sqrt_stub
_Kaffe_java_lang_Math_tan_stub
_Kaffe_java_lang_Object_clone_stub
_Kaffe_java_lang_Object_getClass_stub
_Kaffe_java_lang_Object_hashCode_stub
_Kaffe_java_lang_Object_notifyAll_stub
_Kaffe_java_lang_Object_notify_stub
_Kaffe_java_lang_Object_wait_stub
_Kaffe_java_lang_Runtime_buildLibName_stub
_Kaffe_java_lang_Runtime_execInternal_stub
_Kaffe_java_lang_Runtime_exitInternal_stub
_Kaffe_java_lang_Runtime_freeMemory_stub
_Kaffe_java_lang_Runtime_gc_stub
_Kaffe_java_lang_Runtime_initializeLinkerInternal_stub
_Kaffe_java_lang_Runtime_loadFileInternal_stub
_Kaffe_java_lang_Runtime_runFinalization_stub
_Kaffe_java_lang_Runtime_runFinalizersOnExit0_stub
_Kaffe_java_lang_Runtime_totalMemory_stub
_Kaffe_java_lang_Runtime_traceInstructions_stub
_Kaffe_java_lang_Runtime_traceMethodCalls_stub
_Kaffe_java_lang_SecurityManager_classDepth_stub
_Kaffe_java_lang_SecurityManager_classLoaderDepth_stub
_Kaffe_java_lang_SecurityManager_currentClassLoader_stub
_Kaffe_java_lang_SecurityManager_currentLoadedClass0_stub
_Kaffe_java_lang_SecurityManager_getClassContext_stub
_Kaffe_java_lang_String_intern_stub
_Kaffe_java_lang_String_unintern_stub
_Kaffe_java_lang_System_arraycopy_stub
_Kaffe_java_lang_System_currentTimeMillis_stub
_Kaffe_java_lang_System_identityHashCode_stub
_Kaffe_java_lang_System_initProperties_stub
_Kaffe_java_lang_System_setErr0_stub
_Kaffe_java_lang_System_setIn0_stub
_Kaffe_java_lang_System_setOut0_stub
_Kaffe_java_lang_Thread_countStackFrames_stub
_Kaffe_java_lang_Thread_currentThread_stub
_Kaffe_java_lang_Thread_finalize0_stub
_Kaffe_java_lang_Thread_interrupt0_stub
_Kaffe_java_lang_Thread_isAlive_stub
_Kaffe_java_lang_Thread_isInterrupted_stub
_Kaffe_java_lang_Thread_resume0_stub
_Kaffe_java_lang_Thread_setPriority0_stub
_Kaffe_java_lang_Thread_sleep_stub
_Kaffe_java_lang_Thread_start_stub
_Kaffe_java_lang_Thread_stop0_stub
_Kaffe_java_lang_Thread_suspend0_stub
_Kaffe_java_lang_Thread_yield_stub
_Kaffe_java_lang_Throwable_fillInStackTrace_stub
_Kaffe_java_lang_Throwable_printStackTrace0_stub
_Kaffe_java_lang_UNIXProcess_destroy_stub
_Kaffe_java_lang_UNIXProcess_forkAndExec_stub
_Kaffe_java_lang_UNIXProcess_notifyReaders_stub
_Kaffe_java_lang_UNIXProcess_run_stub
_Kaffe_java_lang_reflect_Array_getBoolean_stub
_Kaffe_java_lang_reflect_Array_getByte_stub
_Kaffe_java_lang_reflect_Array_getChar_stub
_Kaffe_java_lang_reflect_Array_getDouble_stub
_Kaffe_java_lang_reflect_Array_getFloat_stub
_Kaffe_java_lang_reflect_Array_getInt_stub
_Kaffe_java_lang_reflect_Array_getLength_stub
_Kaffe_java_lang_reflect_Array_getLong_stub
_Kaffe_java_lang_reflect_Array_getShort_stub
_Kaffe_java_lang_reflect_Array_get_stub
_Kaffe_java_lang_reflect_Array_multiNewArray_stub
_Kaffe_java_lang_reflect_Array_newArray_stub
_Kaffe_java_lang_reflect_Array_setBoolean_stub
_Kaffe_java_lang_reflect_Array_setByte_stub
_Kaffe_java_lang_reflect_Array_setChar_stub
_Kaffe_java_lang_reflect_Array_setDouble_stub
_Kaffe_java_lang_reflect_Array_setFloat_stub
_Kaffe_java_lang_reflect_Array_setInt_stub
_Kaffe_java_lang_reflect_Array_setLong_stub
_Kaffe_java_lang_reflect_Array_setShort_stub
_Kaffe_java_lang_reflect_Array_set_stub
_Kaffe_java_lang_reflect_Constructor_getModifiers_stub
_Kaffe_java_lang_reflect_Constructor_newInstance_stub
_Kaffe_java_lang_reflect_Field_getBoolean_stub
_Kaffe_java_lang_reflect_Field_getByte_stub
_Kaffe_java_lang_reflect_Field_getChar_stub
_Kaffe_java_lang_reflect_Field_getDouble_stub
_Kaffe_java_lang_reflect_Field_getFloat_stub
_Kaffe_java_lang_reflect_Field_getInt_stub
_Kaffe_java_lang_reflect_Field_getLong_stub
_Kaffe_java_lang_reflect_Field_getModifiers_stub
_Kaffe_java_lang_reflect_Field_getShort_stub
_Kaffe_java_lang_reflect_Field_get_stub
_Kaffe_java_lang_reflect_Field_setBoolean_stub
_Kaffe_java_lang_reflect_Field_setByte_stub
_Kaffe_java_lang_reflect_Field_setChar_stub
_Kaffe_java_lang_reflect_Field_setDouble_stub
_Kaffe_java_lang_reflect_Field_setFloat_stub
_Kaffe_java_lang_reflect_Field_setInt_stub
_Kaffe_java_lang_reflect_Field_setLong_stub
_Kaffe_java_lang_reflect_Field_setShort_stub
_Kaffe_java_lang_reflect_Field_set_stub
_Kaffe_java_lang_reflect_Method_getModifiers_stub
_Kaffe_java_lang_reflect_Method_invoke_stub
_Kaffe_java_math_BigInteger_plumbAdd_stub
_Kaffe_java_math_BigInteger_plumbDivideAndRemainder_stub
_Kaffe_java_math_BigInteger_plumbDivide_stub
_Kaffe_java_math_BigInteger_plumbGcd_stub
_Kaffe_java_math_BigInteger_plumbGeneratePrime_stub
_Kaffe_java_math_BigInteger_plumbInit_stub
_Kaffe_java_math_BigInteger_plumbModInverse_stub
_Kaffe_java_math_BigInteger_plumbModPow_stub
_Kaffe_java_math_BigInteger_plumbMultiply_stub
_Kaffe_java_math_BigInteger_plumbRemainder_stub
_Kaffe_java_math_BigInteger_plumbSquare_stub
_Kaffe_java_math_BigInteger_plumbSubtract_stub
_Kaffe_java_net_InetAddressImpl_getHostByAddr_stub
_Kaffe_java_net_InetAddressImpl_getInetFamily_stub
_Kaffe_java_net_InetAddressImpl_getLocalHostName_stub
_Kaffe_java_net_InetAddressImpl_lookupAllHostAddr_stub
_Kaffe_java_net_InetAddressImpl_lookupHostAddr_stub
_Kaffe_java_net_InetAddressImpl_makeAnyLocalAddress_stub
_Kaffe_java_net_PlainDatagramSocketImpl_bind_stub
_Kaffe_java_net_PlainDatagramSocketImpl_datagramSocketClose_stub
_Kaffe_java_net_PlainDatagramSocketImpl_datagramSocketCreate_stub
_Kaffe_java_net_PlainDatagramSocketImpl_getTTL_stub
_Kaffe_java_net_PlainDatagramSocketImpl_join_stub
_Kaffe_java_net_PlainDatagramSocketImpl_leave_stub
_Kaffe_java_net_PlainDatagramSocketImpl_peek_stub
_Kaffe_java_net_PlainDatagramSocketImpl_receive_stub
_Kaffe_java_net_PlainDatagramSocketImpl_send_stub
_Kaffe_java_net_PlainDatagramSocketImpl_setTTL_stub
_Kaffe_java_net_PlainDatagramSocketImpl_socketGetOption_stub
_Kaffe_java_net_PlainDatagramSocketImpl_socketSetOption_stub
_Kaffe_java_net_PlainSocketImpl_initProto_stub
_Kaffe_java_net_PlainSocketImpl_socketAccept_stub
_Kaffe_java_net_PlainSocketImpl_socketAvailable_stub
_Kaffe_java_net_PlainSocketImpl_socketBind_stub
_Kaffe_java_net_PlainSocketImpl_socketClose_stub
_Kaffe_java_net_PlainSocketImpl_socketConnect_stub
_Kaffe_java_net_PlainSocketImpl_socketCreate_stub
_Kaffe_java_net_PlainSocketImpl_socketGetOption_stub
_Kaffe_java_net_PlainSocketImpl_socketListen_stub
_Kaffe_java_net_PlainSocketImpl_socketSetOption_stub
_Kaffe_java_net_SocketInputStream_socketRead_stub
_Kaffe_java_net_SocketOutputStream_socketWrite_stub
_Kaffe_java_text_DateFormat_format0_stub
_Kaffe_java_util_ResourceBundle_getClassContext_stub
_Kaffe_java_util_zip_Adler32_update1_stub
_Kaffe_java_util_zip_Adler32_update_stub
_Kaffe_java_util_zip_CRC32_update1_stub
_Kaffe_java_util_zip_CRC32_update_stub
_Kaffe_java_util_zip_Deflater_deflate_stub
_Kaffe_java_util_zip_Deflater_end_stub
_Kaffe_java_util_zip_Deflater_getAdler_stub
_Kaffe_java_util_zip_Deflater_getTotalIn_stub
_Kaffe_java_util_zip_Deflater_getTotalOut_stub
_Kaffe_java_util_zip_Deflater_init_stub
_Kaffe_java_util_zip_Deflater_reset_stub
_Kaffe_java_util_zip_Deflater_setDictionary_stub
_Kaffe_java_util_zip_Inflater_end_stub
_Kaffe_java_util_zip_Inflater_getAdler_stub
_Kaffe_java_util_zip_Inflater_getTotalIn_stub
_Kaffe_java_util_zip_Inflater_getTotalOut_stub
_Kaffe_java_util_zip_Inflater_inflate_stub
_Kaffe_java_util_zip_Inflater_init_stub
_Kaffe_java_util_zip_Inflater_reset_stub
_Kaffe_java_util_zip_Inflater_setDictionary_stub
_Kaffe_LockInterface
_Kaffe_ThreadInterface
_Tspinoff
_blockInts
_runFinalizerOnExit
_Kaffe_SystemCallInterface
_mpz_abs
_mpz_add
_mpz_add_ui
_mpz_clear
_mpz_cmp_ui
_mpz_fdiv_qr
_mpz_fdiv_qr_ui
_mpz_gcd
_mpz_get_ui
_mpz_init
_mpz_mul
_mpz_mul_ui
_mpz_powm
_mpz_set_ui
_mpz_sizeinbase
_mpz_sub

I know how to fix _mpz_*. One need to modify kaffe/kaffevm/Makefile to have  
-L/usr/local/lib -lmpg as mentioned earlier. I guess all _kaffe_* methods  
simply ain't implemented yet. That still leaves two undefined methods whose  
fate is unknown. They are

_runFinalizerOnExit
_Kaffe_SystemCallInterface

I guess they are jit specific. Am I right?

Well, that's all folks. Any workarounds to the mentioned problems would be  
greatly appreciated.

Thanks,
Aleksey



More information about the kaffe mailing list