Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
openwrt-bot opened this issue Nov 17, 2020 · 0 comments
Open

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

openwrt-bot opened this issue Nov 17, 2020 · 0 comments
Labels
core packages pull request/issue for core (in-tree) packages flyspray

Comments

@openwrt-bot
Copy link

httpstorm:

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!

@aparcar aparcar added the core packages pull request/issue for core (in-tree) packages label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core packages pull request/issue for core (in-tree) packages flyspray
Projects
None yet
Development

No branches or pull requests

2 participants