Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rT3ZB-0006tF-FD for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jan 2024 17:31:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rT3ZA-001xLC-90 for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jan 2024 17:31:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rT3Z9-001xGK-Oo for pgsql-hackers@lists.postgresql.org; Thu, 25 Jan 2024 17:31:03 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rT3Z6-003gaP-AK for pgsql-hackers@lists.postgresql.org; Thu, 25 Jan 2024 17:31:02 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-290b37bb7deso3401960a91.0 for ; Thu, 25 Jan 2024 09:30:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1706203858; x=1706808658; darn=lists.postgresql.org; h=in-reply-to:subject:from:content-language:references:cc:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=qljqTfSMVrj/pLHsjda+Ta9WB7WSMABSF9N2zHAttQA=; b=3XfptpXmnxuGYV616GqgtY5tWe91diKrJXYajTQrTXByu/BC0eVJgio2BrKYweQfLp w2fEefdVAWVmLUfsNzm/AYBvCNWUjBN+P/ko5NM6VGa62XvFQcxUADFDeRE3adWvfjkN JhTy5UlNFcRarBqRtR1B7NNctK3+0Hgyll38sJPfNiP9s4iLc2vn0lEzPS9LgkAA5Tx6 2l6AIDF8R/+xBu4255UN1U7MVEpJZVBd67i6K/laDB0HS5yc+GNiop5iC6Q98BbW9yJG bsfKuGo+BvzytmS1JiKwtKRF2SzucSQy8jzDxbR3j590xVrEYL04GCjXVfN5fLey8mXJ YlaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706203858; x=1706808658; h=in-reply-to:subject:from:content-language:references:cc:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=qljqTfSMVrj/pLHsjda+Ta9WB7WSMABSF9N2zHAttQA=; b=grUuGejYuvEJE+vEO6mzXeC2RbOKeeBkxLhC9Z1EvUECi7U5VccHXpsHQLKYPxU17j /c3gkZKVSKv/FByNeQdceaHP+KG/gvFOef72AxHGNCP28kvyvMeLXi9tsI7QHJx5Ryub j7Ly7JZ7LGpeADPpUaLTxO9lzEILrFcVuaRZVQADGprY5Q5ZZmGeXGBVKOBZrkIk0iyM 5N0XJlxckIxXfNkeDrqVlsjE7dto9xd563ewpeCs6M1QOftyxBGWQ7rF3r5LOniZJViC la6+2VeEWihbvPUV4M3ppT8PWIMy4Rp9CxdM2B9qQcpBfYxZCYiVx8cssUNjGyDs0X8u Enww== X-Gm-Message-State: AOJu0YwhihgLgSB9mnmtxWmpTpb/e2+pj9oiFRzGh+2/nSqqSOjHkcVE 85Io2aRkRM5r3YWZvb2zBzV6wvGVX++84Hg/loGbO1yaKuhSPf9PK8XNrXsNMBk= X-Google-Smtp-Source: AGHT+IEB30rVfgt0Qv36wcM9sjt0Zn1FQfMOzKFsbOZw/WuM3BMvGCBQr+P1aauh/koqVaFshkpIKg== X-Received: by 2002:a17:90b:d8b:b0:28f:ef6c:75a8 with SMTP id bg11-20020a17090b0d8b00b0028fef6c75a8mr1136306pjb.85.1706203857563; Thu, 25 Jan 2024 09:30:57 -0800 (PST) Received: from ?IPV6:2605:a601:91f3:1900::2bb? ([2605:a601:91f3:1900::2bb]) by smtp.googlemail.com with ESMTPSA id y20-20020ad445b4000000b006816ffc7113sm5574454qvu.63.2024.01.25.09.30.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 09:30:57 -0800 (PST) Content-Type: multipart/alternative; boundary="------------OX50jIe6rJ5EmJCGtU00UrQp" Message-ID: <70d20b11-8ed8-a34e-32d1-8f3015dd771b@dunslane.net> Date: Thu, 25 Jan 2024 12:30:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 To: Michael Paquier , Dave Cramer Cc: Anthony Roberts , Peter Eisentraut , Daniel Gustafsson , Tom Lane , Mike Holmes , Andres Freund , Thomas Munro , PostgreSQL Hackers , Lina Iyer References: <305608.1693457047@sss.pgh.pa.us> <69a26a2a-feaa-43c0-bed3-0f5c2b569a28@eisentraut.org> Content-Language: en-US From: Andrew Dunstan Subject: Re: [PATCH] Add native windows on arm64 support In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------OX50jIe6rJ5EmJCGtU00UrQp Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-01-24 We 19:02, Michael Paquier wrote: > On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote: >> I managed to get it to build the vcvarsall arch needs to be x64. I need to >> add some options, but the patch above needs to be applied to build it. > Nice. If I may ask, what kind of host and/or configuration have you > used to reach a state where the code can be compiled and run tests > with meson? If you have found specific steps, it may be a good thing > to document that on the wiki, say around [1]. > > Perhaps you have not included TAP? It may be fine in terms of runtime > checks and coverage. > > [1]:https://wiki.postgresql.org/wiki/PostgreSQL_Buildfarm_Howto#Running_on_Windows I now have an ARM64 machine, so I set up a W11 ARM64 VM. I think we really want to build with x64_arm64, i.e. to generate native arm64 binaries. Setting just x64 will not do that, AIUI. I tried that with the buidfarm, setting that in the config file's call to PGBuild::VSenv::getenv(). That upset msvc_gendef.pl, so I added this there to keep it happy: $arch = 'x86_64' if $arch eq 'aarch64'; After that things went ok until I got this: [1453/2088] "link" @src/backend/postgres.exe.rsp FAILED: src/backend/postgres.exe src/backend/postgres.pdb "link" @src/backend/postgres.exe.rsp    Creating library src\backend\postgres.exe.lib storage_lmgr_s_lock.c.obj : error LNK2019: unresolved external symbol _mm_pause referenced in function perform_spin_delay src\backend\postgres.exe : fatal error LNK1120: 1 unresolved externals I haven't made further progress, but I will return to it in the next day or so. While this will be nice to have, I think it won't really matter until there is ARM64 support in released versions of Windows Server. AFAICT they still only sell versions for x86_64 cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------OX50jIe6rJ5EmJCGtU00UrQp Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2024-01-24 We 19:02, Michael Paquier wrote:
On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote:
I managed to get it to build the vcvarsall arch needs to be x64. I need to
add some options, but the patch above needs to be applied to build it.
Nice.  If I may ask, what kind of host and/or configuration have you
used to reach a state where the code can be compiled and run tests
with meson?  If you have found specific steps, it may be a good thing
to document that on the wiki, say around [1].

Perhaps you have not included TAP?  It may be fine in terms of runtime
checks and coverage.

[1]: https://wiki.postgresql.org/wiki/PostgreSQL_Buildfarm_Howto#Running_on_Windows



I now have an ARM64 machine, so I set up a W11 ARM64 VM. I think we really want to build with x64_arm64, i.e. to generate native arm64 binaries. Setting just x64 will not do that, AIUI.

I tried that with the buidfarm, setting that in the config file's call to PGBuild::VSenv::getenv().

That upset msvc_gendef.pl, so I added this there to keep it happy:

$arch = 'x86_64' if $arch eq 'aarch64';

After that things went ok until I got this:

[1453/2088] "link" @src/backend/postgres.exe.rsp
FAILED: src/backend/postgres.exe src/backend/postgres.pdb
"link" @src/backend/postgres.exe.rsp
   Creating library src\backend\postgres.exe.lib
storage_lmgr_s_lock.c.obj : error LNK2019: unresolved external symbol _mm_pause referenced in function perform_spin_delay
src\backend\postgres.exe : fatal error LNK1120: 1 unresolved externals


I haven't made further progress, but I will return to it in the next day or so.

While this will be nice to have, I think it won't really matter until there is ARM64 support in released versions of Windows Server. AFAICT they still only sell versions for x86_64



cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------OX50jIe6rJ5EmJCGtU00UrQp--