Re: build error in initdb on win32

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: build error in initdb on win32
Date: 2004-10-10 20:26:40
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE456A14@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

>> The underlying problem is still there, though. initdb is pulling all
>> these symbols in from libpq.dll, which is clearly the wrong
>place to get
>> them... Or are they supposed to be available? If so, they should be
>> added to the official API, no?
>
>"Used by our own code" does not equate to "should be part of the
>official API".
>
>> (The problem occured when I tried to fix the problem "fix
>MinGW libpq to
>> export only required symbols". I have a patch that fixes
>this problem,
>> but causes these others instead)
>
>You'd better back off a little on what you're removing. Or forget the
>whole thing; I don't really agree that the above is a bug. libpq has
>always had rather more visible symbols than are in the official API,
>and there are probably people using some of them.

The problem today is that our officially supported build methods
generate two different libpq.dll's that are incompatible with each other
(to the point of causing a SEGV or other such nastyness in a program
using them). I certainly consider that a bug.

How about this. If the required functions (which aren't *too* many) are
added to libpqdll.def, everything returns to working order. It does add
a slight maintainability issue - whenever a new binary is using a
function in libpq never before exported, it has to be added to
libpqdll.def. But since it's never re-ordered, it does not break
backwards compatibility.
Would that be acceptable?

The other option would be to add every single possible output to the
MSVC DLL file. There is no way to do that fromt he MSVC build system
that I can find, so it would require manual updating of that file
whenever any function that ultimatly gets exported from libpq (direct or
indirect) is added, which I beleive would be much more work to maintain.

(Well, the third option is of course to accept that we have to
incompatible libraries witht he same name, but I don't consider that a
"real" option)

//Magnus

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2004-10-10 20:41:54 Re: build error in initdb on win32
Previous Message Tom Lane 2004-10-10 20:07:37 Re: [pgsql-hackers-win32] build error in initdb on win32