Re: [Update install instruction for macOS] Update install instruction for macOS

Minsoo Choo <[email protected]> Sun, 20 Nov 2022 16:19:14 +0000
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <Gvnp0JoBeP_SkTe3MCPsxDyRQXA8ogs13xDSY_OiZagjhokKa3wa4KboPIF6XRjhX-Kem9WrtoQLX94nSb8_rFv2vi9yd1YNm6lx2b0fdqI=@proton.me>
When autoconf and automake is built on macOS, the system perl sometimes cannot find Autom4te or Automake::Config.

Example: <https://github.com/Homebrew/linuxbrew-core/issues/950>
<https://superuser.com/questions/458233/cant-locate-automake-config-pm-when-trying-to-run-aclocal-command-in-os-x-10-7>
<https://superuser.com/questions/617872/cant-locate-autom4te-channeldefs-pm-in-inc-when-it-definitely-is-there>

I am not quite certain about this, but I assume that the INC location of system perl on macOS is causing the problem.

From default perl on macOS:
@INC:
    /Library/Perl/5.30/darwin-thread-multi-2level
    /Library/Perl/5.30
    /Network/Library/Perl/5.30/darwin-thread-multi-2level
    /Network/Library/Perl/5.30
    /Library/Perl/Updates/5.30.3/darwin-thread-multi-2level
    /Library/Perl/Updates/5.30.3
    /System/Library/Perl/5.30/darwin-thread-multi-2level
    /System/Library/Perl/5.30
    /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level
    /System/Library/Perl/Extras/5.30


The user-installed perl has different location.
 @INC:
    /usr/local/lib/perl5/site_perl/5.36.0/darwin-2level
    /usr/local/lib/perl5/site_perl/5.36.0
    /usr/local/lib/perl5/5.36.0/darwin-2level
    /usr/local/lib/perl5/5.36.0

I guess that the default perl on macOS cannot recognize .pm files under /usr/local/share.

When I installed autoconf from the source code first time and executed it, it showed this error lines.

Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module)

I tried many methods to solve this, and when I installed perl from source, the problem was solved.

I guess we can solve this problem by setting PERL5LIB, but I don't know specifically since I don't have any knowledge in perl.

------- Original Message -------
On Saturday, November 19th, 2022 at 11:03 PM, Paul Eggert <[email protected]> wrote:


> On 2022-11-19 13:20, Minsoo Choo wrote:
> 
> > +On macOS, users should not use the default perl, but manually install
> > +it fromhttps://www.perl.org/get.html.
> 
> 
> Could you explain why this advice is helpful? What is the default perl
> version on macOS, and do different macOS versions have different perl
> versions, and why doesn't the most recent macOS version work with Autoconf?