Thread: Configure fails to find readline libraries
I'm attempting to install 8.2x postgresql, and configure fails to find the realine libraries.
Here's my configure:
./configure --with-includes=/usr/local/include:/usr/local/include/readline --with-libraries=/usr/local/lib
The readline.h file is in the include directory and the lib has the libreadline.so.6, etc.
We are using readline 6.0 on Suse Linux 11. (kernel version: 2.6.27.21-0.1-pae)
Any ideas why configure is not able to find the readline.h when I am telling where it is?
Thanks in advance.
--Jeff
Jeffrey Trimble
System LIbrarian
William F. Maag Library
Youngstown State University
330.941.2483 (Office)
On Tue, May 19, 2009 at 6:34 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:
I'm attempting to install 8.2x postgresql, and configure fails to find the realine libraries.Here's my configure:./configure --with-includes=/usr/local/include:/usr/local/include/readline --with-libraries=/usr/local/lib
Before running configure, try
export CFLAGS="-I/usr/local/include -I/usr/local/include/readline"
export LDFLAGS="-L/usr/local/lib"
--Scott
Thanks, but that didn't work. Here's the complete error result from that:
checking for -lreadline... no
checking for -ledit... no
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.
Jeffrey Trimble
System LIbrarian
William F. Maag Library
Youngstown State University
330.941.2483 (Office)
On May 19, 2009, at 6:56 PM, Scott Mead wrote:
On Tue, May 19, 2009 at 6:34 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:I'm attempting to install 8.2x postgresql, and configure fails to find the realine libraries.Here's my configure:./configure --with-includes=/usr/local/include:/usr/local/include/readline --with-libraries=/usr/local/libBefore running configure, tryexport CFLAGS="-I/usr/local/include -I/usr/local/include/readline"export LDFLAGS="-L/usr/local/lib"--Scott
On Tue, May 19, 2009 at 7:08 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:
Thanks, but that didn't work. Here's the complete error result from that:checking for -lreadline... nochecking for -ledit... noconfigure: error: readline library not foundIf you have readline already installed, see config.log for details on thefailure. It is possible the compiler isn't looking in the proper directory.Use --without-readline to disable readline support.
Are you *sure* that readline is installed in those directories
Have you checked config.log to see the actual error message from the linker?
--Scott
Hi.. thanks.
Here's a printout from my find command:
/usr/local/include/readline
/usr/local/include/readline/readline.h
And the plot thickens. Here is where it errors out and then loops endlessly until it quits:
(There are symbolic links from libreadline.so to libreadline.so.6.0)
configure:6240: $? = 0
configure:6243: test -s conftest
configure:6246: $? = 0
configure:6316: result: none required
configure:6337: checking for -lreadline
configure:6364: gcc -o conftest -I/usr/local/include -I/usr/local/include/readline -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include/readline -L/usr/local/lib -L/usr/local/lib conftest.c -lreadline -lcrypt -ldl -lm >&5
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `BC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
configure:6370: $? = 1
configure: failed program was:
| /* confdefs.h. */
Jeffrey Trimble
System LIbrarian
William F. Maag Library
Youngstown State University
330.941.2483 (Office)
On May 19, 2009, at 7:10 PM, Scott Mead wrote:
On Tue, May 19, 2009 at 7:08 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:Thanks, but that didn't work. Here's the complete error result from that:checking for -lreadline... nochecking for -ledit... noconfigure: error: readline library not foundIf you have readline already installed, see config.log for details on thefailure. It is possible the compiler isn't looking in the proper directory.Use --without-readline to disable readline support.Are you *sure* that readline is installed in those directoriesHave you checked config.log to see the actual error message from the linker?--Scott
On Tue, May 19, 2009 at 7:23 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:
Hi.. thanks.Here's a printout from my find command:/usr/local/include/readline/usr/local/include/readline/readline.hAnd the plot thickens. Here is where it errors out and then loops endlessly until it quits:(There are symbolic links from libreadline.so to libreadline.so.6.0)configure:6240: $? = 0configure:6243: test -s conftestconfigure:6246: $? = 0configure:6316: result: none requiredconfigure:6337: checking for -lreadlineconfigure:6364: gcc -o conftest -I/usr/local/include -I/usr/local/include/readline -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include/readline -L/usr/local/lib -L/usr/local/lib conftest.c -lreadline -lcrypt -ldl -lm >&5
/usr/local/lib/libreadline.so: undefined reference to `PC'/usr/local/lib/libreadline.so: undefined reference to `tgetflag'/usr/local/lib/libreadline.so: undefined reference to `tgetent'/usr/local/lib/libreadline.so: undefined reference to `UP'/usr/local/lib/libreadline.so: undefined reference to `tputs'/usr/local/lib/libreadline.so: undefined reference to `tgoto'/usr/local/lib/libreadline.so: undefined reference to `tgetnum'/usr/local/lib/libreadline.so: undefined reference to `BC'/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
What happens if you run
ldd /usr/local/lib/libreadline.so ?
It looks like you've got either multiple versions of readline installed and you're linking to the wrong one, or something is really wonky with your readline build. A quick google is showing that all of those symbols are in ncurses, which means that you should probably have ncurses in your linker cache or linker runtime path.
By the way, if you don't want readline functionality in psql (or care), just build '--without-readline'
--Scott
Hi...Here's the output of that one:
ldd /usr/local/lib/libreadline.so
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7e9c000)
/lib/ld-linux.so.2 (0xb8055000)
ddev:/ #
There are two versions of readline. REadline 5.2 and Readline 6.0 Readline 5.2 was installed during
the suse linux installation but it never installed the readline.h file. Go figure.
--Jeff
Jeffrey Trimble
System LIbrarian
William F. Maag Library
Youngstown State University
330.941.2483 (Office)
On May 19, 2009, at 7:28 PM, Scott Mead wrote:
On Tue, May 19, 2009 at 7:23 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:Hi.. thanks.Here's a printout from my find command:/usr/local/include/readline/usr/local/include/readline/readline.hAnd the plot thickens. Here is where it errors out and then loops endlessly until it quits:(There are symbolic links from libreadline.so to libreadline.so.6.0)configure:6240: $? = 0configure:6243: test -s conftestconfigure:6246: $? = 0configure:6316: result: none requiredconfigure:6337: checking for -lreadlineconfigure:6364: gcc -o conftest -I/usr/local/include -I/usr/local/include/readline -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include/readline -L/usr/local/lib -L/usr/local/lib conftest.c -lreadline -lcrypt -ldl -lm >&5/usr/local/lib/libreadline.so: undefined reference to `PC'/usr/local/lib/libreadline.so: undefined reference to `tgetflag'/usr/local/lib/libreadline.so: undefined reference to `tgetent'/usr/local/lib/libreadline.so: undefined reference to `UP'/usr/local/lib/libreadline.so: undefined reference to `tputs'/usr/local/lib/libreadline.so: undefined reference to `tgoto'/usr/local/lib/libreadline.so: undefined reference to `tgetnum'/usr/local/lib/libreadline.so: undefined reference to `BC'/usr/local/lib/libreadline.so: undefined reference to `tgetstr'What happens if you runldd /usr/local/lib/libreadline.so ?It looks like you've got either multiple versions of readline installed and you're linking to the wrong one, or something is really wonky with your readline build. A quick google is showing that all of those symbols are in ncurses, which means that you should probably have ncurses in your linker cache or linker runtime path.By the way, if you don't want readline functionality in psql (or care), just build '--without-readline'--Scott
On Tue, May 19, 2009 at 7:32 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:
Hi...Here's the output of that one:ldd /usr/local/lib/libreadline.solinux-gate.so.1 => (0xffffe000)libc.so.6 => /lib/libc.so.6 (0xb7e9c000)/lib/ld-linux.so.2 (0xb8055000)ddev:/ #
Not really sure what the problem is then, it's probably obvious but I'm jet-lagged and running on low blood sugar /caffeine right now.
There are two versions of readline. REadline 5.2 and Readline 6.0 Readline 5.2 was installed duringthe suse linux installation but it never installed the readline.h file. Go figure.
The easiest way to deal with that is just to install the 'readline-devel' package via YaST. That may help.
--Scott
--JeffJeffrey TrimbleSystem LIbrarianWilliam F. Maag LibraryYoungstown State University330.941.2483 (Office)On May 19, 2009, at 7:28 PM, Scott Mead wrote:On Tue, May 19, 2009 at 7:23 PM, Jeffrey Trimble <jtrimble@cc.ysu.edu> wrote:Hi.. thanks.Here's a printout from my find command:/usr/local/include/readline/usr/local/include/readline/readline.hAnd the plot thickens. Here is where it errors out and then loops endlessly until it quits:(There are symbolic links from libreadline.so to libreadline.so.6.0)configure:6240: $? = 0configure:6243: test -s conftestconfigure:6246: $? = 0configure:6316: result: none requiredconfigure:6337: checking for -lreadlineconfigure:6364: gcc -o conftest -I/usr/local/include -I/usr/local/include/readline -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include/readline -L/usr/local/lib -L/usr/local/lib conftest.c -lreadline -lcrypt -ldl -lm >&5/usr/local/lib/libreadline.so: undefined reference to `PC'/usr/local/lib/libreadline.so: undefined reference to `tgetflag'/usr/local/lib/libreadline.so: undefined reference to `tgetent'/usr/local/lib/libreadline.so: undefined reference to `UP'/usr/local/lib/libreadline.so: undefined reference to `tputs'/usr/local/lib/libreadline.so: undefined reference to `tgoto'/usr/local/lib/libreadline.so: undefined reference to `tgetnum'/usr/local/lib/libreadline.so: undefined reference to `BC'/usr/local/lib/libreadline.so: undefined reference to `tgetstr'What happens if you runldd /usr/local/lib/libreadline.so ?It looks like you've got either multiple versions of readline installed and you're linking to the wrong one, or something is really wonky with your readline build. A quick google is showing that all of those symbols are in ncurses, which means that you should probably have ncurses in your linker cache or linker runtime path.By the way, if you don't want readline functionality in psql (or care), just build '--without-readline'--Scott
Jeffrey Trimble <jtrimble@cc.ysu.edu> writes: > configure:6337: checking for -lreadline > configure:6364: gcc -o conftest -I/usr/local/include -I/usr/local/ > include/readline -Wall -Wmissing-prototypes -Wpointer-arith -Winline - > Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing - > fwrapv -D_GNU_SOURCE -I/usr/local/include -I/usr/local/include/ > readline -L/usr/local/lib -L/usr/local/lib conftest.c -lreadline - > lcrypt -ldl -lm >&5 > /usr/local/lib/libreadline.so: undefined reference to `PC' > /usr/local/lib/libreadline.so: undefined reference to `tgetflag' > /usr/local/lib/libreadline.so: undefined reference to `tgetent' You should keep reading past that point ... The missing symbols here can come from termcap or ncurses. There is code in our configure script to try linking readline with those additional libraries. What's not clear is why those attempts failed, but you didn't show us the trace of them failing. regards, tom lane