[GRASSLIST:71] Re: More Solaris 9 problems - NVIZ

Glynn Clements glynn.clements at virgin.net
Sat May 17 12:37:25 EDT 2003


Ade Fewings wrote:

> > ISTR that the NVIZ error has already been identified, and is fixed in
> > the CVS HEAD.
> > 
> > I suspect that most of the errors are related to the projection code;
> > only 15 GRASS modules use the projection library, and 10 of them are
> > in the above list.
> > 
> > The PNGdriver error is probably related to the problems which you've
> > been having with GD.
> > 
> > We need to see the actual error messages from "make" in order to be
> > able to do anything about these problems.
> 
> Thanks for your replies.  I've had a look at the 'make' output and cut 
> out the relevant parts and they're quoted at the bottom of this mail.  
> But, the problem is the same in all cases except PNGdriver and the 
> original NVIZ problem - all to do with symbol LLC24. 

> make[2]: Entering directory 
> `/export/data0/build/grass5.0.2/src/general/g.region/cmd'
> gcc -L/export/data0/build/grass5.0.2/src/libes/LIB.sparc-sun-solaris2.9  
> -o /export/data0/build/grass5.0.2/dist.sparc-sun-solaris2.9/etc/bin/cm
> d/g.region OBJ.sparc-sun-solaris2.9/printwindow.o 
> OBJ.sparc-sun-solaris2.9/adjust.o OBJ.sparc-sun-solaris2.9/main.o 
> OBJ.sparc-sun-solaris2.9/zo
> om.o -lvect -ldig2 -lgis -lsocket  -ldatetime -lproj -lm  -lnsl    -lz
> ld: warning: relocation error: R_SPARC_32: file 
> /export/data0/build/grass5.0.2/src/libes/LIB.sparc-sun-solaris2.9/libproj.a(PJ_krovak.o): 
> symbol .LLC24:
>         external symbolic relocation against non-allocatable section .stab;
>         cannot be processed at runtime: relocation ignored

[snip]

> Undefined                       first referenced
>  symbol                             in file
> .LLC24                              /export/data0/build/grass5.0.2/src/libes/LIB.sparc-sun-solaris2.9/libproj.a(PJ_krovak.o)
> ld: fatal: Symbol referencing errors. No output written to 
> /export/data0/build/grass5.0.2/dist.sparc-sun-solaris2.9/etc/bin/cmd/g.region
> collect2: ld returned 1 exit status

That symbol isn't related to libproj; the fact that it begins with a
dot suggests something internal.

I note that all of the errors refer to PJ_krovak.o and PJ_krovakgis.o. 
The most obvious difference between these two files and all of the
others in libproj is that they include <stdio.h> and <string.h>, and
they do so after they have included "projects.h".

AFAICT, those headers are only used by some debug code which is
disabled. I suggest changing the top of each of those files from:

	#include "projects.h"
	#include <string.h>
	#include <stdio.h>

to just:

	#include "projects.h"

> make[1]: Entering directory 
> `/export/data0/build/grass5.0.2/src/display/devices/PNGdriver'
> gcc -L/export/data0/build/grass5.0.2/src/libes/LIB.sparc-sun-solaris2.9  
> -o /export/data0/build/grass5.0.2/dist.sparc-sun-solaris2.9/driver/PNG 
> OBJ.spar
> c-sun-solaris2.9/Can_do.o OBJ.sparc-sun-solaris2.9/Clr_table.o 
> OBJ.sparc-sun-solaris2.9/Color.o OBJ.sparc-sun-solaris2.9/Draw_line.o 
> OBJ.sparc-sun-solar
> is2.9/Get_w_box.o OBJ.sparc-sun-solaris2.9/Get_w_line.o 
> OBJ.sparc-sun-solaris2.9/Get_w_pnt.o 
> OBJ.sparc-sun-solaris2.9/Graph_Clse.o OBJ.sparc-sun-solaris
> 2.9/Graph_Set.o OBJ.sparc-sun-solaris2.9/Panel.o 
> OBJ.sparc-sun-solaris2.9/Polygn_abs.o -ldriver -lgis -lsocket  -lnsl    
> -lz  -lgd
> Undefined                       first referenced
>  symbol                             in file
> sin                                 

Contrary to my previous guess, this *isn't* a problem with your GD
library; the display drivers themselves need the math library (for
drawing rotated text), but the Gmakefile for PNGdriver doesn't specify
it.

In src/display/devices/PNGdriver/Gmakefile, change line 29 from

	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBES) $(XDRLIB) $(GDLIB)
to:
	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBES) $(XDRLIB) $(GDLIB) $(MATHLIB)


-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list