[GRASS-user] grass-6.4.0RC5 configure problem

Glynn Clements glynn at gclements.plus.com
Fri Nov 6 04:21:17 EST 2009


Rich Shepard wrote:

>    It's been several years since I've used GRASS, but I need to define a
> drainage basin and do some hydrological modeling. So I grabbed the tarball,
> along with all the pre- and co-requisites. The latter group built and
> installed without problems on my Slackware-12.2 system.
> 
>    GRASS, however, is being difficult. I run ./configure with these options:
> 
> --with-postgres \
> --with-sqlite \
> --with-cairo \
> --with-freetype \
> --with-readline \
> --with-gdal=/usr/bin/gdal-config \
> --with-python=/usr/bin/python-config \
> --with-wxwidgets=/usr/bin/wx-config \
> --with-includes=/usr/include/ \
> --with-libs=/usr/lib/ \
> --with-zlib-includes=/usr/include/ \
> --with-readline-includes=/usr/include/readline/ \
> --with-readline-libs=/usr/lib/ \
> --with-jpeg-includes=/usr/include/ \
> --with-jpeg-libs=/usr/lib \
> --with-tiff-includes=/usr/include/ \
> --with-tiff-libs=/usr/lib/ \
> --with-png-includes=/usr/include/ \
> --with-png-libs=/usr/lib/ \
> --with-postgres-includes=/usr/include/postgresql/server/ \
> --with-postgres-libs=/usr/lib/postgresql/ \
> --with-sqlite-includes=/usr/include \
> --with-sqlite-libs=/usr/lib/

You should never specify /usr/lib or /usr/include; the compiler/linker
will search these directories automatically. Specifying them
explicitly will usually do nothing, but if it makes a difference
(usually with older versions of gcc on platforms where it isn't the
"official" compiler), it will usually make matters worse.

> and the process fails with this error:
> 
> checking whether to use Readline... yes
> checking for location of Readline includes... /usr/include/readline/
> checking for readline/readline.h... yes
> checking for readline/history.h... yes
> checking for location of Readline library... /usr/lib/
> checking for readline in -lreadline... no
> configure: error: *** Unable to locate Readline library.

The most common reason for this error is that readline uses symbols
from the termcap, terminfo or curses libraries, but doesn't list the
library as a dependency, so you get unresolved symbols. You can
confirm this by looking at the end of the config.log file.

Either build your own readline library with complete dependency
information, or build GRASS without readline support. It's only used
by r.mapcalc and r3.mapcalc when reading expressions from stdin, and
if you're entering expressions which are complex enough to warrant
using readline, you would be better off storing them in a text file.

>    I specified the DIRS as /usr/lib/ because that's where it's located:
> 
> [rshepard at salmo ~]$ locate libreadline
> /usr/lib/libreadline.so.4
> /usr/lib/libreadline.so.5
> /usr/lib/libreadline.so
> /usr/lib/libreadline.a
> /usr/lib/libreadline.so.4.3
> /usr/lib/libreadline.so.5.2
> 
>    Why can't configure find the libraries in /usr/lib?

configure detects libraries by attempting to link a test program. If
linking fails, the library is considered "not found", regardless of
why linking failed. It doesn't matter whether the library is entirely
absent or simply non-functional.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list