Peter Sincak wrote:

> I am just trying to make xgrass - almost passed only on the end 
> of the procedure - it comes the missing of the following :
> when I am building xgrass - the last stage 
> 
> Unresolved symbols still remain.
> 
> symbol		referenced in
> _WEXITSTATUS       /dd2g/sincak/grass4.1/grass4.1beta/src/xgrass/libes/
>                     LIB.convex/libXgi.a(system.o)
> 
> ld: ERROR - incomplete load
> ld: No executable produced.
> 
> -------
> well - I understand it that WEXITSTATUS - I miss - I suppose that it 
> is a matter of UNIX (CONVEXOS 10.1) not grass & probably from X-area.
> Can anybody 
> help me where I can find this procedure ? ?
> 
>   ------------------------------------------------------------------ 
>   Peter Sincak, Ph.D.                                                     
>   Kosice, Technical University of Kosice, Slovakia - Central Europe 
>   Department of technical Cybernetic & Artificial Inteligence 
>   sincak@ccsun.tuke.cs  FAX: 0042-95-32748 Voice: 0042-95-57864
>   ------------------------------------------------------------------

I had trouble with WEXITSTATUS while compiling xgrass for an RS6000.

I'm way over my head, here, but this is what I figured out:

   Caveat:  I managed to get Xgrass to compile, on my RS6000, but 
   it doesn't run properly.  I'm not much of a UNIX programmer,
   these are just my observations, and they might be faulty.
   HAS ANYONE GOTTEN XGRASS TO WORK ON AN RS6000?

WEXITSTATUS(x)
is a macro defined in the standard include file sys/wait.h, and on
the RS6000 it is redefined in sys/m_wait.h if you use the BSD compile
options.  In the Xgrass source code (or is it with the grass src/include
files) there is an include file called std_incs.h.  It #includes wait.h,
which may or may not #include m_wait.h depending on how your computer 
tries to deal with the many flavours of UNIX incompatibility.

The incompatibility seems to be that some versions of UNIX have a 
variable "status" defined as an integer, and some define it as a 
union.  How WEXITSTATUS is defined depends on how "status" is defined.
WEXITSTATUS is a macro that returns a value based on the value of 
"status".  Here is what it looks like, from the m_wait.h of an RS6000. 
Here status is a union, and it is the variable x in the macro below.
This is the BSD format, apparently.

/* evaluates to the low-order 8 bits of the child exit status	*/
#define	WEXITSTATUS(x)	(int)(WIFEXITED(x) ? (((x).w_status >> 8) & 0xff) : -1)


If your computer uses POSIX, then (I gather, from the include files) the
variable status is an integer, and the macro WEXITSTATUS will look like
this:  (from sys/wait.h of an RS6000)

/* evaluates to the low-order 8 bits of the child exit status	*/
#define	WEXITSTATUS(x)	(int)(WIFEXITED(x) ? (((x) >> 8) & 0xff) : -1)

So, you might be able to define one or the other in the offending C
file: I think it is probably system.c in Xgi or Xgl.

Tim.

 ---------------------------------------------------------------
  Tim Martin                     *    Canada, yes.  Mexico, yes.
  Spatial Information Systems    *    But in that little gap
  University of Alberta          *    in between, zippo.
  martin@ulysses.sis.ualberta.ca *                  - Bob Geldof
 ---------------------------------------------------------------


