public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andres Freund <[email protected]>
To: Dave Cramer <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Trying to build x86 version on windows using meson
Date: Fri, 22 Mar 2024 17:03:36 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CADK3HHLJxW-_iAW6LeEBONMpi49nwMfuh4An6=gOanB2rj3NmQ@mail.gmail.com>
References: <CADK3HHLRWj5pXZjLJNw-OHuak9mJ2gTFyB+RpzjNhu4G07kz6Q@mail.gmail.com>
<[email protected]>
<CADK3HH+D0O5A00vGsurCs_xu02F_ad2z6mTRk=6mEvWb5DK6Mw@mail.gmail.com>
<[email protected]>
<CADK3HHKyn-rAhohR+tN+0cvVjW3k9wmbQG=stPJWukoGJmddvA@mail.gmail.com>
<[email protected]>
<CADK3HHLJxW-_iAW6LeEBONMpi49nwMfuh4An6=gOanB2rj3NmQ@mail.gmail.com>
Hi,
On 2024-03-21 13:17:44 -0400, Dave Cramer wrote:
> Attached correct log file
Hm. So there's something a bit odd:
> Build started at 2024-03-21T13:07:08.707715
> Main binary: C:\Program Files\Meson\meson.exe
> Build Options: '-Dextra_include_dirs=c:\Program Files\OpenSSL-Win64\include' -Derrorlogs=True '-Dextra_lib_dirs=c:\Program Files\OpenSSL-win64' '-Dprefix=c:\postgres86'
> Python system: Windows
> The Meson build system
> Version: 1.3.1
> Source dir: C:\Users\davec\projects\postgresql
> Build dir: C:\Users\davec\projects\postgresql\build
> Build type: native build
So meson thinks this is a native build, not a cross build. But then later
realizes that generated binaries and the current platform aren't the same. And
thus errors out.
The line numbers don't match my tree, but I think what's failing is the
sizeof() check. Which has support for cross builds, but it only uses that
(slower) path if it knows that a cross build is being used.
I suggest actually telling meson to cross compile. I don't quite know what
properties you're going to need, but something like the following (put it in a
file, point meson to it wity --cross-file) might give you a start:
[properties]
needs_exe_wrapper = false
[binaries]
c = 'cl'
cpp = 'cl'
ar = 'lib'
windres = 'rc'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
Greetings,
Andres Freund
view thread (5+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Trying to build x86 version on windows using meson
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox