Solaris compilation / reprise

Ronald Thomas ront at niwot.CFNR.ColoState.EDU
Mon Aug 23 15:19:07 EDT 1993

Thanks, Jim, for looking things over and getting back to me;  I don't feel
so alone out in the wilderness!!  And thank you, Darrell, for joining in
the discussion and offering advice!!

Let's see, yes, I am using Openwindows to drive my graphics.  I'm going 
to add some of the compiler flags that you used to see if it gives me 
a "better" XDRIVER.

I'm in over my head with much of the 'C' stuff, I just try to decipher the
error messages when a compilation bombs out, I never know exactly what I'm
doing.  That's what led me to the problem with the gcc include file
'limits.h'  The specifics of what I did are in item #1, following my
signature block.  

This was the first time I had heard that mapgen4.1 was not working, even if
it compiles.  So I guess all my adjustments that are listed are for naught,
but they are included also.  I hope I didn't screw up my existing dig_geo,
etc.,  files by trying to use  the new mapgen.

^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^
   Ronald Thomas                         ^  ront at
    Natural Resources Spec. (GIS)        ^  
     Resources Management Division       ^   Phone: 303-586-3565  x285
      Rocky Mountain National Park       ^          700-323-7285  (FTS)
       Estes Park, CO  80517             ^   FAX:   303-586-4702
^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^

Adjustments made in order to compile GRASS4.1
under Solaris 2.2 using GNU gcc 2.4.5 as the compiler.
1)  In /../gnu/lib/gcc-lib/sparc-sun-solaris2/2.4.5/include/limits.h:
	Comment out line 11:
was    #include <syslimits.h>
now   /* #include <syslimits.h> */

(GNU gcc limits.h points to a non-existent <syslimits.h> file; it causes some 
src.alpha and portions of MAPGEN to bomb out during compilation.)
(advice from comp.unix.solaris and personal experience)

2)  In src/mapdev/diglib/dig_macros.h:
	uncomment the ABS(x) macro on line 11: 
was /* #define ABS(x)	   ((x) < 0 ? -(x) : (x)) */
now    #define ABS(x)	   ((x) < 0 ? -(x) : (x)) 
(advice from Jim Pirzyk)

3)  In /src/CMD/head/<arch>:
	make sure that the flag "-DUSE_TERMIO" is set ;
		ie :  USE_TERMIO       =  -DUSE_TERMIO
(advice from Pirzyk, McCauley,

4)  To compile src.related/mapgen
	a) in ../mapgen/graphics/fonts/Makefonts:

		change "cc" to "gcc"

	b) as root; cd to  /usr/ccs/bin and do:
		ln -s /usr/ucb ucbcc

(this creates a link to /usr/ucb that is looked for and can't be 
found otherwise)

	c) in ../mapgen/SCS/
	on line 80, change "PEN == NULL" to "PEN == 0.0"

	d) add 2 lines to src.related/mapgen/Gmakefile

$(MAPGEN_BIN)/get_angle soilsquad
        mkdir ${GRAPH}/etc/soilsquad               <------------- add this
        mkdir ${GRAPH}/etc/soilsquad/misc          <------------- and this
        cp make.soilquad $(MAPGEN_BIN)/make.soilquad

	e) manually copy /../mapgen/SCS/psu_tool  to 
same for scripts psu.clean and tiger_tool into /<wherever>/grass4.1/scripts
(advice from NPS-WASO-GIS & personal experience)

5)  To compile, comment out the ABS(x) reference at the very
	end of src.contrib/SCS/vector/

ABS (x)
	if (x < 0) x = -x;
	return x;
(This is in addition to the other changes to that were made to
make it work correctly under GRASS4.0).

More information about the grass-user mailing list