Subject: Compiling Jaffe

From: Chris Sawer <[email-masked]>
Date: Mon, 26 Oct 1998 15:50:13 +0000

Hello again,

I've been trying to compile Jaffe 1.0b2 (an open source Java interpreter) on
ArmLinux on my Acorn RiscPC but it doesn't work. There is a precompiled elf
version for the NetWinder (so it has arm support built in), but obviously
this wouldn't work on mine.

The error starts off with:

/usr/X11R6/include/X11/Xlib.h:1505: warning: function declaration isn't a
                                                                  prototype
/usr/X11R6/include/X11/Xlib.h:1515: warning: function declaration isn't a
                                                                  prototype
X/imgjpeg.c:54: parse error before `void'
X/imgjpeg.c:58: parse error before `->'
X/imgjpeg.c:59: parse error before `->'
X/imgjpeg.c:59: warning: function declaration isn't a prototype
X/imgjpeg.c:59: conflicting types for `longjmp'
/usr/include/setjmp.h:93: previous declaration of `longjmp'
X/imgjpeg.c:59: warning: data definition has no type or storage class

<snip>

The rest is very similar, but I'm not going to waste your bandwidth with all
of it. Here's the corresponding section of imgjpeg.c:

52: typedef struct error_mgr * error_ptr;
53:
54: METHODDEF(void)
55: error_exit ( j_common_ptr cinfo)
56: {
57:   error_ptr myerr = (error_ptr) cinfo->err;
58:   (*cinfo->err->output_message)(cinfo);
59:   longjmp(myerr->setjmp_buffer, 1);
60: }

I would be very grateful if anyone can shed any light on this - I do have the
latest version of the jpeg libraries, and this worked fine when I compiled
the Gimp. If anyone wants me to send them the whole error and c file, I am
quite willing to do so.

Thanks in advance,

Chris

-- 
         Chris Sawer - Worthing, Sussex, England    ICQ: 15010147
    E-Mail: [email-masked]    PGP public key available on request
http://members.xoom.com/chrissawer/  <-- ArmLinux Binaries, Hints and Tips
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Mon, 26 Oct 1998 19:43:29 +0000

>the Gimp. If anyone wants me to send them the whole error and c file, I am

You need to post the offending part of the preprocessed source really.  It 
looks like you are missing some macros from your header files.  METHODDEF() is 
presumably supposed to expand to something very like its arguments and that 
doesn't seem to be happening (either it's not expanding at all or it's 
expanding to something that the compiler doesn't like) - and this is screwing 
up the parser so that it gets confused about where the function starts.  All 
the stuff about `parse error before...' and redefining longjmp is due to this.

p.

---

From: Chris Sawer <[email-masked]>
Date: Thu, 29 Oct 1998 22:35:45 +0000

In message <[email-masked]>
          Philip Blundell <[email-masked]> wrote:

> > I would be very grateful if anyone can shed any light on this - I do have
> > the latest version of the jpeg libraries, and this worked fine when I
> > compiled the Gimp. If anyone wants me to send them the whole error and c
> > file, I am quite willing to do so.
> 
> looks like you are missing some macros from your header files.  METHODDEF()
> is  presumably supposed to expand to something very like its arguments and
> that  doesn't seem to be happening (either it's not expanding at all or
> it's  expanding to something that the compiler doesn't like) - and this is
> screwing  up the parser so that it gets confused about where the function
> starts.  All  the stuff about `parse error before...' and redefining
> longjmp is due to this.

Thanks - as a temporary fix I removed all the offending bits from that part
of the source. It now compiles, but won't run any of the example programs -
I'll ask on the Kaffe mailing list (sorry about getting the name of the
program wrong last time!).

Chris.

PS. If anyone else has compiled kaffe from source on arm-linux I'd be
interested in hearing from you - on my system it stops when loading
"CharToByteDefault.class"

---

From: Chris Sawer <[email-masked]>
Date: Fri, 30 Oct 1998 20:03:01 +0000

I'm still trying with Kaffe (in a.out format)- I thought earlier today that
it may help to compile it statically so that it has more memory accessible. I
typed "make" in the appropriate directory, copying the final command line but
adding a "-static" on the end:

gcc -g -O2 -Wall -Wstrict-prototypes  -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
../../libraries/clib/management/libmanagement.a 
../../libraries/clib/awt/libawt.a  -lm -lc  -lz   -L/usr/X11R6/lib -lX11
-L/usr/X11R6/lib -lX11 -ljpeg  -lpng  -lz -static

But this error occurs:

ld: Output file requires shared library `libc.so.4'

abort from 0x2003720c
gcc: Internal compiler error: program ld got fatal signal 6

When libc.so.4 exists in /lib/. Typing in the same line without "-static"
gives a binary which seems to work, but of course is dynamically linked so
can't access enough memory (I think).

Can anyone help?

Chris