Subject: Trying to build x86 version on windows using meson

From: Dave Cramer <[email-masked]>
Date: Wed, 20 Mar 2024 16:14:23 -0400

Greetings,

I am getting the following error

meson.build:1479:17: ERROR: Can not run test applications in this cross
environment.

Have configured for amd64_x86

Running `meson setup --wipe build --prefix=c:\postgres86`

The docs say it is possible to build postgres for x86. Are there specific
instructions ?

Dave Cramer

---

From: Andres Freund <[email-masked]>
Date: Wed, 20 Mar 2024 14:11:33 -0700

Hi,

> Running `meson setup --wipe build --prefix=c:\postgres86`

This is not enough information to debug anything. At the very least we need
the exact steps performed to set up the build and meson-logs/meson-log.txt

> The docs say it is possible to build postgres for x86. Are there specific

It should work.

Greetings,

Andres Freund

---

From: Dave Cramer <[email-masked]>
Date: Wed, 20 Mar 2024 17:49:14 -0400

On Wed, 20 Mar 2024 at 17:11, Andres Freund <[email-masked]> wrote:

> First off this is on an ARM64 machine

The last error from meson-log.txt is

...
Checking if "c99" compiles: YES

...

---

From: Peter Eisentraut <[email-masked]>
Date: Thu, 21 Mar 2024 08:56:53 +0100

On 20.03.24 22:49, Dave Cramer wrote:
> 
> 
> 
> On Wed, 20 Mar 2024 at 17:11, Andres Freund <[email-masked] 
> <mailto:[email-masked]>> wrote:
> 
>     Hi,
> 

I have never tried this, but there are instructions for cross-compiling 
with meson: https://mesonbuild.com/Cross-compilation.html