[GRASS5] [bug #882] (grass) Configure errors

this bug's URL: http://intevation.de/rt/webrt?serial_num=882
-------------------------------------------------------------------------

Subject: Configure errors

Platform: Linux/Intel
Linux distro: RedHat
linux cpu: Intel (i486, i586, pentium ...)
Xwindows version: Xfree 4.0.x
Xwindows manager: KDE 2.x
TclTk version: tcl/tk 8.3
grass downloaded at: CVS Server, Germany
grass binary for platform: I compiled the sources myself
grass sources source: no, I got a source code package from the server

./configure reports the following error:

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.

but tk is installed and tk.h is in /usr/include!!!
If I force header location:

./configure --with-tcltk-includes=/usr/include

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes... /usr/include
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.

rpm -qi tk reports that Tk 3.3.3 is installed.

Then I've done ./configure --without-tcltk and it doesn't find
the postgresql includes (they are in /usr/include/pgsql, I have
to force that location). I have Mesa 3.4.2 installed but configure
says:

checking whether to use OpenGL... yes
checking for location of OpenGL includes...
checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for location of OpenGL library...
checking for glBegin in -lGL... no
checking for glBegin in -lGL... no
configure: error: *** Unable to locate OpenGL library.

... REQUIREMENTS says that Mesa 3.x is needed, but this one is
not recognized.
Umpf, in the end configure does its work with the following parameters:

./configure --without-tcltk --with-postgres-includes=/usr/include/pgsql --without-opengl --without-odbc --without-fftw

(odbc and fftw in fact are not installed, but do you expect that they
are installed on the average machine? The should be disabled IHMO)

-------------------------------------------- Managed by Request Tracker

Hi Andrea,

Request Tracker wrote:

./configure reports the following error:

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.

but tk is installed and tk.h is in /usr/include!!!
If I force header location:

Usually tcl/tk is found. But perhaps there was some incompatible change
from 8.3.1 (which is running here) to 8.3.3? Or tk.h is only a
place-holder? No idea here.

./configure --with-tcltk-includes=/usr/include

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes... /usr/include
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.

rpm -qi tk reports that Tk 3.3.3 is installed.

Then I've done ./configure --without-tcltk and it doesn't find
the postgresql includes (they are in /usr/include/pgsql, I have
to force that location). I have Mesa 3.4.2 installed but configure
says:

yes, the postgresql includes are in different dirs on different
platforms/distros.

checking whether to use OpenGL... yes
checking for location of OpenGL includes...
checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for location of OpenGL library...
checking for glBegin in -lGL... no
checking for glBegin in -lGL... no
configure: error: *** Unable to locate OpenGL library.

... REQUIREMENTS says that Mesa 3.x is needed, but this one is
not recognized.
Umpf, in the end configure does its work with the following parameters:

What _exactly_ do you have installed?
I have installed Mesa-devel-3.3-5 and Mesa-3.3-5 rpms (Red Hat 7.0 based
system).

./configure --without-tcltk --with-postgres-includes=/usr/include/pgsql --without-opengl --without-odbc --without-fftw

(odbc and fftw in fact are not installed, but do you expect that they
are installed on the average machine? The should be disabled IHMO)

fftw is needed for several modules. It is a clean build (./configure;
make; make install) on all systems i encountered so far. Maybe there is
a rpm file too.

HTH,

Andreas
--
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

Andreas Lange wrote:

Hi Andrea,

Request Tracker wrote:
>
> ./configure reports the following error:
>
> checking whether to use Tcl/Tk... yes
> checking for location of Tcl/Tk includes...
> checking for tcl.h... yes
> checking for tk.h... no
> configure: error: *** Unable to locate Tk includes.
>
> but tk is installed and tk.h is in /usr/include!!!
> If I force header location:

Usually tcl/tk is found. But perhaps there was some incompatible change
from 8.3.1 (which is running here) to 8.3.3? Or tk.h is only a
place-holder? No idea here.

>
> ./configure --with-tcltk-includes=/usr/include
>
> checking whether to use Tcl/Tk... yes
> checking for location of Tcl/Tk includes... /usr/include
> checking for tcl.h... yes
> checking for tk.h... no
> configure: error: *** Unable to locate Tk includes.
>
> rpm -qi tk reports that Tk 3.3.3 is installed.
>
> Then I've done ./configure --without-tcltk and it doesn't find
> the postgresql includes (they are in /usr/include/pgsql, I have
> to force that location). I have Mesa 3.4.2 installed but configure
> says:

yes, the postgresql includes are in different dirs on different
platforms/distros.

>
> checking whether to use OpenGL... yes
> checking for location of OpenGL includes...
> checking for GL/gl.h... yes
> checking for GL/glu.h... yes
> checking for location of OpenGL library...
> checking for glBegin in -lGL... no
> checking for glBegin in -lGL... no
> configure: error: *** Unable to locate OpenGL library.
>
> ... REQUIREMENTS says that Mesa 3.x is needed, but this one is
> not recognized.
> Umpf, in the end configure does its work with the following parameters:

What _exactly_ do you have installed?
I have installed Mesa-devel-3.3-5 and Mesa-3.3-5 rpms (Red Hat 7.0 based
system).

>
> ./configure --without-tcltk --with-postgres-includes=/usr/include/pgsql --without-opengl --without-odbc --without-fftw
>
> (odbc and fftw in fact are not installed, but do you expect that they
> are installed on the average machine? The should be disabled IHMO)
>
fftw is needed for several modules. It is a clean build (./configure;
make; make install) on all systems i encountered so far. Maybe there is
a rpm file too.

HTH,

Andreas
--
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
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

Hello,

I don't know if it is related or not. On my latest build (Solaris 7) I
ran into some configure problems. The TCL / TK options would not build
even though they are installed. When I examined the config.log I found
compile errors related to the linker. I then manually editted configure
and added the -lsocket -lnsl -ldl flags to the TCL and TK lines of
configure. This allowed the test program to build and recognize that TCL
/ TK was installed on my system.

I also ran into the same problem of having to run configure with a whole
lot of things disabled. To build it on my (dated?) Solaris system I had
to use the following....

./configure -with-postgress=no -with-gd=no -with-odbc=no -with-ddtw=no
-with-blas=no -with-lapack=no -with-freetype=no

I am used to disabling postgress for the Solaris but there seems to be
alot more options that need disabling if packages are not installed. I
am not a configure expert, but is it not possible for configure to
disable the feature if it is not found, rather than exiting with an
error?

--
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

Hi Bob,

Bob Covill wrote:

Hello,

I don't know if it is related or not. On my latest build (Solaris 7) I
ran into some configure problems. The TCL / TK options would not build
even though they are installed. When I examined the config.log I found
compile errors related to the linker. I then manually editted configure
and added the -lsocket -lnsl -ldl flags to the TCL and TK lines of
configure. This allowed the test program to build and recognize that TCL
/ TK was installed on my system.

this would mean to add another compiler test to configure. On Solaris
you may use Suns binutils/assembler as well as the GNU
binutils/assembler. There may be differences if you use Sun compiler or
gcc, too.

I also ran into the same problem of having to run configure with a whole
lot of things disabled. To build it on my (dated?) Solaris system I had
to use the following....

./configure -with-postgress=no -with-gd=no -with-odbc=no -with-ddtw=no
-with-blas=no -with-lapack=no -with-freetype=no

I am used to disabling postgress for the Solaris but there seems to be
alot more options that need disabling if packages are not installed. I
am not a configure expert, but is it not possible for configure to
disable the feature if it is not found, rather than exiting with an
error?

as far as i remember the idea was that everything that should be build
from the GRASS list in src/CMD/lists/GRASS should be enabled by default
in configure. Otherwise everyone would have to edit the list or wonder
why some modules are in the error.log. But GRASS is a moving target, so
this may change sometimes.

IMHO odbc, blas, lapack and freetype should be disabled, as they are not
strictly required.

--
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

Request Tracker wrote:

./configure reports the following error:

checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.

but tk is installed and tk.h is in /usr/include!!!

Note that tk.h includes some other headers (e.g. <X11/Xlib.h>); if
they can't be found, the configure test will fail (the configure test
for a header attempts to pre-process a file which "#include"s that
header; any error results in failure).

Then I've done ./configure --without-tcltk and it doesn't find
the postgresql includes (they are in /usr/include/pgsql, I have
to force that location).

That is to be expected. Any header/library directories beyond those in
the compiler's/linker's default paths have to be explicitly specified
by the appropriate --with-*-includes/--with-*-libs switch.

Adding -I/-L switches automatically caused failures due to using the
wrong version of a header or library, and no combination of configure
switches could fix the problem.

I have Mesa 3.4.2 installed but configure
says:

checking whether to use OpenGL... yes
checking for location of OpenGL includes...
checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for location of OpenGL library...
checking for glBegin in -lGL... no
checking for glBegin in -lGL... no
configure: error: *** Unable to locate OpenGL library.

... REQUIREMENTS says that Mesa 3.x is needed, but this one is
not recognized.

The configure check for a library attempts to link a test program
against that library. If the library has any dependencies, they must
also be found.

It isn't possible to determine exactly why these two tests failed
without seeing the appropriate section of config.log.

Umpf, in the end configure does its work with the following parameters:

./configure --without-tcltk --with-postgres-includes=/usr/include/pgsql --without-opengl --without-odbc --without-fftw

(odbc and fftw in fact are not installed, but do you expect that they
are installed on the average machine? The should be disabled IHMO)

This is deliberate.

When programs were automatically disabled because required
headers/libraries couldn't be found, people used to file bug reports
about the programs not being built, even though configure displayed a
warning message.

So, it was decided that any failures would result in an error, as a
user (hopefully) can't fail to notice that they've explicitly disabled
the library.

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

Bob Covill wrote:

I don't know if it is related or not. On my latest build (Solaris 7) I
ran into some configure problems. The TCL / TK options would not build
even though they are installed. When I examined the config.log I found
compile errors related to the linker. I then manually editted configure
and added the -lsocket -lnsl -ldl flags to the TCL and TK lines of
configure. This allowed the test program to build and recognize that TCL
/ TK was installed on my system.

1. Library dependencies won't affect the header check (which is
failing for Andrea).

2. If you send me the appropriate bits of config.log, I'll update the
checks to allow for the libraries in question.

NB: this is one of the biggest limitations of autoconf. You just have
to iterate through known combinations until one works. Which means
that you need to know all of the combinations.

I also ran into the same problem of having to run configure with a whole
lot of things disabled. To build it on my (dated?) Solaris system I had
to use the following....

./configure -with-postgress=no -with-gd=no -with-odbc=no -with-ddtw=no
-with-blas=no -with-lapack=no -with-freetype=no

I am used to disabling postgress for the Solaris but there seems to be
alot more options that need disabling if packages are not installed. I
am not a configure expert, but is it not possible for configure to
disable the feature if it is not found, rather than exiting with an
error?

Then the user doesn't notice that the feature was disabled, and files
a bug report.

The discussion surrounding this behaviour can be found in the thread
entitled:

  [bug #801] (grass) compilation errors in grass5.0.0pre2

from September 2001.

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