Re: Static build of psql with readline support

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: Static build of psql with readline support
Дата
Msg-id 4418D701.2090409@paradise.net.nz
обсуждение исходный текст
Ответ на Static build of psql with readline support  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: Static build of psql with readline support  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Christopher Kings-Lynne wrote:
> Hi guys,
> 
> I've been trying to build the cvs checkout of 8.1.3 on my freebsd 4.9 
> box with a STATIC psql utility.  I keep getting failures trying to hook 
> in libreadline I think:
> 
> lreadline -lcrypt -lcompat -lm -lutil  -o psql
> /usr/lib/libreadline.a(terminal.o): In function `_rl_get_screen_size':
> terminal.o(.text+0x84): undefined reference to `tgetnum'
> terminal.o(.text+0xdd): undefined reference to `tgetnum'
> /usr/lib/libreadline.a(terminal.o): In function `rl_resize_terminal':
> terminal.o(.text+0x1ce): undefined reference to `tgetstr'
> /usr/lib/libreadline.a(terminal.o): In function `_rl_init_terminal_io':
> terminal.o(.text+0x2c6): undefined reference to `tgetent'
> terminal.o(.text+0x4a9): undefined reference to `tgetflag'
> ...more...
> 
> It builds fine if I use --disable-readline, but other than that I simply 
> can't get it to build.  I've done gmake distclean, reconfigured, etc.
> 
> How do I get this to work?  I've basically just added '-static' to the 
> psql Makefile, eg: 'psql: ${CC} -static ...'
> 
> I can build static pg_dump and pg_dumpall just fine (they don't use 
> readline though of course.)
> 

Add a -lcurses as well, as it seems that as soon as you force static, 
libreadline needs to be told explicitly about libcurses. I'm on FreeBSD 
6.0, but hopefully this is what is going on on 4.9 too.

Cheers

Mark



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Static build of psql with readline support
Следующее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: Pregunta sobre limitar el