Обсуждение: HP-UX 11.11 PostgreSQL 8.3.1 - psql core dumps - Unresolved symbol: tgetent

Поиск
Список
Период
Сортировка

HP-UX 11.11 PostgreSQL 8.3.1 - psql core dumps - Unresolved symbol: tgetent

От
"Mihai Criveti"
Дата:
I've compiled PostgreSQL 8.3.1 using gcc 4.2.3 on HP-UX 11i v1, and all went well. PostgreSQL works and everything,
exceptfor psql client:<br /><br />$ ldd /usr/local/pgsql/bin/psql<br />         =><br />        /usr/lib/libc.2
=>     /usr/lib/libc.2<br />         /usr/lib/libdld.2 =>    /usr/lib/libdld.2<br />        /usr/lib/libc.2
=>     /usr/lib/libc.2<br />        /usr/lib/libm.2 =>      /usr/lib/libm.2<br />       
/usr/local/lib/libreadline.sl=>        /usr/local/lib/libreadline.sl<br />         /usr/local/lib/libz.sl
=>      /usr/local/lib/libz.sl<br />        /usr/lib/libxnet.2 =>   /usr/lib/libxnet.2<br />       
/usr/lib/libxti.2=>    /usr/lib/libxti.2<br />        ../../../src/interfaces/libpq/libpq.sl.5 =>    
/usr/local/pgsql/lib/libpq.sl.5<br/><br />$ /usr/local/pgsql/bin/psql<br />Welcome to psql 8.3.1, the PostgreSQL
interactiveterminal.<br /><br />Type:  \copyright for distribution terms<br />       \h for help with SQL commands<br
/>      \? for help with psql commands<br />        \g or terminate with semicolon to execute query<br />       \q to
quit<br/><br />/usr/lib/dld.sl: Unresolved symbol: tgetent (code)  from /usr/local/lib/libreadline.sl<br />LOG: 
unexpectedEOF on client connection<br />ABORT instruction (core dumped)<br /><br /><br /># swlist | grep readline<br
/> readline                      5.2            readline <br /><br />$ file /usr/local/lib/libreadline.sl<br />  
/usr/local/lib/libreadline.sl: PA-RISC2.0 shared library<br /><br /><br />As you can see, the older version of psql
(7.4.2)works fine:<br /><br />$ psql<br />Welcome to psql 7.4.2, the PostgreSQL interactive terminal.<br /><br />Type: 
\copyrightfor distribution terms<br />       \h for help with SQL commands<br />       \? for help on internal slash
commands<br/>       \g or terminate with semicolon to execute query<br />        \q to quit<br /><br /><br />$ psql
-l<br/>        List of databases<br />   Name    |  Owner   | Encoding<br />-----------+----------+-----------<br
/> postgres | postgres | SQL_ASCII<br /> template0 | postgres | SQL_ASCII<br /> template1 | postgres | SQL_ASCII<br />
(3rows)<br /><br />$ /usr/local/pgsql/bin/createdb test<br />$ psql -l<br />        List of databases<br />   Name   
| Owner   | Encoding  <br />-----------+----------+-----------<br /> postgres  | postgres | SQL_ASCII<br /> template0 |
postgres| SQL_ASCII<br />  template1 | postgres | SQL_ASCII<br /> test      | postgres | SQL_ASCII<br />(4 rows)<br
/><br/><br /><br />If needed, I can attach a core dump.<br /><br />Regards, cmihai<br /><br />--<br />Criveti Mihai<br
/><ahref="http://unixsadm.blogspot.com">http://unixsadm.blogspot.com</a><br /> 

Re: HP-UX 11.11 PostgreSQL 8.3.1 - psql core dumps - Unresolved symbol: tgetent

От
Martijn van Oosterhout
Дата:
On Tue, Mar 25, 2008 at 04:54:59PM +0200, Mihai Criveti wrote:
> I've compiled PostgreSQL 8.3.1 using gcc 4.2.3 on HP-UX 11i v1, and all went
> well. PostgreSQL works and everything, except for psql client:
>
> $ /usr/local/pgsql/bin/psql
> Welcome to psql 8.3.1, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help with psql commands
>        \g or terminate with semicolon to execute query
>        \q to quit
>
> /usr/lib/dld.sl: Unresolved symbol: tgetent (code)  from
> /usr/local/lib/libreadline.sl

tgetent is from curses/ncurses. When readline is built it either takes
a system version or a builtin one. Evidently it thinks there ought to
be a system version somewhere. In any case it looks like your readline
library uses curses but doesn't actually link to it, which is bad.

You can probably work around it by adding -lcurses to the psql link
line, but fixing readline would be better.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Re: HP-UX 11.11 PostgreSQL 8.3.1 - psql core dumps - Unresolved symbol: tgetent

От
Tom Lane
Дата:
"Mihai Criveti" <cmihai@boreas.ro> writes:
> I've compiled PostgreSQL 8.3.1 using gcc 4.2.3 on HP-UX 11i v1, and all went
> well. PostgreSQL works and everything, except for psql client:

> /usr/lib/dld.sl: Unresolved symbol: tgetent (code)  from
> /usr/local/lib/libreadline.sl

Kinda looks like your libreadline is broken.

> As you can see, the older version of psql (7.4.2) works fine:

Maybe that was built without readline support?
        regards, tom lane