pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18581: psql symbol append_history not found when quitting
3+ messages / 3 participants
[nested] [flat]

* BUG #18581: psql symbol append_history not found when quitting
@ 2024-08-13 09:22 PG Bug reporting form <noreply@postgresql.org>
  2024-08-13 18:23 ` Re: BUG #18581: psql symbol append_history not found when quitting Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2024-08-13 09:22 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: rjhb@bb-c.de

The following bug has been logged on the website:

Bug reference:      18581
Logged by:          Rainer Brandt
Email address:      rjhb@bb-c.de
PostgreSQL version: 15.8
Operating system:   Solaris 11.4
Description:        

When leaving a psql session via \q in 15.8 (which I built today under Oracle
Solaris 11.4), I get:
 ld.so.1: psql: fatal: relocation error: file
/opt/postgres/15-pgdg/bin/64/psql: symbol append_history: referenced symbol
not found
Killed

Then with nm:
nm /opt/postgres/15-pgdg/bin/64/psql | grep append_history
[1744]  |          4296745248|                   0|FUNC |GLOB |0    |UNDEF 
|append_history
[1511]  |          4295420712|                 112|FUNC |GLOB |0    |14    
|pg_append_history

Previously, I used 15.6, which only uses pg_append_history and doesn't use
append_history.

I also see:
grep -n append_history postgresql-15.8/src/bin/psql/*
postgresql-15.8/src/bin/psql/input.c:114:pg_append_history(const char *s,
PQExpBuffer history_buf)
postgresql-15.8/src/bin/psql/input.c:133: * pg_append_history before we'll
do anything.
postgresql-15.8/src/bin/psql/input.c:453:                       /*
append_history fails if file doesn't already exist :-( */
postgresql-15.8/src/bin/psql/input.c:462:                       errnum =
append_history(nlines, fname);
[...]

Isn't the a "pg_" missing on line 462?

Thank you.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #18581: psql symbol append_history not found when quitting
  2024-08-13 09:22 BUG #18581: psql symbol append_history not found when quitting PG Bug reporting form <noreply@postgresql.org>
@ 2024-08-13 18:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  2024-08-14 05:45   ` Re: BUG #18581: psql symbol append_history not found when quitting Rainer J.H. Brandt <rjhb@bb-c.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2024-08-13 18:23 UTC (permalink / raw)
  To: rjhb@bb-c.de; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> When leaving a psql session via \q in 15.8 (which I built today under Oracle
> Solaris 11.4), I get:
>  ld.so.1: psql: fatal: relocation error: file
> /opt/postgres/15-pgdg/bin/64/psql: symbol append_history: referenced symbol
> not found
> Killed

Hmmm...

> Isn't the a "pg_" missing on line 462?

No.  That's intending to call the readline function append_history.
That call has been there since 2009.  I'm not sure what changed
between your 15.6 and 15.8 builds, but that wasn't it.

However, that call is only compiled if HAVE_APPEND_HISTORY is
defined, which indicates that configure successfully probed
for existence of the function.  Maybe you need to take a closer
look at what configure did?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #18581: psql symbol append_history not found when quitting
  2024-08-13 09:22 BUG #18581: psql symbol append_history not found when quitting PG Bug reporting form <noreply@postgresql.org>
  2024-08-13 18:23 ` Re: BUG #18581: psql symbol append_history not found when quitting Tom Lane <tgl@sss.pgh.pa.us>
@ 2024-08-14 05:45   ` Rainer J.H. Brandt <rjhb@bb-c.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Rainer J.H. Brandt @ 2024-08-14 05:45 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

Tom Lane writes:
> PG Bug reporting form <noreply@postgresql.org> writes:
> > When leaving a psql session via \q in 15.8 (which I built today under Oracle
> > Solaris 11.4), I get:
> >  ld.so.1: psql: fatal: relocation error: file
> > /opt/postgres/15-pgdg/bin/64/psql: symbol append_history: referenced symbol
> > not found
> > Killed
> 
> Hmmm...
> 
> > Isn't the a "pg_" missing on line 462?
> 
> No.  That's intending to call the readline function append_history.
> That call has been there since 2009.  I'm not sure what changed
> between your 15.6 and 15.8 builds, but that wasn't it.
You're right.  The error was mine.

I overlooked that the build machine had a newer libedit library than
the machine on which I tried to use psql.  The newer libedit defines
append_history, and so the build process used it, but the older libedit
doesn't define it.

Sorry for the noise.
Thanks, Rainer





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-08-14 05:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13 09:22 BUG #18581: psql symbol append_history not found when quitting PG Bug reporting form <noreply@postgresql.org>
2024-08-13 18:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-08-14 05:45   ` Rainer J.H. Brandt <rjhb@bb-c.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox