Re: Trying to build x86 version on windows using meson

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Trying to build x86 version on windows using meson
Дата
Msg-id 20240323000336.eepe6hmiglapzmp6@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Trying to build x86 version on windows using meson  (Dave Cramer <davecramer@gmail.com>)
Список pgsql-hackers
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:\ProgramFiles\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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: session username in default psql prompt?
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: New Table Access Methods for Multi and Single Inserts