[GRASS5] Some strange tcl.h not found error (Redhat 8)

Today I tried to configure 5.7 on a Redhat-8 box. To my surprise
tcl.h is not found although present. Does anyone have an idea?

uname -a
Linux localhost 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux

configure <params>
[...]
checking for gdImagePng in -lgd... yes
checking for gdImageGif in -lgd... no
checking for gdImageCreateTrueColor in -lgd... no
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes... /usr/include
checking for tcl.h... no
configure: error: *** Unable to locate Tcl includes.

tail config.log
configure:9508: checking whether to use Tcl/Tk
configure:9528: checking for location of Tcl/Tk includes
configure:9554: checking for tcl.h
configure:9562: gcc -E -I/usr/include conftest.c >/dev/null 2>conftest.out
configure: failed program was:
#line 9557 "configure"
#include "confdefs.h"
#include <tcl.h>

ls -la /usr/include/tcl.h
-rw-r--r-- 1 root root 57868 ago 20 2002 /usr/include/tcl.h

Thanks,

Markus

On Fri, Oct 10, 2003 at 03:03:57PM +0200, Markus Neteler wrote:

Today I tried to configure 5.7 on a Redhat-8 box. To my surprise
tcl.h is not found although present. Does anyone have an idea?

Run the gcc command below with the "-v" flag and
carefully read the output.

It might be that tcl.h includes something that is not there.

checking for tcl.h... no
configure: error: *** Unable to locate Tcl includes.

tail config.log

configure:9554: checking for tcl.h
configure:9562: gcc -E -I/usr/include conftest.c >/dev/null 2>conftest.out
configure: failed program was:
#line 9557 "configure"
#include "confdefs.h"
#include <tcl.h>

ls -la /usr/include/tcl.h
-rw-r--r-- 1 root root 57868 ago 20 2002 /usr/include/tcl.h

On Fri, Oct 10, 2003 at 03:26:54PM +0200, Bernhard Reiter wrote:

On Fri, Oct 10, 2003 at 03:03:57PM +0200, Markus Neteler wrote:
> Today I tried to configure 5.7 on a Redhat-8 box. To my surprise
> tcl.h is not found although present. Does anyone have an idea?

Run the gcc command below with the "-v" flag and
carefully read the output.

It might be that tcl.h includes something that is not there.

> checking for tcl.h... no
> configure: error: *** Unable to locate Tcl includes.

> tail config.log

> configure:9554: checking for tcl.h
> configure:9562: gcc -E -I/usr/include conftest.c >/dev/null 2>conftest.out
> configure: failed program was:
> #line 9557 "configure"
> #include "confdefs.h"
> #include <tcl.h>

I generated the file conftest.c as written above and run:
  gcc -v -E -I/usr/include conftest.c

It seems to works, no error message. Mhhh.

Markus

On Fri, Oct 10, 2003 at 04:12:52PM +0200, Markus Neteler wrote:

> > configure:9562: gcc -E -I/usr/include conftest.c >/dev/null 2>conftest.out
> > configure: failed program was:
> > #line 9557 "configure"
> > #include "confdefs.h"
> > #include <tcl.h>

I generated the file conftest.c as written above and run:
  gcc -v -E -I/usr/include conftest.c

It seems to works, no error message. Mhhh.

Since the test of autoconf consists only to test whether or not there
is some line not beginning with spaces or '+' and not beginning by
the name of the game :

ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then

It might be that there is an error message (or a warning) not related
to a failure to find tcl.h but that defines ac_err as not empty and
hence the test fails.

Does the preprocessing of the file go without *any* warning or error
message?
--
Thierry Laronde (Alceste) <tlaronde@polynum.org>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C

Today I tried to configure 5.7 on a Redhat-8 box. To my surprise
tcl.h is not found although present. Does anyone have an idea?

I just got it to work on RedHat 9 without trouble.

CFLAGS="-O3 -march=pentium4 -g -Wall" LDFLAGS="-s" ./configure \
     --with-grass50=/usr/src/grass/grass53-cvs \
     --with-motif \
     --with-motif-includes=/usr/X11R6/LessTif/Motif1.2/include \
     --with-motif-libs=/usr/X11R6/LessTif/Motif1.2/lib \
     --with-glw --with-proj --with-gdal=/usr/local/bin/gdal-config \
     --with-blas --with-lapack --with-cxx \
     --with-freetype --with-freetype-includes=/usr/include/freetype2
[...]
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... yes
checking Tcl version... 8.3
checking Tk version... 8.3
checking for location of Tcl/Tk library...
checking for Tcl_Init in -ltcl... yes
checking for Tk_MainWindow in -ltk... yes
[...]
  Tcl/Tk support: yes
[...]

$ rpm -q tcl
tcl-8.3.5-88
$ rpm -q tk
tk-8.3.5-88
$ rpm -q tcl-html
package tcl-html is not installed
$ rpm -q tcllib
tcllib-1.3-88
$ rpm -q tclx
package tclx is not installed
$ rpm -q tkinter
package tkinter is not installed
$ gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

[config.log:]
configure:9509: checking whether to use Tcl/Tk
configure:9529: checking for location of Tcl/Tk includes
configure:9555: checking for tcl.h
configure:9563: gcc -E conftest.c >/dev/null 2>conftest.out
configure:9600: checking for tk.h
configure:9608: gcc -E -I/usr/X11R6/include conftest.c >/dev/null 2>conftest.out
configure:9642: checking Tcl version
configure:9662: gcc -o conftest -O3 -march=pentium4 -g -Wall -rdynamic conftest.c 1>&5
configure:9710: checking Tk version
configure:9730: gcc -o conftest -O3 -march=pentium4 -g -Wall -I/usr/X11R6/include -rdynamic conftest.c 1>&5
configure:9789: checking for location of Tcl/Tk library
configure:9819: checking for Tcl_Init in -ltcl
configure:9836: gcc -o conftest -O3 -march=pentium4 -g -Wall -rdynamic conftest.c -ltcl -lm 1>&5
configure:10110: checking for Tk_MainWindow in -ltk
configure:10127: gcc -o conftest -O3 -march=pentium4 -g -Wall -rdynamic conftest.c -ltk -ltcl -lm -lm 1>&5
[...]

Is tcllib installed?

Hamish

uname -a
Linux localhost 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686
i386 GNU/Linux

configure <params>
[...]
checking for gdImagePng in -lgd... yes
checking for gdImageGif in -lgd... no
checking for gdImageCreateTrueColor in -lgd... no
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes... /usr/include
checking for tcl.h... no
configure: error: *** Unable to locate Tcl includes.

tail config.log
configure:9508: checking whether to use Tcl/Tk
configure:9528: checking for location of Tcl/Tk includes
configure:9554: checking for tcl.h
configure:9562: gcc -E -I/usr/include conftest.c >/dev/null
2>conftest.out configure: failed program was:
#line 9557 "configure"
#include "confdefs.h"
#include <tcl.h>

ls -la /usr/include/tcl.h
-rw-r--r-- 1 root root 57868 ago 20 2002
/usr/include/tcl.h