Failure during Building Postgres in Windows with Meson
Hi,
I am trying to build postgres with meson on Windows. And I am stuck in
the process.
Steps I followed:
1. I clone postgres repo
2.Installed meson and ninja
pip install meson ninja
3. Then running following command:
meson setup build --buildtype debug
4. Then I ran
cd build
ninja
Got following error
D:\project\repo\pg_meson\postgres\build>C:\Users\kyals\AppData\Roaming\Python\Python311\Scripts\ninja
ninja: error: 'src/backend/postgres_lib.a.p/meson_pch-c.obj', needed
by 'src/backend/postgres.exe', missing and no known rule to make it.
Any thoughts on how to resolve this error?
Thanks
Shlok Kumar Kyal
Hi,
Adding Kyotaro to CC because Kyotaro reported a similar issue before [1]/messages/by-id/20231018.113148.1275969479525954369.horikyota.ntt@gmail.com.
On Thu, 9 Nov 2023 at 11:59, Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
Hi,
I am trying to build postgres with meson on Windows. And I am stuck in
the process.Steps I followed:
1. I clone postgres repo
2.Installed meson and ninja
pip install meson ninja3. Then running following command:
meson setup build --buildtype debug4. Then I ran
cd build
ninjaGot following error
D:\project\repo\pg_meson\postgres\build>C:\Users\kyals\AppData\Roaming\Python\Python311\Scripts\ninja
ninja: error: 'src/backend/postgres_lib.a.p/meson_pch-c.obj', needed
by 'src/backend/postgres.exe', missing and no known rule to make it.
I am able to reproduce the error. This error was introduced at meson
v1.2.0, v1.1.0 and before work successfully. It seems meson tries to
use pch files although Postgres is compiled with b_pch=false.
This error occurs when Developer Powershell for VS is used and
Postgres is compiled with b_pch=false option (which is the default on
Postgres). If the -Db_pch=true option or the default powershell is
used, Postgres gets built successfully.
[1]: /messages/by-id/20231018.113148.1275969479525954369.horikyota.ntt@gmail.com
--
Regards,
Nazir Bilal Yavuz
Microsoft
Can you try with Meson v1.2.3?
--
Tristan Partin
Neon (https://neon.tech)
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
--
Regards,
Nazir Bilal Yavuz
Microsoft
On Thu Nov 9, 2023 at 9:31 AM CST, Nazir Bilal Yavuz wrote:
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
Please open a bug in the Meson repository which also mentions the last
known working version. I wonder what versions of Meson we use in the
build farm.
--
Tristan Partin
Neon (https://neon.tech)
On 2023-11-09 Th 10:42, Tristan Partin wrote:
On Thu Nov 9, 2023 at 9:31 AM CST, Nazir Bilal Yavuz wrote:
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
Please open a bug in the Meson repository which also mentions the last
known working version. I wonder what versions of Meson we use in the
build farm.
fairywren / drongo have 1.0.1
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
On Thu, 9 Nov 2023 at 21:12, Tristan Partin <tristan@neon.tech> wrote:
On Thu Nov 9, 2023 at 9:31 AM CST, Nazir Bilal Yavuz wrote:
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
Please open a bug in the Meson repository which also mentions the last
known working version. I wonder what versions of Meson we use in the
build farm.
Should we document the supported meson version that should be used for
building from source?
Regards,
Vignesh
Hi,
On 2023-11-10 08:17:48 +0530, vignesh C wrote:
On Thu, 9 Nov 2023 at 21:12, Tristan Partin <tristan@neon.tech> wrote:
On Thu Nov 9, 2023 at 9:31 AM CST, Nazir Bilal Yavuz wrote:
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
Please open a bug in the Meson repository which also mentions the last
known working version. I wonder what versions of Meson we use in the
build farm.Should we document the supported meson version that should be used for
building from source?
It should be supported, I think we need to analyze the problem further
first. It's extremely odd that the problem only happens when invoked from one
version of powershell but not the other. I assume there's a difference in
PATH leading to a different version of *something* being used.
Bilal, you apparently can repro the failure happening in one shell but not the
other? Could you send the PATH variable set in either shell and
meson-logs/meson-log.txt for both the working and non-working case?
Andres
Hi,
On Fri, 10 Nov 2023 at 06:06, Andres Freund <andres@anarazel.de> wrote:
Bilal, you apparently can repro the failure happening in one shell but not the
other? Could you send the PATH variable set in either shell and
meson-logs/meson-log.txt for both the working and non-working case?
Yes, all of them are attached.
--
Regards,
Nazir Bilal Yavuz
Microsoft
On Thu Nov 9, 2023 at 9:31 AM CST, Nazir Bilal Yavuz wrote:
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
An employee at Collabora produced a fix[0]https://github.com/mesonbuild/meson/pull/12498. It might still be worthwhile
however to see why it happens in one shell and not the other.
[0]: https://github.com/mesonbuild/meson/pull/12498
--
Tristan Partin
Neon (https://neon.tech)
Hi,
On November 10, 2023 10:53:12 AM PST, Tristan Partin <tristan@neon.tech> wrote:
On Thu Nov 9, 2023 at 9:31 AM CST, Nazir Bilal Yavuz wrote:
Hi,
On Thu, 9 Nov 2023 at 18:27, Tristan Partin <tristan@neon.tech> wrote:
Can you try with Meson v1.2.3?
I tried with Meson v1.2.3 and upstream, both failed with the same error.
An employee at Collabora produced a fix[0].
If I understand correctly, you can thus work around the problem by enabling use of precompiled headers. Which also explains why CI didn't show this - normally on Windows you want to use pch.
It might still be worthwhile however to see why it happens in one shell and not the other.
It's gcc vs msvc due to path.
Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.