[GRASSLIST:8034] Re: grass-6.0.1RC2 compilation

Glynn Clements glynn at gclements.plus.com
Tue Aug 23 16:46:52 EDT 2005


jun liang wrote:

>    Yes, it worked. "libgrass_datetime" does not bother me anymore.
>     I will put everything together after i finish grass-6.01RC2 for sun-solaris2.9.
>     Now my compilation has a few warnings then a fatal:

> /usr/ccs/bin/ld -G -z text -o /scratch/grass6/grass-6.0.1RC2/dist.sparc-sun-solaris2.9/lib/libgrass_gis.6.0.1RC2.so
> -L/scratch/grass6/grass-6.0.1RC2/dist.sparc-sun-solaris2.9/lib    OBJ.sparc-sun-solaris2.9/adj_cellhd.o OBJ.sparc-sun-solaris2.9/align_window.o
[snip]
> -lgrass_datetime  && ln -f -s libgrass_gis.6.0.1RC2.so /scratch/grass6/grass-6.0.1RC2/dist.sparc-sun-solaris2.9/lib/libgrass_gis.so
> Text relocation remains                         referenced
>     against symbol                  offset      in file
> <unknown>                           0x40        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x4c        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x58        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x64        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x70        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x7c        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x88        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x94        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0xa0        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0xac        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1420      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x14e4      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1560      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1654      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1a04      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1b5c      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1ecc      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_flush_block                     0x1f98      /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> _tr_init                            0x4d0       /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> inflate_codes                       0xf2c       /afs/isis/pkg/zlib-114/lib/libz.a(infblock.o)
> <unknown>                           0x40        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> <unknown>                           0x44        /afs/isis/pkg/zlib-114/lib/libz.a(deflate.o)
> ...
> ...
> ...
> ld: fatal: relocations remain against allocatable but non-writable sections
> make[2]: *** [/scratch/grass6/grass-6.0.1RC2/dist.sparc-sun-solaris2.9/lib/libgrass_gis.6.0.1RC2.so] Error 1

The build system is trying to link libgis against libz, but libz is a
static library which contains non-relocatable code and thus cannot be
linked into a shared library.

The preferred fix is to force the use of a shared version of libz. I
have no idea where the linking command is getting the
/afs/isis/pkg/zlib-114/lib path from; it doesn't appear in the link
command.

Alternatively, try removing $(XDRLIB) from the definition of
EXTRA_LIBS at the top of lib/gis/Makefile (you may have to do the same
for other libraries).

Note that this will result in a static copy of zlib being linked into
every executable, which will increase the amount of disk space which
the GRASS installation requires.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list