Subject: Re: Compiling the Gimp

From: Chris Sawer <[email-masked]>
Date: Wed, 02 Sep 1998 10:27:37 +0100

In message <[email-masked]>
          Matthew Wilcox <[email-masked]> wrote:

> Chris Sawer wrote:
> > 
> > > > So it looks like it's the `limited process size with a.out systems'
> > > > bug. I looked at the FAQ and through a mailing list archive and it
> > > > looks pretty horrendous to fix. Do I really have to recompile gcc in
> > > > order to build a large program? I'm willing to have a go when I've
> > > > got some spare time but isn't there a precompiled elf version around
> > > > (the one on the ftp site is a.out)?
> > 
> > > You don't actually need to rebuild gcc; it is sufficient to build a
> > > static linker.  To do this, you will require the binutils source code.
> > 
> > I'm fairly new to all this compiling, and I couldn't find anything
> > terribly helpful documentation-wise in the binutils source code. Is this
> > elf format in the alpha stages of development at the moment, as there
> > isn't even a precompiled compiler in it? If so, does anyone know when
> > it's likely to be released so we can compile medium-large sized programs
> > (the Gimp, Lesstif, Mozilla, etc.). I'm not in a huge hurry for the Gimp,
> > but I would like to get it working in the not too distant future.
> 
> ELF on the ARM is indeed in development and it's probably wisest not to
> build it unless you're fairly competent.  However, building a static a.out
> ld should be a matter of typing `./configure --target=arm-linux-gnuaout
> --static' in the binutils directory, followed by `make'.  Um, I appear to
> not have binutils source to hand right now, so I can't check the --static
> is correct - try `./configure --help' to confirm it.

OK, I've downloaded the latest 2.9.1 binutils archive, and think I've managed
to compile it. It has put its binaries in /usr/local/arm-linux-gnuaout/
including ld. Recompiling the gimp uses the old ld in /usr/bin/ and throws up
the out of memory error message following this line:

gcc -g -O2 -Wall -o gimp <snip lots of .o files> ../libgimp/libgimpi.a
-L/usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 -lm

Replacing this with the equivalent ld command:
ld -o gimp <snip lots of .o files> ../libgimp/libgimpi.a -L/usr/local/lib
-L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 -lm

gives exactly the same error message when using the ld in /usr/bin/. Using
the /usr/local/arm-linux-gnuaout/ld, however, it throws up the error "file
not recognized: File format not recognized". Can anyone shed any light on
this?

Thanks for all your help so far, and hopefully we can get this working.

Chris

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

---

From: Chris Sawer <[email-masked]>
Date: Wed, 02 Sep 1998 12:39:45 +0100

Re: my last message, I've now found another version of ld on my system, in
/usr/local/bin/arm-linux-gnuaout.ld - which recognizes the binary format of
the .o files, but crashes with the memory exhaused error! (even though it
isn't - 12Mb free and 160Mb of swap free). Aaarrrggghhh!

Any suggestions?

Chris

---

From: Chris Sawer <[email-masked]>
Date: Wed, 09 Sep 1998 14:48:29 +0100

Thanks Vidar for your message explaining about regex.o - I removed it from
the list of files to link, and this cures the multiple definition problem,
but unfortunately ld still crashes with this error:

ld: memory violation at pc=0x00031700, lr=0x6001ba80
(bad address=0x00000004, code 3)
gcc: Internal compiler error: program ld got fatal signal 11

Does anyone understand this, or shall I just try compiling a different
version of ld?

Thanks in advance,

Chris