Compiling GRASS on Solaris 2.5.1

Clifton Wood cbwood at vt.edu
Fri Jul 24 15:53:38 EDT 1998


Bruce J Nielsen wrote:
> 
> I've been trying to compile the MAPGEN package for Solaris 2.5.1,
> but have been getting a couple errors I can't figure out.

Hey, Bruce!! It will be difficult to tell what is actually wrong without
a copy of your header file, but I'll try my best here.

> 1. When compiling nrcs/psu.tool/is_user I get the following message:
> 
>   SRC     = /data.gis/src421/src
>   CMD     = /data.gis/src421/src/CMD
>   HEADER  = solaris
>   ARCH    = solaris2.5.1
>   GISBASE = /export/home/grass4.2.1
>   VERSION = 4.2.1 V.18 - July 1998
> #################################################################
> /data.gis/src421/src.related/mapgen_6.25/nrcs/psu.tool
>   make -f OBJ.solaris2.5.1/make.rules
> 
> gcc -o /export/home/grass4.2.1/is_user OBJ.solaris2.5.1/is_user.o
> -Wl,-Bstatic -I../include ../libes/LIB.solaris2.5.1/gmaplib.a
> /data.gis/src421/src/libes/LIB.solaris2.5.1/libdisplay.a
> /data.gis/src421/src/libes/LIB.solaris2.5.1/libraster.a
> /data.gis/src421/src/libes/LIB.solaris2.5.1/libgis.a -lm -lm
> Undefined                       first referenced
>  symbol                             in file
> dlclose                             /usr/lib/libc.a(nss_deffinder.o)
> dlsym                               /usr/lib/libc.a(nss_deffinder.o)
> dlopen                              /usr/lib/libc.a(nss_deffinder.o)
> ld: fatal: Symbol referencing errors. No output written to
> /export/home/grass4.2.1/is_user
> make: *** [/export/home/grass4.2.1/is_user] Error 1

This looks like is_user needs to be linked against libdl.a, just include 
a "-ldl" in the linking commandline. Probably the best way to do that is
to add that to the end of the LDFLAGS variable in your header file.

> 2. Then later on when compiling xzoom2, this occurs (there was more
>    above, but this was as much as I could grab):
> 
> gcc -s -o /export/home/grass4.2.1/mapgen/bin/xzoom
> OBJ.solaris2.5.1/xzoom.o OBJ.solaris2.5.1/command.o
> OBJ.solaris2.5.1/gr.o OBJ.solaris2.5.1/link_mg.o
> ../../lib/LIB.solaris2.5.1/libgen.a -lXaw -lXmu  -lXext  -lm
> ld: warning: symbol `list' has differing sizes:
>         (file OBJ.solaris2.5.1/xzoom.o value=0x130; file
> OBJ.solaris2.5.1/command.o value=0x10);
>         OBJ.solaris2.5.1/xzoom.o definition taken
>
> [ ... rest deleted for space... ]

Your header file should have something similar to the following in it:

XCFLAGS             = -D_NO_PROTO
XLDFLAGS            =
XINCPATH            =
XMINCPATH           = -I/usr/dt/include
XLIBPATH            = -L/usr/openwin/lib
XTLIBPATH           = -L/usr/openwin/lib
XMLIBPATH           = -L/usr/dt/lib
XLIB                = -lX11
XTLIB               = -lXt
XMLIB               = -lXm
XEXTRALIBS          =

Once you make these changes, you should be able to try all of these
programs again by editing the necessary list files and running
gmake again...

If you are still having problems, I can send you my header file
which I used to get a stable build of XGrass on (which includes 
xzoom)... I haven't touched MAPGEN, though....


							- Cliff 
-- 
============================================================
Clifton B. Wood
Programmer/Analyst for Virginia Tech's AGNIS Department
-------------------- Thought of the Day --------------------
windows95 = n.  32 bit extensions and a graphical shell for
a 16 bit patch to an 8 bit operating system originally coded
for a 4 bit microprocessor, written by a 2 bit company that 
can't stand 1 bit of competition.



More information about the grass-user mailing list