[Image-SIG] build problems

Seth Hettich sjh@ucf.ics.uci.edu
Wed, 06 Feb 2002 13:47:11 -0800


I see in the archives this has come up before, but I didn't see a solution.

I'm building w/ gcc on a solaris system.  libImaging builds fine,
but back in the main dir, when it comes time to link:
gcc -shared  ./_imaging.o ./decode.o ./encode.o ./map.o ./display.o
./outline.o 
./path.o  libImaging/libImaging.a -L/opt/contrib/gnome/lib
-R/opt/contrib/gnome/
lib -ljpeg -L/opt/contrib/gnome/lib -R/opt/contrib/gnome/lib -lz  -o
./_imaging.
so
Text relocation remains                         referenced
    against symbol                  offset      in file
ImagingTransformAffine              0x3b90 libImaging/libImaging.a(Geometry
.o)
ImagingTransformAffine              0x3cc0 libImaging/libImaging.a(Geometry
.o)
ImagingCopy                         0x68 libImaging/libImaging.a(Bands.o)

[...]


I see that these functions are in _imaging.o, so I tried:
gcc -shared   ./decode.o ./encode.o ./map.o ./display.o ./outline.o ./path.o
libImaging/libImaging.a -L/opt/contrib/gnome/lib -R/opt/contrib/gnome/lib
-ljpeg -L/opt/contrib/gnome/lib -R/opt/contrib/gnome/lib -lz  -o
./_imaging.so ./_imaging.o 

ld: fatal: symbol `ImagingError_ModeError' is multiply defined:
        (file libImaging/libImaging.a(Except.o) and file ./_imaging.o);
ld: fatal: symbol `ImagingError_IOError' is multiply defined:
        (file libImaging/libImaging.a(Except.o) and file ./_imaging.o);
ld: fatal: symbol `ImagingError_MemoryError' is multiply defined:
        (file libImaging/libImaging.a(Except.o) and file ./_imaging.o);
ld: fatal: symbol `ImagingError_ValueError' is multiply defined:
        (file libImaging/libImaging.a(Except.o) and file ./_imaging.o);
ld: fatal: symbol `ImagingError_Mismatch' is multiply defined:
        (file libImaging/libImaging.a(Except.o) and file ./_imaging.o);
ld: fatal: File processing errors. No output written to ./_imaging.so


moving _imaging.o to the end makes the link errors go away, but I
get new ones instead.  I don't fully understand the setup of the
build system, so I'm unsure how this is supposed to be working.

Any ideas?

-Seth