Re: [HACKERS] building libpq.a static library

2017-07-31 Thread Tom Lane
Peter Eisentraut writes: > On 7/12/17 11:11, Tom Lane wrote: >> FWIW, we used to have support for building static libpq, but >> we got rid of it a long time ago. I couldn't find the exact >> spot in some desultory trawling of the commit history. > We still build and install static libraries. Hm

Re: [HACKERS] building libpq.a static library

2017-07-31 Thread Peter Eisentraut
On 7/12/17 11:11, Tom Lane wrote: > FWIW, we used to have support for building static libpq, but > we got rid of it a long time ago. I couldn't find the exact > spot in some desultory trawling of the commit history. We still build and install static libraries. -- Peter Eisentraut h

Re: [HACKERS] building libpq.a static library

2017-07-13 Thread Jeroen Ooms
On Thu, Jul 13, 2017 at 4:58 AM, Craig Ringer wrote: > You shouldn't ever need static libraries on Windows, though. Because it > searches the CWD first on its linker search path, you can just drop > libpq.dll in the same directory as your binary/library and link to the stub > libpq.lib . This is

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Craig Ringer
On 13 July 2017 at 10:58, Craig Ringer wrote: > On 12 July 2017 at 23:46, Jeroen Ooms wrote: > >> On Wed, Jul 12, 2017 at 5:11 PM, Tom Lane wrote: >> > Jeroen Ooms writes: >> >> I maintain static libraries for libpq for the R programming language >> >> (we need static linking to ship with the

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Craig Ringer
On 12 July 2017 at 23:46, Jeroen Ooms wrote: > On Wed, Jul 12, 2017 at 5:11 PM, Tom Lane wrote: > > Jeroen Ooms writes: > >> I maintain static libraries for libpq for the R programming language > >> (we need static linking to ship with the binary packages). > > > > How do you get that past vend

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Andres Freund
On 2017-07-12 23:55:56 +0100, Greg Stark wrote: > Fwiw I think the real problem is that building static libraries > "properly" requires different compiler options -- notably they're not > normally built with -fPIC. So that means building every object twice > which kind of breaks make's build model

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Greg Stark
On 12 July 2017 at 16:11, Tom Lane wrote: > Jeroen Ooms writes: > >> This works but it's a bit of a pain to maintain. I was wondering if >> this hack could be merged so that the standard 'configure >> --enable-static' script would install a static library for libpq >> alongside the shared one. >

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Jeroen Ooms
On Wed, Jul 12, 2017 at 5:11 PM, Tom Lane wrote: > Jeroen Ooms writes: >> I maintain static libraries for libpq for the R programming language >> (we need static linking to ship with the binary packages). > > How do you get that past vendor packaging policies? When I worked at > Red Hat, there w

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Tom Lane
Jeroen Ooms writes: > I maintain static libraries for libpq for the R programming language > (we need static linking to ship with the binary packages). How do you get that past vendor packaging policies? When I worked at Red Hat, there was a very strong policy against allowing any package to sta

Re: [HACKERS] building libpq.a static library

2017-07-12 Thread Jan de Visser
On Wednesday, July 12, 2017 6:31:09 AM EDT Jeroen Ooms wrote: > I maintain static libraries for libpq for the R programming language > (we need static linking to ship with the binary packages). > Unfortunately currently the standard postgres makefile only generates > a shared library for libpq, not

[HACKERS] building libpq.a static library

2017-07-12 Thread Jeroen Ooms
I maintain static libraries for libpq for the R programming language (we need static linking to ship with the binary packages). Unfortunately currently the standard postgres makefile only generates a shared library for libpq, not a static one. In order to make a static library I always manually ed