Porting Kaffe to OS/2
Orville R. Weyrich
orville at weyrich.com
Wed Oct 1 21:33:54 PDT 1997
On Wed, 1 Oct 1997, Mikael Ståldal wrote:
> I'm trying to port Kaffe to OS/2 (an i386 platform) using the EMX compiler
> (GCC port). I have encountered some problems.
> Some different header files differ only in case, and since the file system
> in OS/2 isn't case sensitive this causes clashes. String.h clashes with the
> standard string.h and System.h clashes with Kaffe's system.h.
My suggestion is to place all kaffe include files in a directory named
kaffe, such that the kaffe directory is in your INCLUDE path. This means
that you will have to modify the source code to:
It is less work if you only do this for the files which conflict, but it
is cleaner if you move all the kaffe headers to this location and tweak the
source code appropriately. In my opinion, this would add value to the
source code base for all users, since it would make clear which includes
are for system headers, and which are for kaffe headers.
I just downloaded kaffe myself, and haven't looked at the code yet,
so some other variation may be more consistent with the existing
organization, but this should get you started. I use OS/2 and would
love to have kaffe on OS/2, so give me a shout if I can be of any
more help :-)
> Make doesn't find machine.c in the interp subdirectory, how is it supposed
> to find it there? I'm using GNU Make 3.75. When I copied it to kaffevm it
> works. The same problem with the package directoris in packages.
Is there a configuration script that generates machine.c based on the
> When I copied files from the packages, things broke due to "../../.." style
> #include directives that I hade to change manually. Try to avoid using ".."
> in #include directives.
I am afraid that there is no general solution for this portability problem,
absolute paths also have their problems. Perhaps a perl script containing
if ( $line =~ /^#include/ )
$line =~ s/\.\.\//..\\/;
might be the easiest to do over all your source files.
(i.e. find all include lines and change ../ to ..\).
> I get the following error:
> make: Entering directory `/UNIX/kaffe/kaffe/kaffevm'
> gcc -g -O -Zexe -DNO_SHARED_LIBRARIES -I. -I. -I./../../config
-I../../config -I../../include -I./../../include -DINTERPRETER -I./intrp -DKVER=\"0.91\" -c machine.c
> machine.c: In function `virtualMachine':
> machine.c:141: structure has no member named `exception_table_len'
> machine.c:152: structure has no member named `ins'
> machine.c:178: structure has no member named `code'
> machine.c:182: structure has no member named `codelen'
> make: *** [machine.o] Error 1
> make: Leaving directory `/UNIX/kaffe/kaffe/kaffevm'
> make: *** [all] Error 1
> When I look at the structure, it has no exception_table_len member. How is
> this supposed to works?
I don't know. It may be due to using the wrong header file.
Orville R. Weyrich, Jr. Weyrich Computer Consulting
mailto:orville at weyrich.com http://www.weyrich.com
More information about the kaffe