Обсуждение: Compiling 7.2.3 on RH 8.0
Folks, For the first time, I'm trying to compile 7.2.3 on a RedHat 8.0 server. I'm normally a SuSE user, so I've hit a bit of a wall. I'm getting errors like this when I try to compile Postgres: > configure:5800: checking for readline > configure:5837: gcc -o conftest -O2 -L/usr/lib > conftest.c -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5 > /usr/lib/libreadline.so: undefined reference to `tgetnum' > /usr/lib/libreadline.so: undefined reference to `tgoto' > /usr/lib/libreadline.so: undefined reference to `tgetflag' > /usr/lib/libreadline.so: undefined reference to `BC' > /usr/lib/libreadline.so: undefined reference to `tputs' > /usr/lib/libreadline.so: undefined reference to `PC' > /usr/lib/libreadline.so: undefined reference to `tgetent' > /usr/lib/libreadline.so: undefined reference to `UP' > /usr/lib/libreadline.so: undefined reference to `tgetstr' These are the same sort of errors reported by David Busby about a month ago; however, I tried his solution (manipulating --with-libs) and it didn't make a difference. Suggestions, please? I do have libreadline4.3-3, libtermcap, ncurses, and devel rpms for all installed. Help! Thanks, Josh
On Thursday 23 January 2003 20:26, Josh Berkus wrote:
> For the first time, I'm trying to compile 7.2.3 on a RedHat 8.0 server.
> I'm normally a SuSE user, so I've hit a bit of a wall.
> Suggestions, please?
> I do have libreadline4.3-3, libtermcap, ncurses, and devel rpms for all
> installed. Help!
One question: is there a particular reason not to use the 7.2.3 RPM's for Red
Hat 8.0?
Now, going back to my Red Hat 8.0 7.2.3 build, I also see those errors.
However, readline is working and has been linked into psql. An excerpt from
my build log:
checking how to link an embedded Python application...
-L/usr/lib/python2.2/config
-ldl -lpthread -lutil -lm -lpython2.2
checking for readline... yes (-lreadline -ltermcap)
checking for library containing using_history... none required
checking for main in -lbsd... yes
Now, config.log from the same area:
configure:3288: checking for readline
configure:3310: gcc -o conftest -O2 -march=i386 -mcpu=i686
-I/usr/kerberos/inclu
de -L/usr/kerberos/lib conftest.c -lreadline 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined
referenc
e to `tgetnum'
[snip]
configure:3310: gcc -o conftest -O2 -march=i386 -mcpu=i686
-I/usr/kerberos/inclu
de -L/usr/kerberos/lib conftest.c -lreadline -ltermcap 1>&5
configure:3349: checking for library containing using_history
configure:3367: gcc -o conftest -O2 -march=i386 -mcpu=i686
-I/usr/kerberos/inclu
de -L/usr/kerberos/lib conftest.c -lreadline -ltermcap 1>&5
configure:3416: checking for main in -lbsd
configure:3431: gcc -o conftest -O2 -march=i386 -mcpu=i686
-I/usr/kerberos/inclu
de -L/usr/kerberos/lib conftest.c -lbsd -lreadline -ltermcap 1>&5
You have libtermcap-devel installed, correct (you said as much; just
double-checking)?
More information:
[lowen@localhost bin]$ pg_config --configure
--enable-locale --with-CXX --prefix=/usr --disable-rpath --with-perl
--enable-multibyte --with-tcl --with-odbc --enable-syslog --with-python
--with-openssl --with-pam --with-krb5=/usr/kerberos --enable-nls
--sysconfdir=/etc/pgsql --mandir=/usr/share/man --docdir=/usr/share/doc
--includedir=/usr/include --datadir=/usr/share/pgsql
[lowen@localhost bin]$ ldd psql
libpq.so.2 => /usr/lib/libpq.so.2 (0x4002a000)
libpam.so.0 => /lib/libpam.so.0 (0x4003e000)
libssl.so.2 => /lib/libssl.so.2 (0x40046000)
libcrypto.so.2 => /lib/libcrypto.so.2 (0x40076000)
libkrb5.so.3 => /usr/kerberos/lib/libkrb5.so.3 (0x4014a000)
libk5crypto.so.3 => /usr/kerberos/lib/libk5crypto.so.3 (0x401a7000)
libcom_err.so.3 => /usr/kerberos/lib/libcom_err.so.3 (0x401b7000)
libz.so.1 => /usr/lib/libz.so.1 (0x401ba000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x401c8000)
libresolv.so.2 => /lib/libresolv.so.2 (0x401f5000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40207000)
libdl.so.2 => /lib/libdl.so.2 (0x4021c000)
libm.so.6 => /lib/i686/libm.so.6 (0x4021f000)
libreadline.so.4 => /usr/lib/libreadline.so.4 (0x40242000)
libtermcap.so.2 => /lib/libtermcap.so.2 (0x4026e000)
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[lowen@localhost bin]$rpm -qa|grep postg
postgresql-perl-7.2.3-2PGDG
postgresql-test-7.2.3-2PGDG
postgresql-7.2.3-2PGDG
postgresql-libs-7.2.3-2PGDG
postgresql-contrib-7.2.3-2PGDG
postgresql-server-7.2.3-2PGDG
postgresql-devel-7.2.3-2PGDG
[lowen@localhost bin]$
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
Lamar, > One question: is there a particular reason not to use the 7.2.3 RPM's > for Red > Hat 8.0? Yes. I have to make two small changes to the Postgres source code. -Josh
On Thursday 23 January 2003 23:04, Josh Berkus wrote: > > One question: is there a particular reason not to use the 7.2.3 RPM's > > for Red > > Hat 8.0? > Yes. I have to make two small changes to the Postgres source code. Ah. Any part of the rest help at all? -- Lamar Owen WGCR Internet Radio 1 Peter 4:11
"Josh Berkus" <josh@agliodbs.com> writes:
> For the first time, I'm trying to compile 7.2.3 on a RedHat 8.0 server.
> I'm normally a SuSE user, so I've hit a bit of a wall.
> I'm getting errors like this when I try to compile Postgres:
It works out-of-the-box for me on a vanilla RH 8.0 installation.
You do need libtermcap, but that's installed by default, AFAIK.
>> configure:5800: checking for readline
>> configure:5837: gcc -o conftest -O2 -L/usr/lib
>> conftest.c -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5
>> /usr/lib/libreadline.so: undefined reference to `tgetnum'
Hm, you sure this is 7.2.3's configure? The line numbers seem way off.
FWIW, here is the section from config.log showing configure probing for
readline libraries, as just run from 7.2-branch sources on my RH 8.0
box. The first test without -ltermcap fails, but the try with it succeeds.
...
configure:3151: checking for perl
configure:3288: checking for readline
configure:3310: gcc -o conftest -O2 -g conftest.c -lreadline 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgoto'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetflag'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `BC'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tputs'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `PC'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetent'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `UP'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3299 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char readline();
int main() {
readline()
; return 0; }
configure:3310: gcc -o conftest -O2 -g conftest.c -ledit 1>&5
/usr/bin/ld: cannot find -ledit
collect2: ld returned 1 exit status
configure: failed program was:
#line 3299 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char readline();
int main() {
readline()
; return 0; }
configure:3310: gcc -o conftest -O2 -g conftest.c -lreadline -ltermcap 1>&5
configure:3349: checking for library containing using_history
...
regards, tom lane
Tom, > >> configure:5800: checking for readline > >> configure:5837: gcc -o conftest -O2 -L/usr/lib > >> conftest.c -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd >&5 > >> /usr/lib/libreadline.so: undefined reference to `tgetnum' > > Hm, you sure this is 7.2.3's configure? The line numbers seem way > off. It's not. I was quoting another e-mail that seemed to report the same problem. The machine I'm compiling on does not have a GUI and there was no easy way to paste its config.log into an e-mail. Sorry to confuse you! -Josh Berkus
On Friday 24 January 2003 12:35, Josh Berkus wrote: > It's not. I was quoting another e-mail that seemed to report the same > problem. The machine I'm compiling on does not have a GUI and there > was no easy way to paste its config.log into an e-mail. Sorry to > confuse you! mail -s "Here is the faulty config.log" recipient@some.where < config.log -- Lamar Owen WGCR Internet Radio 1 Peter 4:11