compiling xgrass libraries

Michael Hanratty hanra001 at gold.tc.umn.edu
Thu Feb 13 13:54:38 EST 1997


The fix that the Jazz Man suggested worked fine, but I ran into other problems 
with Motif libraries that were different than those described below.  I decided 
to forget about xgrass.  I don't really need it for what I'm doing.

Thanks for the help.

Mike


In message <9702050939.ZM5663 at impact1.hpcc.nectec.or.th>  writes:
> Michael
> 
> On Feb 4,  2:38pm, Michael Hanratty wrote:
> > I'm having troubles compiling the xgrass libraries.  I'm using
> >
> > gcc -ansi -O (plus include paths)
> >
> > for my compiler options.  In the file $GISBASE/src/include/MatrixP.h it has
> > trouble parsing the structure on lines 253-257 and 416-418.
> 
> I ran into the same problem and this error is due to your version of Motif. 
> The
> structures that you reference are from Motif 1.1 and are no longer supported.
> However, OSF did include a section in the XmP.h file that provides for 
> backward
> compatibility. The following is the fix I used for this compile error from my
> GRASS compilation history file:
> 
> 	Fix: These errors were caused by the fact that the current
> 	version of Motif is 1.2. This code was written before the
> 	release of Motif 1.2 and some of the symbols of Motif 1.1 are
> 	no longer used. The code in "$GIS/src/xgrass/libes/Xgi/Matrix.c"
> 	requires some of these old symbols to be defined, therefore, the
> 	following lines of code were added to both "$GIS/src/include/MatrixP.h"
> 	and "$GIS/src/xgrass/libes/Xgi/Matrix.c" to define the required
> 	pre-processor variable.
> 	    #ifndef XM_1_1_BC
> 	    #define XM_1_1_BC
> 	    #endif
> 	Note that these lines were added at the top of the files so
> 	that they would be the first commands executed (before the includes).
> 
> As you can see, the version of Motif that our SGI uses is still Motif 1.2. If
> you have a different version, you should check your version of the XmP.h file
> (found in usr/include/Xm on my machine) to see if there is a section which is
> dependent on the definition of XM_1_1_BC (i.e. there is a line like "#ifdef
> XM_1_1_BC" in the file). If this section exists then the above fix should 
> work.
> The same problem will exist for $GIS/src/xgrass/libes/Xgi/Caption.c and the
> same fix should work using the "Caption.c" file and the
> "$GIS/src/include/CaptionP.h" file.
> 
> You should also be aware that xgrass will not compile with Motif 2.0 and 
> above.
> We found that xgrass uses functions that no longer exist in Motif 2.0. The 
> only
> fix that was found for this was taking declarations of the functions from a
> previous version of Motif and copying them into a header file used by the
> source files that referenced the old Motif functions. OSF informed me that 
> the
> definitions of the functions still exist in the library but they removed the
> declarations from the header files. Unfortunately, we didn't get a chance to
> test this fix (priorities got changed and we had GRASS running on our SGI
> already) so I'm not sure if it will work. The greater concern is what to do
> with xgrass when OSF removes the functions from the Motif library.
> 
> I hope this helps.
> 
> -- 
> Sincerely,
> 
> Jazzman (a.k.a. Justin Hickey)  e-mail: jhickey at hpcc.nectec.or.th
> High Performance Computing Center
> National Electronics and Computer Technology Center (NECTEC)
> Bangkok, Thailand
> ==================================================================
> People who think they know everything are very irritating to those
> of us who do.  ---Anonymous
> 
> Jazz and Trek Rule!!!
> ==================================================================


Michael Hanratty                           Phone: (612) 627-4590
St. Anthony Falls Laboratory               Fax: (612) 627-4609
Dept. of Civil Engineering
University of Minnesota
Minneapolis, MN 55414



More information about the grass-user mailing list