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.96) (envelope-from ) id 1wHRsd-007B1G-0n for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2026 19:44:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wHRrc-00ExdB-1n for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2026 19:43:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wHRrb-00Exd2-2h for pgsql-hackers@lists.postgresql.org; Mon, 27 Apr 2026 19:43:28 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wHRrX-000000034r3-1ofo for pgsql-hackers@lists.postgresql.org; Mon, 27 Apr 2026 19:43:25 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-479dc6d26e3so4405183b6e.0 for ; Mon, 27 Apr 2026 12:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777319003; x=1777923803; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9b5mIhNmomLFegBd1mc8YwASkyKlX8umL6MLNDXG9J8=; b=VDGreXz5SD7YP8lcUVwOJzyAB2Y+pShZbqCd6eSx60v7o8wNXmr59IymiFSKdwJXcw xuy9KBzWK4gwJZ8Mhfx9z/Ki5gNZJY6AnuhNx/COFYeREXzC0hqtugsOFpCK7VN3n+4/ z8gqy3XO6GTBZvux7TI3HpEC/wXtndb6BPaoe62cJlBN4OC4/G0Y/VB+KqLeTCkPnEru S0t54ubmBtrCTrV3/tu25XbknKKY3SOhLCPEvmSGV1q/qukJco7sp/CgOU9eiMB6SEDV 4b0wbzwMyi3nw3LPirCq5Bz0zCZGkUVLdzXfubZ1H5r5auuaUw7JXzfFOrgRRZI7FEKK Xk9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777319003; x=1777923803; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9b5mIhNmomLFegBd1mc8YwASkyKlX8umL6MLNDXG9J8=; b=f4QfkNBAd9SmLQEibcVwCAORWPowmJYb/Q55u68+8wp7AgFUZ/6vm5dVo8lYlYUyaE 1HIk6PfIRPAebht/wjMbt4sVAp1qT6K/Upx+vL3THgX3kOzexsdDY1xzgbcMDNZvBbCK PvBYxWVQPmTm1bC9cG7ur3EjfWQRDMbhq26L3pF10vEX1cyh4c6FvptlXWgTqch8a/FD MG0OcgWY0G+j7aJwA2RWNylinzPmNrvh8NBHcYoN+wVuGvxvBOS+4dFEWjeS5WoO3bOv h52RshsDv6b6Nz0T1WoH3PKTs6YJFcMa2QfDX+XYvYQPcQIwWB1daDJ3+z+FEyz0hyng 6mDw== X-Forwarded-Encrypted: i=1; AFNElJ8IgHXfGRnzvE3oTlaSnevADotwWODE83FjqOPN6Zpl2CqAmZzC+IlTG95A0VDxyE/IpGfbAo6PF6gZ1Cxq@lists.postgresql.org X-Gm-Message-State: AOJu0YyDs+sFZmT1YXWnH1j7ebawpyFjRFp+1r/CmRnD2B0gMbWVSgus tUvVAr5ReuMOoMPh+FnjeWXWwyJgDPPzAHL5U8tTapoIUxWpJTcM+La9 X-Gm-Gg: AeBDievMfe8nT20UTLBoRDuS6fPyNiejknNUJhM9gjCf0dES2VeBlBqBInf2BRIKkIp VrHy9CAAzpPu4bY9bEOzkwHhyRTOeGSEABZ/KVb2Fce0UDpphkO9xdEYGP5PLSXNWNsxHdl1x53 GNg2tBUFrCGWPABD+rGFUQI3TnUG9UKqhkQzt7S9dXppJyxuyYRxUqUEj+UlrGf4apPsOaX6Flb y5whz4vLxi+sDib2XdyLjDCTApkId71uRCMkbKAnv43hIRvuQVLz2IpteGqNrf97PDZpUEM5RbN XmPj6MREV4/OpBgFA7CZ/SyjC7jo/9HjZJUNa6qHBtd1S/bCiE7mYfU62+oXE/UqWUbam2E4wpl wfsqZgMUDnIIrlndGBwkzvIa7VpLrCmuG64/GhtDp501W9YWMR2SdYshLXCt5W3mALrmNYNJnfQ 8gqWbygpiLW22y4ZMpSSAfUOcsJsQKoqNFarDHwVGKmQe+cN4BDfrhJrQZ0isIpRjaujFadNhxM xHCuGmHB+LjXpiYpzEWMXZA46VbHKzb X-Received: by 2002:a05:6808:1929:b0:479:f80c:7891 with SMTP id 5614622812f47-47c28f9b3d0mr67936b6e.28.1777319002723; Mon, 27 Apr 2026 12:43:22 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 5614622812f47-47c291759a3sm30817b6e.11.2026.04.27.12.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2026 12:43:22 -0700 (PDT) Date: Mon, 27 Apr 2026 14:43:20 -0500 From: Nathan Bossart To: Tom Lane Cc: Peter Eisentraut , Zhang Mingli , PostgreSQL Hackers , johncnaylorls@gmail.com Subject: Re: [BUG?] macOS (Intel) build =?utf-8?Q?w?= =?utf-8?Q?arnings=3A_=22ranlib=3A_file_?= =?utf-8?B?4oCm?= has no symbols" for aarch64 objects Message-ID: References: <229aaaf3-f529-44ed-8e50-00cb6909af21@Spark> <4df5af1a-8528-4f9f-9daf-ec069bd66f69@eisentraut.org> <1453046.1770218933@sss.pgh.pa.us> <1472307.1770229663@sss.pgh.pa.us> <2446899.1777256313@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="hkdbXvMpLkOB7zGI" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hkdbXvMpLkOB7zGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Apr 26, 2026 at 09:31:37PM -0500, Nathan Bossart wrote: > On Sun, Apr 26, 2026 at 10:18:33PM -0400, Tom Lane wrote: >> I previously suggested that we should teach the build systems not >> to build the foo_x86 and foo_aarch64 modules when not on those >> architectures. That was shot down for reasons that made no great >> amount of sense to me, but I think it'd be fairly easy and clean. > > Yeah, AFAICT that's our best bet. Will write it up in the morning. Here's what I have so far. Two notes: * Since pg_popcount_aarch64.c only builds symbols when USE_NEON is defined, I needed to teach the build code about that #define. So, this patch effectively moves USE_NEON and USE_SSE2 from c.h to pg_config.h, which happens to be the first #include within c.h. The reason that I bring this up is because back-patching it seems a little scary, although I don't see any concrete reasons it would be unsafe. * pg_cpu_x86.c has a similar problem, which I haven't fixed yet. Presumably a similar approach will work there. I've added John Naylor to this thread for his thoughts. -- nathan --hkdbXvMpLkOB7zGI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v1-0001-avoid-ranlib-warnings-on-macOS.patch