Re: [pgsql-hackers-win32] VC++ psql build broken - Mailing list pgsql-patches

From Dave Page
Subject Re: [pgsql-hackers-win32] VC++ psql build broken
Date
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E430673D@ratbert.vale-housing.co.uk
Whole thread Raw
List pgsql-patches

> -----Original Message-----
> From: pgsql-hackers-win32-owner@postgresql.org
> [mailto:pgsql-hackers-win32-owner@postgresql.org] On Behalf
> Of Dave Page
> Sent: 28 September 2004 12:06
> To: Bruce Momjian
> Cc: PgSQL Win32 developers; PostgreSQL Patches
> Subject: Re: [pgsql-hackers-win32] VC++ psql build broken
>
> - The crash I was seeing last night appears to only occur
> when using mingw compiled libpq. Using the ones compiled with
> the VC++ build works just fine. The Windows installer puts
> libpq.dll and a couple of SSL libs in the Windows\System32
> directory, so this potentially could cause some support emails.

Following up myself, it appears that the mingw build exports all symbols
into pq.def before linking. The MSVC++/Borland builds uses a much more
limited set of exports which appear to correspond with the published API
(see all the other .def files in src/interfaces/libpq). A quick manual
build using the mingw link steps, but substituting libpqdll.def for
pq.def builds a dll which appears to work. pgAdmin does not however,
though it appears that is because it is trying to use Pqgetssl et al.
which do not appear to be exported by the Win32 .def file.

It seems to me that the correct way to fix this is to add .def files for
SSL enabled builds of libpq, and stop the mingw build exporting every
symbol. I can probably fix the vc/borland builds (if that is the correct
way forward), but I don't know enough about make to fix the mingw build.

Regards, Dave.

pgsql-patches by date:

Previous
From: "Dave Page"
Date:
Subject: Re: [pgsql-hackers-win32] VC++ psql build broken
Next
From: Tom Lane
Date:
Subject: Re: 8.0.0beta3 duration logging patch