Re: Static build of psql with readline support - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: Static build of psql with readline support
Date
Msg-id 44221D47.9020802@paradise.net.nz
Whole thread Raw
In response to Re: Static build of psql with readline support  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: Static build of psql with readline support
List pgsql-hackers
Andrew Dunstan wrote:
> Mark Kirkwood said:
> 
>>Andrew Dunstan wrote:
>>
>>>Mark Kirkwood said:
>>>
>>>
>>>>Christopher Kings-Lynne wrote:
>>>>
>>>>
>>>>>>To the GP, adding -lncurses (or rather the static equivalent) to
>>>>>>your link line should solve it. But if you include any other
>>>>>>libraries like ssl or kerberos be prepared to add a lot more.
>>>>>
>>>>>
>>>>>With -lncurses or -lcurses I still can't get this to work.  I add it
>>>>>to  the ${CC} line, right?
>>>>>
>>>>
>>>>This is what I used (current 8.2 sources FreeBSD 6.0):
>>>>
>>>>
>>>>*** Makefile.orig       Thu Mar 23 14:37:37 2006
>>>>--- Makefile    Thu Mar 23 14:40:46 2006
>>>>***************
>>>>*** 27,32 ****
>>>>--- 27,34 ----
>>>>
>>>> FLEXFLAGS = -Cfe
>>>>
>>>>+ CFLAGS += -static
>>>>+ LIBS += -lcurses
>>>>
>>>> all: submake-libpq submake-libpgport submake-backend psql
>>>>
>>>
>>>
>>>That might work on FBSD but it doesn't work everywhere  - when I tried
>>>it on Linux I got nasty link errors.
>>>
>>
>>It does for me (2.6.15-gentoo-r5) - note that my previous mail is way
>>too vague about which Makefile to patch (sorry): src/bin/psql/Makefile.
> 
> 
> FC3:
> 
> /home/andrew/pglive/pgsql.plperl-pq/src/interfaces/libpq/ip.c:79: warning:
> Using 'getaddrinfo' in statically linked applications requires at runtime the
> shared libraries from the glibc version used for linking
> collect2: ld returned 1 exit status
> make: *** [psql] Error 1
> 


Is that after patching only the psql Makefile? Interesting - you 
wouldn't think FC3 would be *that* different ....

Cheers

Mark


pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: Static build of psql with readline support
Next
From: "Andrew Dunstan"
Date:
Subject: Re: Static build of psql with readline support