[GRASS5] [bug #1664] (grass) error during compilation of SG3d module

this bug's URL: http://intevation.de/rt/webrt?serial_num=1664
-------------------------------------------------------------------------

Subject: error during compilation of SG3d module

Platform: Irix
grass binary for platform: Compiled from Sources
GRASS Version: grass5.0.0 (August 2002)

My Name : Ambili Sudhi

Error Description :

I am unable to install it.
working on an SGI IRIX6.5 machine.
First I have run the commands :

src.contrib/CERL/SGI/panel/9.6/src/make

and

src.contrib/CERL/SGI/libimage/make

they are working fine however while running the command gmake5 in the SG3d
module a whole lot of errors come up "some" of which are as follows:

----------------- SG3d ---------------

amit 12:56pm <~/GRASS/grass-5.0.0/src.contrib/GMSL/SG3d> :: gmake5
   SRC = /usr/people/amit/GRASS/grass-5.0.0/src
   CMD = /usr/people/amit/GRASS/grass-5.0.0/src/CMD
   UNUSED = /usr/people/amit/GRASS/grass-5.0.0/unused
   HEADER = head.mips-sgi-irix6.5
   ARCH = mips-sgi-irix6.5
   GISBASE = /usr/people/amit/GRASS/grass-5.0.0/dist.mips-sgi-irix6.5
   VERSION = 5.0.0 August 2002
#################################################################
/usr/people/amit/GRASS/grass-5.0.0/src.contrib/GMSL/SG3d
   make -f OBJ.mips-sgi-irix6.5/make.rules

         /usr/freeware/bin/gcc
-I/usr/people/amit/GRASS/grass-5.0.0/src/include -g -O2
-I/usr/people/amit/GRASS/grass-5.0.0/src/../src.contrib/CERL/SGI/panel/9.6/include
-DVERSION_NUMBER=\"\\\"5.0.0\\\"\" -c main.c -o
OBJ.mips-sgi-irix6.5/main.o
In file included from externs.h:41,
                  from main.c:16:

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:28:8:
warning: extra tokens at end of #else directive

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:35:8:
warning: extra tokens at end of #endif directive

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:36:8:
warning: extra tokens at end of #endif directive
In file included from externs.h:41,
                  from main.c:16:

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:73:8:
warning: extra tokens at end of #else directive

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:80:8:
warning: extra tokens at end of #endif directive

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:98:9:
warning: extra tokens at end of #endif directive
In file included from externs.h:41,
                  from main.c:16:

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:368:
parse error before \"pnl_white_color\"

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:368:
warning: data definition has no type or storage class

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:369:
parse error before \"pnl_bevel_light_color\"

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:369:
warning: data definition has no type or storage class

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:370:
parse error before \"pnl_normal_color\"

/usr/people/amit/GRASS/grass-5.0.0/src.contrib/CERL/SGI/panel/9.6/include/panel.h:370:
warning: data definition has no type or storage class

In file included from main.c:16:
externs.h:267: parse error before \"top\"
externs.h:267: warning: data definition has no type or storage class
externs.h:307: parse error before \"Ccolori\"
externs.h:307: warning: data definition has no type or storage class
externs.h:314: parse error before \'*\' token
externs.h:314: warning: data definition has no type or storage class
externs.h:315: parse error before \'*\' token
externs.h:315: warning: data definition has no type or storage class

In file included from main.c:16:
externs.h:382: parse error before \"ID_matrix\"
externs.h:383: warning: excess elements in scalar initializer
externs.h:383: warning: (near initialization for `ID_matrix\')
externs.h:383: warning: excess elements in scalar initializer
externs.h:383: warning: (near initialization for `ID_matrix\')
externs.h:383: warning: excess elements in scalar initializer
externs.h:383: warning: (near initialization for `ID_matrix\')
externs.h:384: warning: excess elements in scalar initializer
externs.h:384: warning: (near initialization for `ID_matrix\')
externs.h:384: warning: excess elements in scalar initializer
externs.h:384: warning: (near initialization for `ID_matrix\')

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=1664
-------------------------------------------------------------------------

Subject: error during compilation of SG3d module

Platform: Irix
grass binary for platform: Compiled from Sources
GRASS Version: grass5.0.0 (August 2002)

My Name : Ambili Sudhi

Error Description :

I am unable to install it.
working on an SGI IRIX6.5 machine.
First I have run the commands :

src.contrib/CERL/SGI/panel/9.6/src/make

and

src.contrib/CERL/SGI/libimage/make

they are working fine however while running the command gmake5 in the SG3d
module a whole lot of errors come up "some" of which are as follows:

I suspect that you need to change line 40 of
src.contrib/GMSL/SG3d/externs.h from:

  #include <GL/gl.h>
to:
  #include <gl.h>

SG3d uses IrisGL, not OpenGL.

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

Note that the IRIX binaries on the GRASS website include SG3d. I had to
make some local modifications to get it to compile. When I have time
later on I will have a look at putting those into CVS.

Changing GL/gl.h to gl/gl.h will also work (gl.h is a symlink to gl/gl.h),
and you need to add #include "site.h" to some files; that is all I can
remember off-hand but I will try and fix it later.

I don't think you have to compile libimage; all recent versions of IRIX
include it anyway. The panel library was fairly awkward to compile and
uses ordinary Makefiles, not part of the GRASS gmake5 system so it had to
be compiled separately first. I'm not sure how easy it would be to
incorporate this into the GRASS build system.

Also SG3d is currently disabled in the src/CMD/lists/GRASS compile-list.
If this was re-enabled I'm not sure how to make its compilation conditional
on being compiled on an SGI system. Hopefully it wouldn't have to involve
lots of #ifdef __sgi in the source code.

SG3d still includes a few very useful features not available in other
GRASS modules so it is worth having.

Paul Kelly

Paul Kelly wrote:

Changing GL/gl.h to gl/gl.h will also work (gl.h is a symlink to gl/gl.h),

Do you know which is the correct way to reference this header?

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

On Wed, 19 Feb 2003, Glynn Clements wrote:

Paul Kelly wrote:

> Changing GL/gl.h to gl/gl.h will also work (gl.h is a symlink to gl/gl.h),

Do you know which is the correct way to reference this header?

I'm not sure; most programs I've seen just use #include <gl.h> and seeing
this is what it was originally I've changed it back to that. I looked at
some SGI documentation on porting IRIS GL programs to Open GL and it
suggested you would have statements of the form #include <gl/gl.h>, which
needed to be changed to #include <GL/gl.h>. I would guess it was
originally just gl.h and the distinction came in when Open GL was introduced
(originally also just available on the SGI platform as far as I know).

On Wed, 19 Feb 2003, Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=1664
-------------------------------------------------------------------------

Subject: error during compilation of SG3d module

Platform: Irix
grass binary for platform: Compiled from Sources
GRASS Version: grass5.0.0 (August 2002)

My Name : Ambili Sudhi

Error Description :

I am unable to install it.
working on an SGI IRIX6.5 machine.
First I have run the commands :

src.contrib/CERL/SGI/panel/9.6/src/make

and

src.contrib/CERL/SGI/libimage/make

they are working fine however while running the command gmake5 in the SG3d
module a whole lot of errors come up "some" of which are as follows:

...

Yes these errors look like they are all caused by the wrong gl.h being
included. I have fixed it now in CVS so it should compile now.