make[2]: *** [psql] Error 1

Started by Andrea Antiboover 27 years ago6 messagesgeneral
Jump to latest
#1Andrea Antibo
antibo@mclink.it

when I compile postgres 6.3.2 under linux I have this error with "make all" and
"make install":

from make install:

/usr/lib/libreadline.a(terminal.o): In function `_rl_enable_meta_key':
terminal.o(.text+0x7ce): undefined reference to `tputs'
/usr/lib/libreadline.a(terminal.o): In function `_rl_control_keypad':
terminal.o(.text+0x7fb): undefined reference to `tputs'
terminal.o(.text+0x822): undefined reference to `tputs'
make[2]: *** [psql] Error 1

from make all:

.
.
.

terminal.o(.text+0x26b): undefined reference to `tgetent'
terminal.o(.text+0x35c): undefined reference to `PC'
terminal.o(.text+0x366): undefined reference to `BC'
terminal.o(.text+0x370): undefined reference to `UP'
terminal.o(.text+0x3be): undefined reference to `tgetflag'
terminal.o(.text+0x3cf): undefined reference to `tgetflag'
terminal.o(.text+0x41f): undefined reference to `tgetflag'
terminal.o(.text+0x430): undefined reference to `tgetflag'
/usr/lib/libreadline.a(terminal.o): In function `_rl_backspace':
terminal.o(.text+0x666): undefined reference to `tputs'
/usr/lib/libreadline.a(terminal.o): In function `ding':
terminal.o(.text+0x72f): undefined reference to `tputs'
/usr/lib/libreadline.a(terminal.o): In function `_rl_enable_meta_key':
terminal.o(.text+0x7ce): undefined reference to `tputs'
/usr/lib/libreadline.a(terminal.o): In function `_rl_control_keypad':
terminal.o(.text+0x7fb): undefined reference to `tputs'
terminal.o(.text+0x822): undefined reference to `tputs'
make[2]: *** [psql] Error 1
make[2]: Leaving directory `/usr/src/pgsql/src/bin/psql'

so, when initdb run there is:

initdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to
create the template database.
initdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the
global classes.
initdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based
authentication control file.

We are initializing the database system with username postgres (uid=26).
This user will own all the files and must also own the server process.

initdb: creating template database in /usr/local/pgsql/data/base/template1
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1
WARN:heap_modifytuple: repl is \ 0
initdb: could not create template database
initdb: cleaning up by wiping out /usr/local/pgsql/data/base/template1

HELP!!!!!

#2James Olin Oden
joden@lee.k12.nc.us
In reply to: Andrea Antibo (#1)
Re: [GENERAL] make[2]: *** [psql] Error 1

-----Original Message-----
From: Andrea Antibo <antibo@mclink.it>
To: <pgsql-general@postgreSQL.org>; <pgsql-novice@postgreSQL.org>
Date: Monday, October 05, 1998 14:25
Subject: [GENERAL] make[2]: *** [psql] Error 1

|when I compile postgres 6.3.2 under linux I have this error with "make all"
and
|"make install":
|
|
|from make install:
|
|/usr/lib/libreadline.a(terminal.o): In function `_rl_enable_meta_key':
|terminal.o(.text+0x7ce): undefined reference to `tputs'
|/usr/lib/libreadline.a(terminal.o): In function `_rl_control_keypad':
|terminal.o(.text+0x7fb): undefined reference to `tputs'
|terminal.o(.text+0x822): undefined reference to `tputs'
|make[2]: *** [psql] Error 1
Sounds like the linker is having trouble finding the ncurses library. I am
not sure exactly where, but somewhere in the make file you need to add:

-l ncurses

This is a compiler option that will tell the linker to link in the ncurses
routines.

Hope this helps...james
|

#3Andrea Antibo
antibo@mclink.it
In reply to: James Olin Oden (#2)
Re: [GENERAL] make[2]: *** [psql] Error 1

|/usr/lib/libreadline.a(terminal.o): In function `_rl_enable_meta_key':
|terminal.o(.text+0x7ce): undefined reference to `tputs'
|/usr/lib/libreadline.a(terminal.o): In function `_rl_control_keypad':
|terminal.o(.text+0x7fb): undefined reference to `tputs'
|terminal.o(.text+0x822): undefined reference to `tputs'
|make[2]: *** [psql] Error 1

Sounds like the linker is having trouble finding the ncurses library. I am
not sure exactly where, but somewhere in the make file you need to add:

-l ncurses

This is a compiler option that will tell the linker to link in the ncurses
routines.

Hope this helps...james

Ok, now the question is: where?

I add it in Makefile.global, but nothig.

From Makefile.global:

#-------------------------------------------------------------
# See the subdirectory template for default settings for these
#-------------------------------------------------------------
CC= gcc
YFLAGS= -y -d
YACC= /usr/bin/bison
LEX= flex
AROPT= crs
CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend -lncurses
CFLAGS_SL= -fpic ^^^^^^^^^^^^^^^
LDFLAGS= -ldl -lm -lbsd -lreadline -lhistory
DLSUFFIX= .so

#4Andrea Antibo
antibo@mclink.it
In reply to: James Olin Oden (#2)
Re: [GENERAL] make[2]: *** [psql] Error 1

I add -lncurses like this in Makefile.global:

#-------------------------------------------------------------
# See the subdirectory template for default settings for these
#-------------------------------------------------------------
CC= gcc
YFLAGS= -y -d
YACC= /usr/bin/bison
LEX= flex
AROPT= crs
CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend
CFLAGS_SL= -fpic
LDFLAGS= -ldl -lm -lbsd -lreadline -lhistory -lncurses
DLSUFFIX= .so ^^^^^^^^^^^^^^^^^^

include $(SRCDIR)/Makefile.port

#-----------------------------------------------------

Now make don't get me error like last time but this:

/usr/include/asm/bitops.h:32: warning: no previous prototype for `set_bit'
/usr/include/asm/bitops.h:43: warning: no previous prototype for `clear_bit'
/usr/include/asm/bitops.h:54: warning: no previous prototype for `change_bit'
/usr/include/asm/bitops.h:68: warning: no previous prototype for `test_bit'
/usr/include/asm/bitops.h:76: warning: no previous prototype for `find_first_zer
o_bit'

They are warning, so I don't know if are important, but when initb run I have:

initdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to
create the template database.
initdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the
global classes.
initdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based
authentication control file.

We are initializing the database system with username postgres (uid=26).
This user will own all the files and must also own the server process.

initdb: creating template database in /usr/local/pgsql/data/base/template1
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1
WARN:heap_modifytuple: repl is \ 0
initdb: could not create template database
initdb: cleaning up by wiping out /usr/local/pgsql/data/base/template1

So, another one: HELP

#5The Hermit Hacker
scrappy@hub.org
In reply to: Andrea Antibo (#3)
Re: [GENERAL] make[2]: *** [psql] Error 1

On Tue, 6 Oct 1998, Andrea Antibo wrote:

|/usr/lib/libreadline.a(terminal.o): In function `_rl_enable_meta_key':
|terminal.o(.text+0x7ce): undefined reference to `tputs'
|/usr/lib/libreadline.a(terminal.o): In function `_rl_control_keypad':
|terminal.o(.text+0x7fb): undefined reference to `tputs'
|terminal.o(.text+0x822): undefined reference to `tputs'
|make[2]: *** [psql] Error 1

Sounds like the linker is having trouble finding the ncurses library. I am
not sure exactly where, but somewhere in the make file you need to add:

-l ncurses

This is a compiler option that will tell the linker to link in the ncurses
routines.

Hope this helps...james

Ok, now the question is: where?

I add it in Makefile.global, but nothig.

ave you patched in all the v6.3.2 related patches before all this?
I thought we had fixed it post-release...

Marc G. Fournier scrappy@hub.org
Systems Administrator @ hub.org
scrappy@{postgresql|isc}.org ICQ#7615664

#6Andrea Antibo
antibo@mclink.it
In reply to: The Hermit Hacker (#5)
Re: [GENERAL] make[2]: *** [psql] Error 1

On 13-Oct-98 Marc G. Fournier wrote:

This is a compiler option that will tell the linker to link in the ncurses
routines.

Hope this helps...james

Ok, now the question is: where?

I add it in Makefile.global, but nothig.

ave you patched in all the v6.3.2 related patches before all this?
I thought we had fixed it post-release...

Ok, now I link ncurses exactly in Makefile.global. It's o right.