Re: windows resource files, bugs and what do we actually want

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: windows resource files, bugs and what do we actually want
Date: 2022-09-02 01:26:16
Message-ID: 20220902012616.jrr2fnjspwtknwsc@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-08-29 15:13:14 -0700, Andres Freund wrote:
> 1) For make based builds, all libraries that are built with MODULES rather
> than MODULES_big have the wrong "FILETYPE", because Makefile.win32 checks
> $(shlib), which is only set for MODULES_big.
>
> This used to be even more widely wrong until recently:
>
> commit 16a4a3d59cd5574fdc697ea16ef5692ce34c54d5
> Author: Peter Eisentraut <peter(at)eisentraut(dot)org>
> Date: 2020-01-15 10:15:06 +0100
>
> Remove libpq.rc, use win32ver.rc for libpq
>
> Afaict before that we only set it correctly for pgevent.
>
> 2) For make base builds, We only set InternalName, OriginalFileName when
> $shlib is set, but InternalName, OriginalFilename are required.
>
> https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
>

These are harder to fix than was immediately obvious to me. We generate one
win32ver.rc per directory, even if a directory contains multiple build
products (think MODULES or src/bin/scripts). So we simply can't put a correct
filename etc into the .rc file, unless we change the name of the .rc file.

I looked into how hard it would be to fix this on the make side, and decided
it's too hard. I'm inclined to leave this alone and fix it later in the meson
port.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2022-09-02 01:27:12 Re: Can we avoid chdir'ing in resolve_symlinks() ?
Previous Message Jonathan S. Katz 2022-09-02 01:10:39 Re: PostgreSQL 15 release announcement draft