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


In reply to Re^3: Cannot install Config::Augeas on Mac, Big Sur by bliako
in thread Cannot install Config::Augeas on Mac, Big Sur by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.