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
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
;;
Thank you for any help!
Georgi Valkov
https://bugs.openwrt.org/index.php?do=details&task_id=3458
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel