Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Cannot install Config::Augeas on Mac, Big Sur

by nysus (Parson)
on Mar 10, 2021 at 00:08 UTC ( [id://11129386]=note: print w/replies, xml ) Need Help??


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

Thanks, but I'm not having any success.

make CFLAGS... didn't work as this module uses Module::Build. I tried .Build CFLAGS... instead but that didn't work.

cpanm Config::Augeas --configure... did not seem to have any effect. I got the same error as the original one.

Fro your 3rd suggestion, there is no Makefile to edit and I could not find any 10.13 version number with grep anywhere in the distribution.

$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

  • Comment on Re^2: Cannot install Config::Augeas on Mac, Big Sur

Replies are listed 'Best First'.
Re^3: Cannot install Config::Augeas on Mac, Big Sur
by Fletch (Bishop) on Mar 10, 2021 at 05:49 UTC

    Wild guess: if you built your perl with perlbrew before upgrading the OS that (or some of the config baked therein) may be the source of the older version. Try reinstalling your perl (although if that's the problem you may need to recompile all the XS modules as well to ensure they match the new binary).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      I thought for sure you were on to something. I installed latest version of perl with perlbrew and migrated all the modules over and I switched to latest version. Still getting this error, however, with "cpanm Config::Augeas":

      Building Config-Augeas cc -I/Users/me/perl5/perlbrew/perls/perl-5.32.1/lib/5.32.1/darwin-2lev +el/CORE -DVERSION="1.000" -DXS_VERSION="1.000" -I/usr/local/Cellar/au +geas/1.12.0/include -Wall -Wformat -Werror=format-security -c -fno-co +mmon -DPERL_DARWIN -mmacosx-version-min=11.2 -fno-strict-aliasing -pi +pe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTE +NV -O3 -o lib/Config/Augeas.o lib/Config/Augeas.c ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Config/Augeas/Augea +s.bs') cc -mmacosx-version-min=11.2 -bundle -undefined dynamic_lookup -L/usr/ +local/lib -fstack-protector-strong -o blib/arch/auto/Config/Augeas/Au +geas.bundle lib/Config/Augeas.o -L/usr/local/Cellar/augeas/1.12.0/lib + -laugeas Can't call method "get" on an undefined value at /Users/stevedondley/. +cpanm/work/1615424668.56822/Config-Augeas-1.000/blib/lib/Config/Augea +s.pm line 227.
      # Looks like your test exited with 255 just after 2.

      $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

Re^3: Cannot install Config::Augeas on Mac, Big Sur
by bliako (Monsignor) on Mar 10, 2021 at 09:41 UTC

    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

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129386]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-23 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found