Thread: psql and readline library: cursor keys

psql and readline library: cursor keys

From
Terry Yapt
Date:
Hello all,

I am installing a new postgreSQL 7.2.2 in a fresh RedHat 7.3 installation.  I have
downloaded the source pgsql files.

I am having problems with readline library, I mean: I don't have tab, up and down
cursor keys functionality to get the history command into psql frontend... I have
spent a lot of time looking for a final solution on Internet and newsgroups but I have
no luck for the moment....

Below are my steps and its results (my apologies by this mail size).  Any help would
be appreciated:


rpm -qa | grep readline
=======================
readline-devel-4.2a-4
readline-4.2a-4

locate readline
===============
/usr/lib/python1.5/lib-dynload/readline.so
/usr/lib/python2.2/lib-dynload/readline.so
/usr/lib/python2.2/lib-dynload/xreadlinesmodule.so
/usr/lib/libreadline.so.4
/usr/lib/libreadline.so.4.2
/usr/lib/libreadline.a
/usr/lib/libreadline.so
/usr/share/doc/vim-common-6.1/syntax/readline.vim
/usr/share/man/man3/readline.3.gz
/usr/share/info/readline.info.gz
/usr/share/vim/vim61/indent/readline.vim
/usr/share/vim/vim61/syntax/readline.vim
/usr/include/readline
/usr/include/readline/rltypedefs.h
/usr/include/readline/chardefs.h
/usr/include/readline/history.h
/usr/include/readline/keymaps.h
/usr/include/readline/readline.h
/usr/include/readline/rlconf.h
/usr/include/readline/rlstdc.h
/usr/include/readline/tilde.h


./configure --prefix=/pgsql --enable-locale --enable-multibye --with-openssl
--with-includes=/usr/include/readline --with-libs=/usr/lib
loading cache ./config.cache  ( I have tested it without --with-includes and
--with-libs options)..
===================================
creating cache ./config.cache
checking host system type... i586-pc-linux-gnu
checking which template to use... linux
checking whether to build with locale support... yes
checking whether to build with recode support... no
checking whether to build with multibyte character support... no
checking whether NLS is wanted... no
checking for default port number... 5432
checking for default soft limit on number of connections... 32
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
using CFLAGS=-O2
checking whether the C compiler (gcc -O2 ) works... yes
checking whether the C compiler (gcc -O2 ) is a cross-compiler... no
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for executable suffix... no
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking whether to build with Tcl... no
checking whether to build with Tk... no
checking whether to build Perl modules... no
checking whether to build Python modules... no
checking whether to build Java/JDBC tools... no
checking whether to build with PAM support... no
building with OpenSSL support
checking whether to build the ODBC driver... no
checking whether to build C++ modules... no
using CPPFLAGS=  -I/usr/include/readline -I/usr/local/ssl/include
using LDFLAGS=  -L/usr/lib -L/usr/local/ssl/lib
checking for mawk... no
checking for gawk... gawk
checking for flex... no
configure: warning:
*** Without Flex you will not be able to build PostgreSQL from CVS or
*** change any of the scanner definition files.  You can obtain Flex from
*** a GNU mirror site.  (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Flex
*** output is pre-generated.)
checking whether ln -s works... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for lorder... no
checking for tar... /bin/tar
checking for bison... no
configure: warning:
*** Without Bison you will not be able to build PostgreSQL from CVS or
*** change any of the parser definition files.  You can obtain Bison from
*** a GNU mirror site.  (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this because the Bison
*** output is pre-generated.)  To use a different yacc program (possible,
*** but not recommended), set the environment variable YACC before running
*** 'configure'.
checking for perl... /usr/bin/perl
checking for readline... no
checking for library containing using_history... -lhistory
checking for main in -lbsd... yes
checking for setproctitle in -lutil... no
checking for main in -lm... yes
checking for main in -ldl... yes
checking for main in -lsocket... no
checking for main in -lnsl... yes
checking for main in -lipc... no
checking for main in -lIPC... no
checking for main in -llc... no
checking for main in -ldld... no
checking for main in -lld... no
checking for main in -lcompat... no
checking for main in -lBSD... no
checking for main in -lgen... no
checking for main in -lPW... no
checking for main in -lresolv... yes
checking for main in -lunix... no
checking for library containing crypt... -lcrypt
checking for __inet_ntoa in -lbind... no
checking for library containing fdatasync... none required
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking for crypt.h... yes
checking for dld.h... no
checking for endian.h... yes
checking for fp_class.h... no
checking for getopt.h... yes
checking for ieeefp.h... no
checking for pwd.h... yes
checking for sys/ipc.h... yes
checking for sys/pstat.h... no
checking for sys/select.h... yes
checking for sys/sem.h... yes
checking for sys/socket.h... yes
checking for sys/shm.h... yes
checking for sys/types.h... yes
checking for sys/un.h... yes
checking for termios.h... yes
checking for kernel/OS.h... no
checking for kernel/image.h... no
checking for SupportDefs.h... no
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking whether string.h and strings.h may both be included... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for working const... yes
checking for inline... inline
checking for preprocessor stringizing operator... yes
checking for signed types... yes
checking for volatile... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for union semun... no
checking for struct cmsgcred... no
checking for struct fcred... no
checking for struct sockcred... no
checking for struct sockaddr_un... yes
checking for int timezone... yes
checking types of arguments for accept()... int, struct sockaddr *, size_t *
checking whether gettimeofday takes only one argument... no
checking for 8-bit clean memcmp... yes
checking for fcvt... yes
checking for getopt_long... yes
checking for memmove... yes
checking for pstat... no
checking for setproctitle... no
checking for setsid... yes
checking for sigprocmask... yes
checking for sysconf... yes
checking for waitpid... yes
checking for dlopen... yes
checking for fdatasync... yes
checking for PS_STRINGS... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for isinf... yes
checking for getrusage... yes
checking for srandom... yes
checking for gethostname... yes
checking for random... yes
checking for inet_aton... yes
checking for strerror... yes
checking for strdup... yes
checking for strtol... yes
checking for strtoul... yes
checking for strcasecmp... yes
checking for cbrt... yes
checking for rint... yes
checking for rl_completion_append_character... no
checking for rl_completion_matches... no
checking for rl_filename_completion_function... no
checking for finite... yes
checking for sigsetjmp... yes
checking for optreset... no
checking test program... ok
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... yes
checking whether snprintf handles 'long long int' as %lld... yes
checking for strtoll... yes
checking for strtoull... yes
checking for atexit... yes
checking size of unsigned long... 4
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 4
checking alignment of long long int... 4
checking alignment of double... 4
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for onsgmls... onsgmls
checking for openjade... openjade
checking for DocBook V3.1... yes
checking for DocBook stylesheets... no
checking for sgmlspl... sgmlspl
updating cache ./config.cache
creating ./config.status
creating GNUmakefile
creating src/GNUmakefile
creating src/Makefile.global
creating src/backend/port/Makefile
creating src/include/pg_config.h
linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
linking ./src/include/port/linux.h to src/include/pg_config_os.h
linking ./src/makefiles/Makefile.linux to src/Makefile.port
linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s

Re: psql and readline library: cursor keys

From
Tom Lane
Date:
Terry Yapt <yapt@technovell.com> writes:
> I am installing a new postgreSQL 7.2.2 in a fresh RedHat 7.3 installation.  I have
> downloaded the source pgsql files.

> I am having problems with readline library,

> checking for readline... no

You need to dig into config.log and see why it thinks there's no
readline out there.  Offhand it seems like your setup should work;
I'd be interested to find out why it doesn't.

            regards, tom lane

Re: psql and readline library: cursor keys

From
Terry Yapt
Date:
Hi Tom,

I have spent a lot of time with this stuff and thanks to Hiroki Takada I have solved it...

"libtermcap-devel" absence was the faulting stuff......

Best Regards.....

Tom Lane wrote:
>
> Terry Yapt <yapt@technovell.com> writes:
> > I am installing a new postgreSQL 7.2.2 in a fresh RedHat 7.3 installation.  I have
> > downloaded the source pgsql files.
>
> > I am having problems with readline library,
>
> > checking for readline... no
>
> You need to dig into config.log and see why it thinks there's no
> readline out there.  Offhand it seems like your setup should work;
> I'd be interested to find out why it doesn't.
>
>                         regards, tom lane