[GRASSLIST:1411] compiling GRASS with tcl8.4

Hello,

(sorry if you received this mail a few times - I already tried it several
times to send the mail on the list, but it neither appeared in the archive
nor did I receive my own mail or any responses - but anyway, that's what I
wanted to ask.....)

I compiled the GRASS source 5.0.2

./configure --with-gdal --without-gd

it stopps with the message:

checking for png_read_image in -lpng... yes
checking whether to use GD... no
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... no
configure: error: *** Unable to locate Tcl includes.

but I have tcl8.4 installed
baliola@diomedea:~$ dpkg -s tcl8.4
Package: tcl8.4
Status: install ok installed
Priority: optional
Section: interpreters
Installed-Size: 3036
Maintainer: Chris Waters <xtifr@debian.org>
Version: 8.4.3-3
Provides: tclsh
Depends: libc6 (>= 2.3.1-1)
Suggests: tclreadline
Conflicts: tcl, tcl74 (<= 7.4p3-2)
Description: Tcl (the Tool Command Language) v8.4 - run-time files
Tcl is a powerful, easy to use, embeddable, cross-platform interpreted
scripting language. This package contains everything you need to run
Tcl scripts and Tcl-enabled apps. This version includes thread support.

why does GRASS not recognize tcl?

--without-tcl ends as well in the same output as inserted above.

any idea? thanks in advance cheers martin

P.S.: I want to use the r.series.diff patch provided by glynn clements and did
patch<r.series.diff - I don't have to do --with-..., do I? It should be
compiled automatically, am I right?

Martin Wegmann wrote:

(sorry if you received this mail a few times - I already tried it several
times to send the mail on the list, but it neither appeared in the archive
nor did I receive my own mail or any responses - but anyway, that's what I
wanted to ask.....)

I compiled the GRASS source 5.0.2

./configure --with-gdal --without-gd

it stopps with the message:

checking for png_read_image in -lpng... yes
checking whether to use GD... no
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... no
configure: error: *** Unable to locate Tcl includes.

but I have tcl8.4 installed

[snip]

why does GRASS not recognize tcl?

You probably need to use --with-tcltk-includes=... (and possibly
--with-tcltk-libs=... as well).

If it isn't in the compiler's default include path (typically
/usr/include and /usr/local/include), you have to tell configure where
to find it.

--without-tcl ends as well in the same output as inserted above.

There isn't a --without-tcl switch, although there is a
--without-tcltk switch (configure silently ignores invalid --with-*
switches).

P.S.: I want to use the r.series.diff patch provided by glynn clements and did
patch<r.series.diff - I don't have to do --with-..., do I?

No.

It should be compiled automatically, am I right?

No; you need to compile r.series explicitly with gmake5, i.e. either:

  gmake5 -i src/raster/r.series

from the top of the GRASS source tree, or just:

  gmake5 -i

from within the src/raster/r.series subdirectory itself. Then you need
to run "gmakelinks5 -i" to generate the links in the bin directory
(e.g. /usr/local/grass5/bin).

Running "make" only compiles the directories which are listed in
src/CMD/lists/GRASS or src/CMD/lists/optional (the latter is generated
from src/CMD/lists/optional.in by configure).

Modules which are considered experimental (which currently includes
r.series) or modules with significant bugs aren't included in these
lists, so you have to compile them separately with gmake5.

Alternatively, you can just modify src/CMD/lists/GRASS so that the
directory is built automatically when running "make".

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

Hello,

I compiled the GRASS source 5.0.2 but it stopps after:

./configure --with-gdal --without-gd --with-tcltk-includes=/usr/include/tcl8.4
-with-PostgreSQL-includes=/usr/include/postgresql

hecking Tk version... 8.4
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl8.4... yes
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk8.4... yes
checking whether to use PostgreSQL... yes
checking for location of PostgreSQL includes...
checking for libpq-fe.h... no
configure: error: *** Unable to locate PostgreSQL includes.

but the path is correct, find prompts that:
baliola@diomedea: $ find /usr -name libpq-fe.h
/usr/include/postgresql/libpq-fe.h

--without-PostrgreSQL does not help either.

any idea? thanks Martin

Martin Wegmann wrote:

I compiled the GRASS source 5.0.2 but it stopps after:

./configure --with-gdal --without-gd --with-tcltk-includes=/usr/include/tcl8.4
-with-PostgreSQL-includes=/usr/include/postgresql

hecking Tk version... 8.4
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl... no
checking for Tcl_Init in -ltcl8.4... yes
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk8.4... yes
checking whether to use PostgreSQL... yes
checking for location of PostgreSQL includes...
checking for libpq-fe.h... no
configure: error: *** Unable to locate PostgreSQL includes.

but the path is correct, find prompts that:
baliola@diomedea: $ find /usr -name libpq-fe.h
/usr/include/postgresql/libpq-fe.h

It should be:

  --with-postgres-includes=/usr/include/postgresql

Two leading dashes, all lower-case, no "ql" (just "postgres", not
"postgresql").

Running "configure --help" will list all of the switches which
configure understands.

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

(sorry if you received this mail a few times - I already tried it
several times to send the mail on the list, but it neither appeared in
the archive nor did I receive my own mail or any responses - but
anyway, that's what I wanted to ask.....)

Anyone else having trouble sending?

I compiled the GRASS source 5.0.2

./configure --with-gdal --without-gd

it stopps with the message:

checking for png_read_image in -lpng... yes
checking whether to use GD... no
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... no
configure: error: *** Unable to locate Tcl includes.

but I have tcl8.4 installed
baliola@diomedea:~$ dpkg -s tcl8.4

...

any idea? thanks in advance cheers martin

Some general hints on getting GRASS installed on a Debian system follow.

Config line for intel PIII:

CFLAGS="-O3 -march=i686 -Wall" LDFLAGS="-s" ./configure \
        --with-tcltk-includes=/usr/include/tcl8.4 \
        --with-postgres-includes=/usr/include/postgresql \
        --with-motif --with-motif-includes=/usr/X11R6/include \
        --with-freetype --with-freetype-includes=/usr/include/freetype2 \
        --with-blas --with-blas-libs=/usr/lib/gcc-lib/i386-linux/3.0.4 \
        --with-lapack \
        --with-glw \
        --with-readline \
        2>&1 | tee config_log.txt

$> make
#> make install

Packages needed for compile:
(give or take a few, the list is slightly outdated)

apt-file was used for most of this discovery. It's very handy.

.deb Package Provides..
---------------------------------
libncurses5-dev curses.h
zlib1g-dev zip fn's
libjpegb2-dev \
libtiff3g-dev |- graphics
# superseded libpng2-dev /
libpng-dev /
# superseded libgd-dev gif/png support
libgd2-dev gif/png support

# no longer exists task-tcltk-dev Tcl/Tk widgets 8.3
tcl8.3-dev
tk8.3-dev Tcl/Tk 8.3 development files. As of 5.0.0, Tk8.4 breaks NVIZ
# tc8.4-dev
# tk8.4-dev Tcl/Tk 8.4 Development Files. Depends on needed Tcl bits.
fftw-dev FFT Libraries

postgresql-dev PostgreSQL
libsqlxx-dev ODBC ? conflicts with unixodbc-dev?
libgdbm-dev DBM (Use libgdbmg1-dev for Woody)
unixodbc-dev ODBC
libfreetype6-dev Freetype
libmotif-dev Motif
blas-dev BLAS math library
lapack-dev LAPACK math library
g77-3.0 for BLAS (& lapack as well??)
f2c for BLAS (libf2c) unneeded?

gotchas:

GRASS 5.0.2 needs Tcl/Tk 8.3 for NVIZ. The upcoming 5.0.3 should
handle 8.4 ok.

but...
The upcoming GRASS 5.0.3 with Tcl/Tk8.4 on a Debian system requries a
slight change to keep NVIZ from locking up on startup. Add "-lpthread"
to the end of the XTRA_LDFLAGS line in src.contrib/GMSL/NVIZ2.2/src/Gmakefile.

see this thread:
http://article.gmane.org/gmane.comp.gis.grass.devel/2026

good luck,
Hamish