Subject: Re: Compiling the Gimp

From: Chris Sawer <[email-masked]>
Date: Tue, 08 Sep 1998 16:05:35 +0100

Thanks everybody for your help so far - I now have a statically compiled ld
(confirmed with ldd) but unfortunately the linking still crashes. The error
message is:

[root@localhost app]# 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
/usr/X11R6/lib/libXext.sa /usr/X11R6/lib/libX11.sa -L/usr/lib -lm

/usr/lib/libc.a(rx.o)(.text+0xa4e8): multiple definition of `_re_search_2'
regex.o:/gimp-1.0.0/app/regex.c:3455: first defined here
/usr/lib/libc.a(rx.o)(.text+0xa5f4): multiple definition of `_re_search'
regex.o:/gimp-1.0.0/app/regex.c:3419: first defined here
/usr/lib/libc.a(rx.o)(.text+0xa630): multiple definition of `_re_match_2'
regex.o:/gimp-1.0.0/app/regex.c:3715: first defined here
/usr/lib/libc.a(rx.o)(.text+0xa6f0): multiple definition of `_re_match'
regex.o:/gimp-1.0.0/app/regex.c:3670: first defined here
/usr/lib/libc.a(rx.o)(.text+0xa720): multiple definition of `_re_set_syntax'
regex.o:/gimp-1.0.0/app/regex.c:956: first defined here
/usr/lib/libc.a(rx.o)(.text+0xa740): multiple definition of
`_re_set_registers'
regex.o:/gimp-1.0.0/app/regex.c:3392: first defined here
/usr/lib/libc.a(rx.o)(.text+0xab4c): multiple definition of
`_re_compile_pattern'
regex.o:/gimp-1.0.0/app/regex.c:5397: first defined here
/usr/lib/libc.a(rx.o)(.text+0xabcc): multiple definition of
`_re_compile_fastmap'
regex.o:/gimp-1.0.0/app/regex.c:3084: first defined here
/usr/lib/libc.a(rx.o)(.text+0xad74): multiple definition of `_regcomp'
regex.o:/gimp-1.0.0/app/regex.c:5531: first defined here
/usr/lib/libc.a(rx.o)(.text+0xaf34): multiple definition of `_regexec'
regex.o:/gimp-1.0.0/app/regex.c:5611: first defined here
/usr/lib/libc.a(rx.o)(.text+0xb1a0): multiple definition of `_regerror'
regex.o:/gimp-1.0.0/app/regex.c:5675: first defined here
/usr/lib/libc.a(rx.o)(.text+0xb218): multiple definition of `_regfree'
regex.o:/gimp-1.0.0/app/regex.c:5712: first defined here
ld: memory violation at pc=0x00031700, lr=0x6001ba80
(bad address=0x00000004, code 3)
gcc: Internal compiler error: program ld got fatal signal 11

This problem can be one of four things - I'm not sure which. Could anyone
help me decipher this error?

1. The version of binutils that this ld is from (2.8) is incompatible with
   gcc version 2.7.2 - possible, but I wanted to check before downloading
   another 5Mb of Binutils 2.7.

2. Something is wrong with the libc file - unlikely as several other programs
   are linked to it.

3. Something is wrong with the gimp program itself, and it needs altering - I
find this unlikely as well as I got the source from a friend who'd compiled
it on 486 Linux with no problems.

4. Something else that I haven't thought of.

Any ideas?

Thanks in advance,

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: Stefan Hanske <[email-masked]>
Date: Wed, 9 Sep 1998 14:51:42 +0200 (METDST)

>    another 5Mb of Binutils 2.7.

I wouldn't think so. I've done this too, and it worked great.

> 2. Something is wrong with the libc file - unlikely as several other programs

Right.

> it on 486 Linux with no problems.

It might be that gimp depends on the newer libc5 or libc6. Libc6 (= 
glibc2) is out now for testing, but I don't know if anybody has done 
testing for a.out.

> 4. Something else that I haven't thought of.

Try make clean and run the configure script again. It should determine 
what functions the libc provides by having a look at the header files. 
Perhaps there's an option that tells configure to turn off the regex from 
the package.

----------------------------------------------------------
|mailto: Stefan Hanske ([email-masked] |
|WWW : http://www.rzuser.uni-heidelberg.de/~shanske      |
|phone: I'm not silly                                    |
|--------------------------------------------------------|
| And don't forget to remember what you remembered not   |
| to forget to remember...				 |
----------------------------------------------------------

---

From: Matthew Wilcox <[email-masked]>
Date: Wed, 9 Sep 1998 19:47:23 +0200

> I wouldn't think so. I've done this too, and it worked great.

I suddenly thought... ld 2.8?  Would that be plain ordinary GNU
binutils 2.8?  Or is it one of the ones which has PhilB's hacks in?
ie 2.8.1.0.15 or 2.8.1.0.23?  Actually, there's even a 2.9.1.0.7 out now.
See your nearest mirror of sunsite.unc.edu (you don't want to pull it
transatlantic..) and look at /pub/Linux/GCC/release.binutils-2.9.1.0.7

-- 
Matthew Wilcox <[email-masked]>
"I decry the current tendency to seek patents on algorithms.  There are
better ways to earn a living than to prevent other people from making use of
one's contributions to computer science."  -- Donald E. Knuth, TAoCP vol 3
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Chris Sawer <[email-masked]>
Date: Wed, 09 Sep 1998 22:43:24 +0100

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

> > > 1. The version of binutils that this ld is from (2.8) is incompatible
> > > with gcc version 2.7.2 - possible, but I wanted to check before
> > > downloading another 5Mb of Binutils 2.7.
> > 
> I suddenly thought... ld 2.8?  Would that be plain ordinary GNU binutils
> 2.8?  Or is it one of the ones which has PhilB's hacks in? ie 2.8.1.0.15 or
> 2.8.1.0.23?  Actually, there's even a 2.9.1.0.7 out now. See your nearest
> mirror of sunsite.unc.edu (you don't want to pull it transatlantic..) and
> look at /pub/Linux/GCC/release.binutils-2.9.1.0.7

It's version 2.8 with the patch from the ftp site applied - I didn't think it
would work without this. I've tried 2.9.1 (yes, I know I'm mad on a 28.8
modem) which compiled but running ld from this release claimed that my .o
files were in an unrecognized format.

See my earlier posting about the fact that it isn't regex.o that's actually
causing the problems.

While I'm posting I may as well mention that typing ./configure in the gimp's
directory doesn't work with the new ld installed - when it gets to the bit
where it checks whether or not gcc is working, it claims it isn't. Could this
be related?

Out of interest, does anyone know when a stable release of elf is going to be
ready? a.out doesn't seem to support shared libraries terribly well and as
the gimp uses loads of plugins, each plugin file is huge. The total gimp
directory on my hard disc is over 300Mb (ouch!) - all from a 5Mb source.

Any help much appreciated,

Chris

---

From: Stefan Hanske <[email-masked]>
Date: Thu, 10 Sep 1998 16:39:28 +0200 (METDST)

> files were in an unrecognized format.

Have you configured and compiled them for arm-linuxaout??

> where it checks whether or not gcc is working, it claims it isn't. Could this

Check the file config.log, it should contain some more helpful messages. 
Look out for messages like 'unrecognized format' or '-lc not found' which 
mean that ld was unable to load the a.out libraries. Cure: see above.