[GRASS5] can't start mon under WinGeneric but can under X11, again...

I've run into this problem before, only slightly different. I

d.mon stop=x0

$
./configure --without-gd --without-odbc --without-fftw --without-postgres --
without-opengl --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

GRASS is now configured for i686-pc-cygwin

  Source directory: /home/hamannj/grass/grass-5.0.3
  Build directory: /home/hamannj/grass/grass-5.0.3
  Installation directory: /usr/local/grass5
  C compiler: gcc -g -O2
  FORTRAN compiler: f77

  NVIZ: no

  X11 support: yes
  DBM support: no
  JPEG support: yes
  TIFF support: yes
  PNG support: yes
  GD support: no
  Tcl/Tk support: yes
  PostgreSQL support: no
  OpenGL(R) support: no
  ODBC support: no
  FFTW support: no
  BLAS support: no
  LAPACK support: no
  Motif support: no
  FreeType support: no
  GLw support: no
  NLS support: no
  Readline support: no

and then make...

I then ran make install and tried to run grass 5.0.3. When I attempted to
start a graphics window, I got the following:

------------------------------------------
GRASS:~ > d.mon start=x0
No socket to connect to for monitor <x0>.
Problem selecting x0. Will try once more
No socket to connect to for monitor <x0>.
GRASS:~ >

The graphics window works when I run from an X Window session, but I would
like to only run the generic build (not the X version, since this will be
run on a Windoze XP machine and having two window managers running is a bit
unsightly, but...)

Am I configuring the build correctly?

Thanks,
Jeff.

---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
(office) 541-754-1428
(cell) 541-740-5988
jeff.hamann@forestinformatics.com
www.forestinformatics.com

Jeff D. Hamann wrote:

./configure --without-gd --without-odbc --without-fftw --without-postgres --
without-opengl --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

and then make...

I then ran make install and tried to run grass 5.0.3. When I attempted to
start a graphics window, I got the following:

------------------------------------------
GRASS:~ > d.mon start=x0
No socket to connect to for monitor <x0>.
Problem selecting x0. Will try once more
No socket to connect to for monitor <x0>.
GRASS:~ >

The graphics window works when I run from an X Window session, but I would
like to only run the generic build (not the X version, since this will be
run on a Windoze XP machine and having two window managers running is a bit
unsightly, but...)

Am I configuring the build correctly?

No; you need to use --enable-w11 for the "generic" version. And
there's no point specifying --x-includes or --x-libraries in that
case.

AFAICT, you can install both the X11 and W11 ("generic") versions of
XDRIVER (obviously, they can't both be called XDRIVER.exe, so one of
them has to renamed), and modify etc/monitorcap, e.g.:

  x0:driver/XDRIVER:X-windows graphics display: \
       dev/fifo.1a dev/fifo.1b \
       ::any terminal
  x1:driver/XDRIVER:X-windows graphics display: \
       dev/fifo.2a dev/fifo.2b \
       ::any terminal
[snip]
  w0:driver/WINDRIVER:Windows graphics display: \
       dev/fifo.1a dev/fifo.1b \
       ::any terminal
  w1:driver/WINDRIVER:Windows graphics display: \
       dev/fifo.2a dev/fifo.2b \
       ::any terminal

and use e.g. "d.mon start=x0" or "d.mon start=w0" depending on which
you want to use. This won't work with anything which has the x0/x1/...
monitor names hardcoded (primarily tcltkgrass, but then tcltkgrass
only works with X in any case).

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

On Thu, Jan 22, 2004 at 03:38:36AM +0000, Glynn Clements wrote:

Jeff D. Hamann wrote:

> ./configure --without-gd --without-odbc --without-fftw --without-postgres --
> without-opengl --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

> and then make...
>
>
> I then ran make install and tried to run grass 5.0.3. When I attempted to
> start a graphics window, I got the following:
>
> ------------------------------------------
> GRASS:~ > d.mon start=x0
> No socket to connect to for monitor <x0>.
> Problem selecting x0. Will try once more
> No socket to connect to for monitor <x0>.
> GRASS:~ >
>
> The graphics window works when I run from an X Window session, but I would
> like to only run the generic build (not the X version, since this will be
> run on a Windoze XP machine and having two window managers running is a bit
> unsightly, but...)
>
> Am I configuring the build correctly?

No; you need to use --enable-w11 for the "generic" version. And
there's no point specifying --x-includes or --x-libraries in that
case.

AFAICT, you can install both the X11 and W11 ("generic") versions of
XDRIVER (obviously, they can't both be called XDRIVER.exe, so one of
them has to renamed), and modify etc/monitorcap, e.g.:

  x0:driver/XDRIVER:X-windows graphics display: \
       dev/fifo.1a dev/fifo.1b \
       ::any terminal
  x1:driver/XDRIVER:X-windows graphics display: \
       dev/fifo.2a dev/fifo.2b \
       ::any terminal
[snip]
  w0:driver/WINDRIVER:Windows graphics display: \
       dev/fifo.1a dev/fifo.1b \
       ::any terminal
  w1:driver/WINDRIVER:Windows graphics display: \
       dev/fifo.2a dev/fifo.2b \
       ::any terminal

and use e.g. "d.mon start=x0" or "d.mon start=w0" depending on which
you want to use. This won't work with anything which has the x0/x1/...
monitor names hardcoded (primarily tcltkgrass, but then tcltkgrass
only works with X in any case).

As far as I remember you additionally need to run
d.mon select=x0

(even of that error above occurs).

Markus

Glynn:

Thanks for the help. I tried you're suggestions to no avail.

When I built grass503 with the following configuration:

$
./configure --without-gd --without-odbc --without-fftw --without-postgres --
without-x --without-opengl --enable-w11

Could this be a cygwin problem, and if so how could I find out?

Jeff.

----- Original Message -----
From: "Glynn Clements" <glynn.clements@virgin.net>
To: "Jeff D. Hamann" <jeff.hamann@forestinformatics.com>
Cc: <grass5@grass.itc.it>
Sent: Wednesday, January 21, 2004 7:38 PM
Subject: Re: [GRASS5] can't start mon under WinGeneric but can under X11,
again...

Jeff D. Hamann wrote:

>

./configure --without-gd --without-odbc --without-fftw --without-postgres --

>

without-opengl --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

> and then make...
>
>
> I then ran make install and tried to run grass 5.0.3. When I attempted

to

> start a graphics window, I got the following:
>
> ------------------------------------------
> GRASS:~ > d.mon start=x0
> No socket to connect to for monitor <x0>.
> Problem selecting x0. Will try once more
> No socket to connect to for monitor <x0>.
> GRASS:~ >
>
> The graphics window works when I run from an X Window session, but I

would

> like to only run the generic build (not the X version, since this will

be

> run on a Windoze XP machine and having two window managers running is a

bit

> unsightly, but...)
>
> Am I configuring the build correctly?

No; you need to use --enable-w11 for the "generic" version. And
there's no point specifying --x-includes or --x-libraries in that
case.

AFAICT, you can install both the X11 and W11 ("generic") versions of
XDRIVER (obviously, they can't both be called XDRIVER.exe, so one of
them has to renamed), and modify etc/monitorcap, e.g.:

x0:driver/XDRIVER:X-windows graphics display: \
     dev/fifo.1a dev/fifo.1b \
     ::any terminal
x1:driver/XDRIVER:X-windows graphics display: \
     dev/fifo.2a dev/fifo.2b \
     ::any terminal
[snip]
w0:driver/WINDRIVER:Windows graphics display: \
     dev/fifo.1a dev/fifo.1b \
     ::any terminal
w1:driver/WINDRIVER:Windows graphics display: \
     dev/fifo.2a dev/fifo.2b \
     ::any terminal

and use e.g. "d.mon start=x0" or "d.mon start=w0" depending on which
you want to use. This won't work with anything which has the x0/x1/...
monitor names hardcoded (primarily tcltkgrass, but then tcltkgrass
only works with X in any case).

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

Jeff D. Hamann wrote:

Thanks for the help. I tried you're suggestions to no avail.

When I built grass503 with the following configuration:

$
./configure --without-gd --without-odbc --without-fftw --without-postgres --
without-x --without-opengl --enable-w11

With what result? No errors but no window?

Did you run "make clean" before/after re-running configure?

Could this be a cygwin problem, and if so how could I find out?

Anything which works on Linux but not on Cygwin is likely to be a
Cygwin problem in some sense.

Were there any error messages in error.log? Does driver/XDRIVER.exe
actually exist?

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

Sorry for the delay and ambigious message, been off on other tasks...

I built the config and got no errors, no window either, but no errors. So
deciding to cut my losses, I went ahead and started X Window and used GRASS
that way...

My error.log file contains the following lines:

GRASS GIS compilation log
-------------------------
Start of compilation: Fri Jan 23 00:38:36 PST 2004
Errors:
End of compilation: Fri Jan 23 01:21:43 PST 2004
DONE generating GRASS GIS binary code
Which is a good sign.

What I'm really trying to do are the following:

1. Import ASTER data (all the bands).
2. Import a shape file from the area, create a site file from the
centerpoints and perform an image classification
3. Hopefully generate a DEM from the 3N and 3B bands from the ASTER import.

I've run to at least a couple of problems:

1. Importing ASTER images is a pain. I've only been able to import the first
three bands (actually 4 since band three is the same band twice) using
r.in.bin. The other bands won't import even when I use settings from hdf2bin
and use the exact numbers for rows and columns for the other bands. That.. I
just don't get...
2. I've been able to import the shapefile without incident, but don't know
how to project from one speriod to another and from one datum to another.
The Shapefile is in UTM10, NAD27/83, CLARKE66? and project to ASTER's UTM10
WGS84 WGS84.

I would at least like to be able to import the ASTER files so I tried to
compile (successfully) and use (not so successfully) the gdal libraries.
When I compiled and tried to run r.in.gdal, I got the

GRASS:~ > gdalinfo ast_l1b.hdf
ERROR 4: `ast_l1b.hdf' not recognised as a supported file format.

GDALOpen failed - 4
`ast_l1b.hdf' not recognised as a supported file format.

GRASS:~ >

GRASS:~ > r.in.gdal ast_l1b.hdf output=aster
GBBridgeInitialize() failed to find an suitable GDAL .DLL/.so file.
The following filenames were searched for:
  o libgdal.1.1.so
  o gdal.1.0.so
  o gdal.so.1.0
  o libgdal.so.1

The following locations were searched:
  o /usr/local/grass5/lib
  o System default locations.

System default locations may be influenced by:
LD_LIBRARY_PATH = /usr/local/grass5/lib
ERROR: Unable to initialize GDAL bridge (check libgdal
       installation/LD_LIBRARY_PATH variable).
GRASS:~ >

When I built the gdal libraries, it generated a libgdal.1.1.dll, but didn't
put it in /usr/local/grass5 and the list of filesnames to search in GRASS
doesn't contain a dll extension (I'm guessing it's a documentation thing in
the code though).

I'm thinking this message just covers too much turf to resolve in one
message, so I'm hoping to solve a few of these problems as suggestions are
posted for :

1) gdal importing
2) projecting
3) using generic drivers instead of X Window

Thanks for the patience,
Jeff.

----- Original Message -----
From: "Glynn Clements" <glynn.clements@virgin.net>
To: "Jeff D. Hamann" <jeff.hamann@forestinformatics.com>
Cc: <grass5@grass.itc.it>
Sent: Thursday, January 22, 2004 6:25 PM
Subject: Re: [GRASS5] can't start mon under WinGeneric but can under X11,
again...

Jeff D. Hamann wrote:

> Thanks for the help. I tried you're suggestions to no avail.
>
> When I built grass503 with the following configuration:
>
> $
>

./configure --without-gd --without-odbc --without-fftw --without-postgres --

> without-x --without-opengl --enable-w11

With what result? No errors but no window?

Did you run "make clean" before/after re-running configure?

> Could this be a cygwin problem, and if so how could I find out?

Anything which works on Linux but not on Cygwin is likely to be a
Cygwin problem in some sense.

Were there any error messages in error.log? Does driver/XDRIVER.exe
actually exist?

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

Partial answers to the GDAL problems:

1) If you use the latest CVS version of GDAL it is much more likely to
support the HDF format you need

2) After installing GDAL, compile GRASS using the --with-gdal option. It
should then pick up the libgdal*.dll properly.
It would seem that if you don't compile GRASS using the --with-gdal
option, r.in.gdal simply will not work. --with-gdal is now the default for
both 5.3 and 5.7.

2. I've been able to import the shapefile without incident, but don't know
how to project from one speriod to another and from one datum to another.
The Shapefile is in UTM10, NAD27/83, CLARKE66? and project to ASTER's UTM10
WGS84 WGS84.

Just set up two separate locations using g.setproj and give the correct
answers to the relevant questions. If you are using 5.0.x you should give
the datum for the ASTER images as nad83, not wgs84, otherwise the datum
transformation code won't work when you are reprojecting from
nad27/clark66 using v.proj. With 5.3+ general datum transformations are
supported and you don't need to fudge it in this way (just put in wgs84).

Paul

Paul Kelly wrote:

Partial answers to the GDAL problems:

1) If you use the latest CVS version of GDAL it is much more likely to
support the HDF format you need

2) After installing GDAL, compile GRASS using the --with-gdal option. It
should then pick up the libgdal*.dll properly.
It would seem that if you don't compile GRASS using the --with-gdal
option, r.in.gdal simply will not work. --with-gdal is now the default for
both 5.3 and 5.7.

I suggest that the "bridge" code is removed altogether, and the
--with-gdal switch is changed to behave like the other --with-*
switches, i.e. --without-gdal would mean "don't build r.in.gdal".

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