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 1wHSBH-007BON-0n for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2026 20:03:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wHSBG-00F2IK-0c for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Apr 2026 20:03:46 +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.96) (envelope-from ) id 1wHSBF-00F2IB-2f for pgsql-hackers@lists.postgresql.org; Mon, 27 Apr 2026 20:03:45 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wHSBD-00000003POC-31b7 for pgsql-hackers@lists.postgresql.org; Mon, 27 Apr 2026 20:03:45 +0000 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-479d85152c9so3005082b6e.2 for ; Mon, 27 Apr 2026 13:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777320220; x=1777925020; 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=tz1btY05XGAAl4d6l9HlFROM/icDThYgsmXd0nCysmk=; b=f2PgdGMExQ3pyOHmwgpdKcmliUfedcTInqM4680/pfYpe22t8cynD7X+XpT+dDQ8YK vXCyiHuC4NxR70+MgQD6msvSwMGAyqqh36jTAnaMP9eRYP77ht4YvaRhtErH9aqaaO/2 0Dt3SIFk43mCTRSuZDffLO97LeCQifnZwN8XPMA8RucWi0K+kws2dGsjWJks47bmNoPY ZETcU1vIfCpbCfd10rIlXSCMPb3s4a+ots2ov7qy7rIY2gti588vYLE9naKyLsFlS3wu v2vsrt+u5jLpB1u5LoHjg/PZno8jZR/2Tl/p2gNx4j6J8990rNOibyUdqq0+G3jQv68x hCrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777320220; x=1777925020; 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=tz1btY05XGAAl4d6l9HlFROM/icDThYgsmXd0nCysmk=; b=WlFfd95dAsYoo1pCnp+Zj4AENIZQCv9PEQTJpjinTfsNGgdD+uUAF885iZbzhqPNOR vGYd/sZvHVgl2J+xQ7YSMFouACCIfqHSMHBI7/frkXlWH+in2iGXpAkIPEEv9OtTLBcR na4vDbUu2bMyheEDFyRLMMdFgRisXIxeZIp8OTpzy8l8cgtRNOqBAxmcFgJv0oL6KPTk ozgv2KNZZNTsxcyY7EPXy5TkGfbHn7A5wBgz5VbzdUm8HFujBZrorHci2RG0NyzqDErJ CwwsL8bC7iOFImb064dbJsEVpIpgM+ED3bFPfVhPoYUubEwzvNj4RqTEUrmI7TLRAEKQ 3SMQ== X-Forwarded-Encrypted: i=1; AFNElJ+EzVqoAs9Q62WdqQoS6VA9M5QUGo61ewET94heXjgCIT/Q2xXinA7wnuAy9NMcgJ9NOxKBL37mFesUd4BA@lists.postgresql.org X-Gm-Message-State: AOJu0Yz2qXXkOAXiveBVYOMhTBzQUIz/x4KBMqBipD4uH7cQzL8HgLG5 3NrAp2AJ0VOj6J2mywc15/LF0q8SvcrylXjX58Icot57T1G5sGnPqo6K X-Gm-Gg: AeBDievQ8jC5RzBW4Q24naRPDzfARA/P1u+dl5yJ/yB195l6P9YamEQtIJMGvmxdR11 pMFTYoMDKsHbEMw4fHuw9ys5K6OE/ahR+HwM/MwyuFmdJrRHFkLtTIZHKRXZnNFGpbsP+3dGadB B62RqVW8YHeOsFgKuoNY19elzxHpPSJ4LuW+eU7Ztto20Tfy1UZ4RXr807H3mOjag4AyBc9Izmt ysHS2pqnroVtGU5uiwRdAU2Qd3sBdzMxk+5YBZbZ2RO7Amo/0h1kDVMGQWTLuV3z+NPEQfCzCD0 Akn5bnb0fsfyMDUtiTrJ0M9bLAWq+mJW5c/9+ghJe3XV/WT2DtcuNMcTeT5uacrs60W3WL4Gb4+ C0qnp3Me/mwLXztyJM8Iiyn2xe97Z+PzR8e+GyIvWORt+RJG51IKGGccKhpRYir07E5PbkroJWg qfMAG4oIZ5jigXtK4eFIh+ir8Yu23DHOR2Dx5VJ0pMtiqQC6HzrDhUaIIZZ9iXCc3uNmXf5a9XH R9eiFas4NDckY6OwnDmHQd23LkJ/pZq X-Received: by 2002:a05:6808:180a:b0:467:ee67:d2b8 with SMTP id 5614622812f47-47c2912c813mr87165b6e.39.1777320220499; Mon, 27 Apr 2026 13:03:40 -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-47c28f50286sm77332b6e.1.2026.04.27.13.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2026 13:03:39 -0700 (PDT) Date: Mon, 27 Apr 2026 15:03:37 -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="Kv0/eRuy+QUPVP2u" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Kv0/eRuy+QUPVP2u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 27, 2026 at 02:43:20PM -0500, Nathan Bossart wrote: > 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. Sorry, I noticed I was using USE_SSE2 for choosing whether to build pg_popcount_x86.c, but the code in that file is actually surrounded by HAVE_X86_64_POPCNTQ. New patch attached. -- nathan --Kv0/eRuy+QUPVP2u Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v2-0001-avoid-ranlib-warnings-on-macOS.patch