Re: Problems with statically linking libpq of Postgres 12.0 + musl

From: Pyry Kontio <pyry(dot)kontio(at)drasa(dot)eu>
To: pgsql-interfaces(at)lists(dot)postgresql(dot)org
Subject: Re: Problems with statically linking libpq of Postgres 12.0 + musl
Date: 2020-02-17 05:31:42
Message-ID: CACS8yHL0gbL3ECONrDygcBioTQBY=oVG-KGWB6+N7spG+eSMQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

After posting the last post, I got an helpful answer on the
#postgres(at)freenode(dot)net, so I'm sharing that here.

It seems that in 12.0 branch, the following change was made:
https://github.com/postgres/postgres/commit/ea53100d5

Some needed source files from libpgcommon and libpqport
used to be directly symlinked to libpq and ecpg sources.
This practice was eschewed to improve maintainability,
so linking libpgcommon and libpqport separatelybecame a necessity.

I was also pointed out that especially libpgcommon defines
some common names without the pg prefix, and if those collide
with names defined elsewhere, funny things will happen.

Nevertheless, the way to link libpq statically from
Postgres 12.0 and on is to include libpgcommon and libpqport.

Thanks for the help to all!
Pyry Kontio

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Stefan Wolf 2020-03-02 14:41:05 MS-ACCESS 2010, ODBC 12.01, Out of Memory
Previous Message Pyry Kontio 2020-02-17 04:35:25 Problems with statically linking libpq of Postgres 12.0 + musl