From patchwork Tue Nov 17 23:12:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Valkov X-Patchwork-Id: 1401889 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=abv.bg Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=oMGbQq50; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=abv.bg header.i=@abv.bg header.a=rsa-sha256 header.s=smtp-out header.b=Up8yLhTP; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CbMGb39Bkz9sTv for ; Wed, 18 Nov 2020 10:14:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:To:Message-Id:Subject:Date:Mime-Version:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Fw1+CvkTtNHl8qp8lM9vgo2HSBbGUAaI4FVxzode22g=; b=oMGbQq50cGPQAHQg12oDrbiafy u0GcmNAEEMjdK3+d3PiO4mbV6H3wi9keiU9uAjO7tESnEYRhmnnsM0TntU30gCmTWGvj3PsuD+qF8 RRm5c0psOQ43Qucb3uLcGfqJwO9IITV3dACx406e7zmaTr+bw2kizMFL/DG/6qePH8NpM7kpgCAEY VfaXU1e0fbZz6zkKfYcS5oXq5aUE1ups8KiUeZfqpVzuiLN9zL6a5Pvgbc+7pmiOAx7WVmPKc+krh ELzGljToodmkKSYT/KB1fiwlr43U+I4bJ421yeiLqwtRTORGLq2/r9QgNTThEchEjGvz/qR3hi3M1 42d7kGuw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfA9V-0007HW-LE; Tue, 17 Nov 2020 23:12:45 +0000 Received: from pop32.abv.bg ([194.153.145.222]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfA9R-0007Gt-7p for openwrt-devel@lists.openwrt.org; Tue, 17 Nov 2020 23:12:43 +0000 Received: from smtp.abv.bg (localhost [127.0.0.1]) by pop32.abv.bg (Postfix) with ESMTP id 897B61FDEE; Wed, 18 Nov 2020 01:12:35 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abv.bg; s=smtp-out; t=1605654755; bh=xv4Lhsb//JqayhMZ0v3ik8sKIJiUmo6Fx94BFWZZ6rg=; h=From:Date:Subject:To:From; b=Up8yLhTP97RQqs3oRtWhnoooMLFKPdGhbirm+O6QIzEbIcsYKNEjG/hcewcE4jcLt vQx8ASojjohV+gl9kPg4V1H9XHLDt9A7Ed/Mz6Zfys4ZYLCndE6BB6w37O0w9pimi/ XSNOD4i0rHIA6IawF0iaztaYGMdJo8wOX9EXPaeg= X-HELO: [192.168.192.3] Authentication-Results: smtp.abv.bg; auth=pass (plain) smtp.auth=gvalkov@abv.bg Received: from Unknown (HELO [192.168.192.3]) (87.118.177.198) by smtp.abv.bg (qpsmtpd/0.96) with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256 encrypted); Wed, 18 Nov 2020 01:12:35 +0200 From: Georgi Valkov Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Date: Wed, 18 Nov 2020 01:12:32 +0200 Subject: perl/host/compile: fails on macOS 11 Big Sur, workaround Message-Id: <6B2CCC9C-9F01-4A1A-9B04-212A007D7B58@abv.bg> To: openwrt-devel@lists.openwrt.org X-Mailer: Apple Mail (2.3654.20.0.2.21) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201117_181242_497902_B9AD52FE X-CRM114-Status: GOOD ( 15.36 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [gvalkov[at]abv.bg] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Dear OpenWRT team, I just updated my laptop to macOS 11 Big Sur. Presently only the perl hostpkg package fails during the build. Once I get past perl, everything else compiles correctly. Below is a patch, workaround, and details from my research. My target is Marvell EBU Armada, Linksys WRT3200ACM. Before applying the patch, make package/feeds/packages/perl/host/compile V=sc fails with the following error: Which of these apply, if any? [darwin] *** Unexpected product version 11.0. *** *** Try running sw_vers and see what its ProductVersion says. After the patch, make package/feeds/packages/perl/host/compile succeeds, however when multiple workers are used: make package/feeds/packages/perl/host/compile -j 12 V=sc, the build fails: Writing Makefile for CPAN make[4]: Entering directory '/Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/Archive-Tar' make[4]: Entering directory '/Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/CPAN' Generating a Unix-style Makefile Writing Makefile for Errno make[4]: Entering directory '/Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/ext/Errno' "../../miniperl" "-I../../lib" Errno_pm.PL Errno.pm Can't locate Errno.pm in @INC (you may need to install the Errno module) (@INC contains: /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/AutoLoader/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/Carp/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/PathTools /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/PathTools/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/ExtUtils-Install/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/ExtUtils-MakeMaker/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/ExtUtils-Manifest/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/File-Path/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/ext/re /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/Term-ReadLine/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/Exporter/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/ext/File-Find/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/Text-Tabs/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/constant/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/cpan/version/lib /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/lib .) at /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/dist/PathTools/Cwd.pm line 444. Unsuccessful Makefile.PL(cpan/ExtUtils-MakeMaker): code=512 at make_ext.pl line 518. make[3]: *** [GNUmakefile:599: cpan/ExtUtils-MakeMaker/pm_to_blib] Error 2 I have also seen errors where the build is trying to use /miniperl instead of ./miniperl, as well as /build_dir/hostpkg/perl/perl-5.28.1/perl instead of /Volumes/test/openwrt/build_dir/hostpkg/perl/perl-5.28.1/perl. The will occur if we try to build perl without host/clean and clean. Seems like a race condition due to dependency misconfiguration. Here is the list of all commands in order to compile OpenWRT starting from a clean build root: make -j 12 make package/feeds/packages/perl/host/clean make package/feeds/packages/perl/clean make package/feeds/packages/perl/compile make -j 12 The first make fails, then we perform host-clean and clean for perl, next compile will also do host-compile - we have to use a single worker here. Finally we can complete the rest of the build process. I should note that Languages, Perl, perl is not selected in menuconfig. I can understand if the hostpkg/perl is required during the build process, however perl/host{clean,compile} is not enough, I also need to perform perl/{clean,compile}. Here is the quick patch I made in order to verify if there are any other broken packages: no. Only perl fails to compile. I am also not sure how to handle patches and pull-requests for feeds, so I thought I should rather share my research here and ask for help. feeds/packages/lang/perl/patches/302-macos_11_support.patch Thank you for any help! Georgi Valkov https://bugs.openwrt.org/index.php?do=details&task_id=3458 Signed-off-by: Georgi Valkov Index: perl-5.28.1/hints/darwin.sh =================================================================== --- perl-5.28.1.orig/hints/darwin.sh +++ perl-5.28.1/hints/darwin.sh @@ -327,7 +327,7 @@ EOM # "ProductVersion: 10.11" "10.11" prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'` case "$prodvers" in - 10.*) + 10.*|11.*) add_macosx_version_min ccflags $prodvers add_macosx_version_min ldflags $prodvers ;;