OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Build Failure
  • Category Packages
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Georgi Valkov - 17.11.2020

FS#3458 - perl/host/compile fails on macOS 11 Big Sur, Workaround

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
Can’t locate 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/ line 444.
Unsuccessful Makefile.PL(cpan/ExtUtils-MakeMaker): code=512 at line 518.
* [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.

Index: perl-5.28.1/hints/

— perl-5.28.1.orig/hints/
+++ perl-5.28.1/hints/
@@ -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

Thank you for any help!


Available keyboard shortcuts


Task Details

Task Editing