Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQnN2-0007Wa-K8 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Aug 2022 10:12:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oQnN0-0000BA-QE for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Aug 2022 10:12:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQnN0-0000B0-GR for pgsql-hackers@lists.postgresql.org; Wed, 24 Aug 2022 10:12:22 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQnMx-0002e8-Ma for pgsql-hackers@postgresql.org; Wed, 24 Aug 2022 10:12:21 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 60B495C0156; Wed, 24 Aug 2022 06:12:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 24 Aug 2022 06:12:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1661335937; x= 1661422337; bh=kQ1V3lzt4kYWflmIA4YsbA1q6yF7Zkg98mabRS2Celg=; b=o vgtFvxKTk7B/hXoXDXK7ElBAPp1NSFS9/vOYheGOyagajoPMeTxxSHMvsiLH+p8l ga66IBIYEUsAK9bKUmQX/Umu8hlFcQlnf+y130TBsxte15xabrG/+nJobT6eM/Dg aU83x9vYZGkGVShGwWzuJs9ss3ZnC0wwo6QuWI7oKHKOvDqrU7gfaOy1b5i/wuR+ FHX4bsZfegNLxKKI8SjTPT51Cd6l9hyqK3O29pmWOOvCpnGJjdHggVgyLvc8ec5G a7rrMe67PYqJ3vXIDI+rA3JNG57m8+0026eI/rK9hadjiAcrCGOjDWXUfJJSxs10 ydYXEbEP//V6raAhWBQRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejuddgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuhffvvehfjggtgfesth ejredttdefjeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgv rhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomheqnecuggftrf grthhtvghrnhepleevudfffeetieduuedvfedtgedujeevtdeggeefiedtleegkeduuddu jefhgfeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Aug 2022 06:12:16 -0400 (EDT) Message-ID: <843fbed9-0749-bba4-b6b0-e3e7d1244b0d@enterprisedb.com> Date: Wed, 24 Aug 2022 12:12:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: Strip -mmacosx-version-min options from plperl build Content-Language: en-US From: Peter Eisentraut To: Tom Lane Cc: pgsql-hackers References: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com> <2369869.1660830828@sss.pgh.pa.us> <9518842c-6844-0c99-85ec-ec43fba3115f@enterprisedb.com> In-Reply-To: <9518842c-6844-0c99-85ec-ec43fba3115f@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 19.08.22 09:12, Peter Eisentraut wrote: > After analyzing the source code of ExtUtils::Embed's ldopts, I think we > can also do this by subtracting $Config{ldflags}, since > > my $linkage = "$ccdlflags $ldflags @archives $ld_or_bs"; > > and we really just want the $ld_or_bs part. (@archives should be empty > for our uses.) > > This would get rid of -mmacosx-version-min and -arch and all the things > you showed, including -L/opt/local/lib, which is probably there so that > the build of Perl itself could look there for things, but we don't need it. This patch has failed on Cygwin lorikeet: Before: checking for flags to link embedded Perl... -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/lib/perl5/5.32/x86_64-cygwin-threads/CORE -lperl -lpthread -ldl -lcrypt After: checking for flags to link embedded Perl... -L/usr/lib/perl5/5.32/x86_64-cygwin-threads/CORE -lperl -lpthread -ldl -lcrypt That's as designed. But the plperl tests fail: CREATE EXTENSION plperl; +ERROR: incompatible library "/home/andrew/bf/root/HEAD/inst/lib/postgresql/plperl.dll": missing magic block +HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. Among the now-dropped options, we can discount -Wl,--enable-auto-import, because that is used anyway via src/template/cygwin. So one of the options -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong is needed. These options aren't used for any other shared libraries AFAICT, so nothing is clear to me.