Re: CVS Head psql bug? - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: CVS Head psql bug?
Date
Msg-id 20080626.080258.50336227.t-ishii@sraoss.co.jp
Whole thread Raw
In response to CVS Head psql bug?  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: CVS Head psql bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> > I'm getting following error while envoking psql:
> > $ psql
> > psql: symbol lookup error: /usr/lib/libreadline.so.5: undefined symbol: BC
> 
> I believe this is the typical symptom of failing to link to the correct
> variant of curses/termcap needed by readline.  We haven't changed the
> code around that in awhile --- is this a different platform than you've
> used before?
> 
>             regards, tom lane

Sorry for not follow the thread and posting from different account
than before. I'm currently having trouble with ishii@postgresql.org
account. Marc is kindly working for me and will be fixed soon but...

No the plaform is not changed. I compare the link command for psql 8.3
and current.

8.3:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels -fno-strict-aliasing command.o common.o
help.oinput.o stringutils.o mainloop.o copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o psqlscan.o
tab-complete.ombprint.o dumputils.o  ../../../src/backend/parser/keywords.o -L../../../src/port -lpgport
-L../../../src/interfaces/libpq-lpq -L../../../src/port  -Wl,-rpath,'/usr/local/pgsql/lib' -lpgport -lz -lreadline
-lncurses-lcrypt -ldl -lm  -o psql
 

CVS Head:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels -fno-strict-aliasing command.o common.o
help.oinput.o stringutils.o mainloop.o copy.o startup.o prompt.o variables.o large_obj.o print.o describe.o psqlscan.o
tab-complete.ombprint.o dumputils.o  ../../../src/backend/parser/keywords.o -L../../../src/port -lpgport
-L../../../src/interfaces/libpq-lpq -L../../../src/port -Wl,--as-needed -Wl,-rpath,'/usr/local/src/pgsql/current/lib'
-lpgport-lz -lreadline -lncurses -lcrypt -ldl -lm  -o psql
 

So the difference seems:

--as-needed -Wl,

is added to CVS Head. Actually if I remove the option and link psql,
then everything is fine. Any idea?
--
Tatsuo Ishii
SRA OSS, Inc. Japan


pgsql-hackers by date:

Previous
From: Nick
Date:
Subject: Re: Creating a VIEW with a POINT column
Next
From: Jan Urbański
Date:
Subject: Re: Creating a VIEW with a POINT column