[GRASS5] RE: [winGRASS] Building LIBGIS (GRASS60beta1) under MINGW

(cc grass5)

Thanks Thomas for your support and comments.
I'm not a programmer so I find it very difficult to understand how to get
this working.
If you can give me some additional hints, specially for the problem with
wait.h and its functions, I'll be very much happy.
I extend this request to the GRASS developers list, as I believe they could
contribute to this quest just with a little effort.
Thanks in advance.

Javier

-----Original Message-----
From: wingrass-admin@grass.itc.it
[mailto:wingrass-admin@grass.itc.it] On Behalf Of Mike Thomas
Sent: Tuesday, January 25, 2005 10:36 PM
To: Javier A. Yebrin
Cc: wingrass@grass.itc.it
Subject: Re: [winGRASS] Building LIBGIS (GRASS60beta1) under MINGW

Hi Javier.

Javier A. Yebrin wrote:
> Hi Glynn,
> I'm sorry but my post was not clear. When I refer to MINGW
it should be
> noted that it comprises also MSYS, which is a POSIX and Bourne shell
> environment. Of course it is not a complete environment
such as CYGWIN,
> nevertheless I was able to run the configure script. The
latter statement
> does'nt mean that then GRASS could be built... But I'll try to.
>
> What really confuses me is the fact that there are a lot of "ifdef
> MINGW32" within the GRASS code. Does this mean Grass is
expected to be
> built under MINGW?

A couple of years ago I built a Cygwin and X Windows free libgis with
MSYS and MinGW32 (and many of the other parts of GRASS too).
My plan
was to see if a pure Windows version of GRASS was feasible
and also to
bind to libgis from other languages than C/C++ - particularly Tcl and
Haskell.

As it happened I got side tracked by work on Windows GNU Common Lisp
with the aim of reviving the computer algebra system Maxima
on Windows.
  This has turned out to be a demanding project, spreading to Windows
GCL support for ACL2 and Axiom (formerly known as IBM Scratchpad) on
Windows. Unfortunately I now find myself in a position where it is
going to be difficult to back out of that work and so a
purely Windows
version of GRASS remains a dream at the moment (for me at least). I
have updated my CVS Grass source but twice in the past year!!

This is why those MINGW macros exist in libgis and why they are
languishing without support. If you check the CVS and mailing list
records you may be able to track down details of how I went
about that
work - at the time most of the issues were not difficult to overcome.

I think that a pure Windows version of GRASS would be an admirable
project; the main obstacles (when last I looked) being the
dependency on
Bourne shell driver scripts and the XDriver, both perhaps to
be replaced
with cross platform Tcl scripts and a Tcl display driver.

Cheers

Mike Thomas.

Hi Javier.

Javier A. Yebrin wrote:

(cc grass5)

Thanks Thomas for your support and comments. I'm not a programmer so I find it very difficult to understand how to get
this working. If you can give me some additional hints, specially for the problem with
wait.h and its functions, I'll be very much happy.
I extend this request to the GRASS developers list, as I believe they could
contribute to this quest just with a little effort.

Probably more so than me as I am out of touch with the current GRASS development effort.

My understanding is that "sys/wait.h" defines functions for waiting for forked processes to return. The Windows equivalent would be Windows API functions like WaitForSingleObject() or WaitForMultipleObjects() after CreateProcess(). If you wanted to use Visual C Runtime library functions to start a process and wait for it to return (as used by MinGW32) you could start processes off with the spawn family of functions with P_WAIT as the mode argument. You will need to review your particular segments of code and see what is best for you there.

To get more information on the above functions google for strings like "msdn spawn functions" and you will get straight to the official Microsoft MSDN documentation including examples.

Cheers

Mike Thomas.

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 2005-01-25

Javier A. Yebrin wrote:

Thanks Thomas for your support and comments.
I'm not a programmer so I find it very difficult to understand how to get
this working.
If you can give me some additional hints, specially for the problem with
wait.h and its functions, I'll be very much happy.
I extend this request to the GRASS developers list, as I believe they could
contribute to this quest just with a little effort.

The code which uses sys/wait.h is currently unused. You can disable
compilation of it by removing spawn.o from the definition of LIB_OBJS
in lib/gis/Makefile. That will get over that particular problem.
However, you may well run into similar problems building code which is
actually used.

--
Glynn Clements <glynn@gclements.plus.com>