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 | |
by bliako (Abbot) on Mar 11, 2021 at 12:48 UTC | |
by nysus (Parson) on Mar 11, 2021 at 14:08 UTC | |
by bliako (Abbot) on Mar 13, 2021 at 19:02 UTC | |
by nysus (Parson) on Mar 11, 2021 at 13:48 UTC |