[winGRASS] libG11

Andreas Lange Andreas.Lange at Rhein-Main.de
Wed Oct 3 17:24:42 EDT 2001

Hi all,

while i am not able to work on this in the next days i'll just write
what i remember from looking into this some time ago.

Markus Neteler wrote:
> Hi all,
> Roberto flor and me did some tests with NVIZ. Following situation
> we have:
>  - tcl/tk 8.0 is already present in cygwin (latest)
>    [don't install the xtcltk package from grass-server!]
>    this version contains some path problems, see below.

The cygtcl/cygtk30/cygitkwish80 etc. has some problems beside the path
problems. I started updating tcltkgrass for this, but gave up. I
searched the web and the mailing lists, but never found that someone is
actively maintaining/working on this (cygwin version of tcl/tk). 

>  - we did some NVIZ hacking to include missing header files,
>    fixed two general include problems and a missing definition
>    in Xlib.h (libG11). NVIZ now compiles! we had to remove from Gmakefile.in
>    the references to -lXmu -lXext, they should arrive through configure on
>    $(XEXTRALIBS) for non windows platforms.  We added some files from tlctk
>    sources on windows and flagged some part of togl.c code for X11 only
>    We have fixed the togl.c and the missing files in CVS already.

I could compile NVIZ several times by hacking the Gmakefiles, but i
don't think that a usable version will result from this.
We have to decide if we want:
- a NIVZ version working from the XFree86 Server (no idea if this is
- a NIVZ version working for the native Windows API/OpenGL. But that
will mean to make tcl/tk and togl compile with gcc and the native
Windows API, which to my knowlegde no one did until now.

I don't think that it will be possible to compile wish, togl and NIVZ
with the libG11 library. That will not work IMHO.  

I am in contact with someone who tried to compile togl with the latest
tcl/tk and MS Visual C++ 6.0, but did not succeed too (due to problems
with togl 1.5 IMHO). 

>    Glynn, may I ask you to look into the configure problem related
>    to -lXmu -lXext?
>    Again, when manually changing the Gnakefile, NVIZ now compiles without
>    libG11. It pops up a window for a few seconds (see other tcl/tk problems
>    below).
>  - other change for configure:
>         under win32/cygwin we need in head
>         OPEGLLIB           = -lopengl32
>         OPENGLULIB         = -lgdi32 -lglu32
>    It could be useful to remove also -lX11 from head, putting it back
>    just on the Gmakefile for Xdriver, the only point where we need X11
>    on win32 compilation.
>  - Problem: the tcl/tk does not support cygwin-paths properly,
>    see CYGWIN-FAQ here:
>    http://www.cygwin.com/faq/faq_4.html#SEC65
>    This means that neither tcltkgrass nor NVIZ will work since
>    the code is spreaded within several directories.
>    A solution is to use the TCL_LIBRARY variable, but we are unable
>    to define multiple paths here, since you have to define the
>    driver number ("c:") as well, but ":" is also the path separator...
>    Tomorrow (?) we'll try to rebuild the tcl/tk.

This was the reason that i compiled my own version of tcl/tk for GRASS.

>  - tcltkgrass: if the multiple path problem would be fixed (CYGWIN-FAQ),
>    it may run ...

I had a partly working tcltkgrass with cygwish, I'll look if i find the
tarball and send it. But there was a bunch of other problems related to
the differences between cygwin and UNIX (e. g. missing /dev/null,
xterm). This is not to refrain you from working on this, but we should
not rise the expectations too high. 
I would be interested in how we can adapt tcltkgrass without makeing two
completely different version. This would make updating/fixing tcltkgrass
very hard.

Generally i would personally prefer if we fix the known problems with
the "winGRASS" port for XFree86/StarNet and publish GRASS5.0.0 ASAP.
This would not hinder the libG11 porting, but we could publish a
"product" in a reasonable timeframe. YMMV. 


Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
url: http://mitglied.tripod.de/AndreasLange
mail: Andreas.Lange_at_Rhein-Main.de - A.C.Lange_at_GMX.net

More information about the grass-windows mailing list