in reply to Re^2: Cannot install Config::Augeas on Mac, Big Sur
in thread Cannot install Config::Augeas on Mac, Big Sur

You can influence CFLAGS and LDFLAGS via the Module::Build constructor. It is documented here http://perl.mines-albi.fr/perl5.6.1/site_perl/5.6.1/Module/Build.html (but not in CPAN, wrong oops: it's here: https://metacpan.org/pod/distribution/Module-Build/lib/Module/Build/API.pod)

my build = Module::Build->new( extra_compiler_flags => '... -mmacosx-version-min=11.0', extra_linker_flags => '... -mmacosx-version-min=11.0', );

The problem is that Augeas' Build file has already some flags specified there. So, you could try to modify them with something like this (untested, just a rough sketch):

my $extra_cflags = $aug_cflags . ' ' . $libxml2_cflags . ' -Wall -Wfor +mat -Werror=format-security'; my $extra_ldflags = $aug_libs . ' ' . $libxml2_cflags; $extra_cflags =~ s/mmacosx-version-min=10\.13/mmacosx-version-min=11.0 +/g; $extra_ldflags =~ s/mmacosx-version-min=10\.13/mmacosx-version-min=11. +0/g; print "Modified to $extra_cflags\n" ; print "Modified to $extra_ldflags\n" ; # insert the above before this: print "Using $aug_libs and $aug_cflags to compile (Augeas version $aug +_version)\n" ; print "Using $libxml2_libs and $libxml2_cflags to compile (Augeas vers +ion $aug_version)\n" ;

And then in the constructor

my $build = Module::Build->new ( ... extra_compiler_flags => $extra_cflags, extra_linker_flags => $extra_ldflags, ... );

BTW, the option dynamic_config => 0 will create an intermediate file Build.PL which can be modified as per my 3rd suggestion. Currently for Augeas this is set to 1

Fletch's suggestion is also worth checking, perhaps with this:

perl -MConfig -e 'print $_.": ".$Config{$_}."\n" for keys %Config;'

bw, bliako

Replies are listed 'Best First'.
Re^4: Cannot install Config::Augeas on Mac, Big Sur
by nysus (Parson) on Mar 11, 2021 at 10:43 UTC

    Thanks for your detailed help. I took fletch's advice and reinstalled a fresh new version of Perl compiled against my current OS. As far as I can tell, the module compiles. However, it fails its tests. (Please see my comment above.)

    My instinct tells me that the module is having trouble finding Augues. I know Augeas is installed and works on my system because I can do this little tutorial found here: https://augeas.net/tour.html

    I tried taking a look at the source code of the module to see if I could spot the problem. But all I found was this call to an init function and I'm not sure how it works. I couldn't find a sub called "init" anywhere else in the distribution. Maybe it's an XS thing?

    Any other ideas on what I can try to get this working?

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

        I dusted off and fired up the older mac with Catalina 10.15.6 on it. Installed with no issues at all. What are my options at this point? I'm sure others must be having issues with other perl modules on Big Sur. I'll break out the google machine.

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
        $nysus = $PM . ' ' . $MCF;
        Click here if you love Perl Monks

        I got the loadpath and root values printed but they didn't produce anything revealing. I tried installing with macports but the module's tests still fail. This is likely something to do with Big Sur, I'm guessing.

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
        $nysus = $PM . ' ' . $MCF;
        Click here if you love Perl Monks