[GRASSLIST:3384] Compile Error-Tcl Problem?

I'm trying to build Grass 5.7 from cvs on a newly installed debian sarge i386
system. I may still be missing some pieces of the puzzle, since this is the
first attempted build of anything on this system, and I had to install a
number of *-dev and other packages to get through ./configure. For Tcl, I
have installed packages:

tcl8.0
tcl8.3
tcl8.4
tcl8.0-dev
tcl8.4-dev

Tcl/Tk related configure output:

checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.0
checking Tk version... 8.0
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.0... yes
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk... no
checking for Tk_MainWindow in -ltk8.0... yes

I then did:

$ make mix
$ make

Here are the errors:

grass51/lib/form/form.c:204: undefined reference to `Tcl_GetEncoding'
grass51/lib/form/form.c:204: undefined reference to `Tcl_UtfToExternal'
grass51/lib/form/form.c:323: undefined reference to `Tcl_GetEncoding'
grass51/lib/form/form.c:323: undefined reference to `Tcl_ExternalToUtf'
grass51/lib/form/form.c:329: undefined reference to `Tcl_SetSystemEncoding'

I know that there is a 5.03 binary package for debian. I installed it, but it
threw the infamous NVIZ segfault. I have built Grass from source on other
systems.

Any ideas?

--
Carl Brown
Whitefield, NH USA
-----

Carl Brown wrote:

I'm trying to build Grass 5.7 from cvs on a newly installed debian sarge i386
system. I may still be missing some pieces of the puzzle, since this is the
first attempted build of anything on this system, and I had to install a
number of *-dev and other packages to get through ./configure. For Tcl, I
have installed packages:

tcl8.0
tcl8.3
tcl8.4
tcl8.0-dev
tcl8.4-dev

Here are the errors:

grass51/lib/form/form.c:204: undefined reference to `Tcl_GetEncoding'
grass51/lib/form/form.c:204: undefined reference to `Tcl_UtfToExternal'
grass51/lib/form/form.c:323: undefined reference to `Tcl_GetEncoding'
grass51/lib/form/form.c:323: undefined reference to `Tcl_ExternalToUtf'
grass51/lib/form/form.c:329: undefined reference to `Tcl_SetSystemEncoding'

AFAIK, that code requires Tcl/Tk 8.4, but you are using 8.0 (i.e. the
tcl.h header which configure located is the 8.0 version).

You will need to ensure that the tcl.h and tk.h which configure finds
are the 8.4 versions. The simplest solution would probably be to
uninstall the tcl8.0-dev package (and probably the corresponding
tk8.0-dev package).

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

I'm trying to build Grass 5.7 from cvs on a newly installed debian
sarge i386 system. I may still be missing some pieces of the puzzle,
since this is the first attempted build of anything on this system,
and I had to install a number of *-dev and other packages to get
through ./configure. For Tcl, I have installed packages:

GRASS 5.0.3 req'd Debian/testing packages, Jan 22, 2004

gcc # for compile
libc6-dev # for basics
flex # for lex
bison # for yacc
libncurses5-dev # for curses
zlib1g-dev # zlib
libreadline4-dev # readline
libjpeg62-dev or libjpeg-mmx-dev # for JPEG support
libtiff3g-dev # for TIFF support
libpng12-dev # for PNG support
libgd2-xpm-dev # for GD 2.0 install
libg2-dev # for GD 2.0 (unneed for GRASS > 5.0.x)
tcl8.3-dev # for TCL
tk8.3-dev # for TK
postgresql # for Postgresql support ???
postgresql-dev # for Postgresql support ???
xlibmesa-gl-dev # for OpenGL
libstdc++5-3.3-dev # for glu-dev
xlibmesa-glu-dev # for OpenGL
unixodbc-dev # for ODBC
fftw-dev # for FFT functions
lesstif2-dev # for Motif

libgdal1-dev # for GDAL
libfreetype6-dev # for Freetype Fonts (broken)

make # won't get far without this..
g++ # for r.terraflow

optional:
gdal-bin # for GDAL (doesn't include libraries or gdal-config)
proj # for PROJ.4

Configure 5.0.3 with:
CFLAGS="-O3 -march=i686 -Wall" LDFLAGS="-s" ./configure \
        --with-tcltk-includes=/usr/include/tcl8.3 \
        --with-postgres-includes=/usr/include/postgresql \
        --with-motif --with-motif-includes=/usr/X11R6/include \
        --with-freetype --with-freetype-includes=/usr/include/freetype2 \
        --with-glw --with-readline --with-gdal \
        2>&1 | tee config_log.txt

GRASS 5.7:
get latest CVS version of GRASS 5.3 (to /usr/src/grass/grass53)
get latest CVS version of GRASS 5.7 (to /usr/src/grass/grass57)

Then use:
./configure \
    --with-grass50=/usr/src/grass/grass53 \
    --with-tcltk-includes=/usr/include/tcl8.3 \
    --with-postgres-includes=/usr/include/postgresql \
    --with-motif --with-motif-includes=/usr/X11R6/include \
    --with-readline --with-gdal --with-cxx --with-glw \
    --with-proj

make mix
make

To run GRASS 5.7, simply start
./bin.$ARCH/grass57

I know that there is a 5.03 binary package for debian. I installed it,
but it threw the infamous NVIZ segfault.

You need to install against Tcl/Tk 8.3. Install the tcl8.3-dev and
tk8.3-dev packages.

This is Debian bug #248105
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=248105

Hamish

On Tuesday 11 May 2004 3:43 am, Glynn Clements wrote:

AFAIK, that code requires Tcl/Tk 8.4

It looks like you are correct.
I built it using (mostly) Hamish's ./configure line, which specifies 8.3. It
built successfully while I slept, or at least it did not terminate with an
error. On running it, I find that directory /usr/local/grass57/tcltkgrass
does not exist.

I'll try again...
--
Carl Brown
Whitefield, NH USA
-----