[sf-perl] macOS 11.2.1 Perl 5.28.2 ExtUtils::MakeMaker 7.34 'perl Makefile.PL' Segmentation fault: 11

David Christensen dpchrist at holgerdanske.com
Thu Feb 11 22:39:57 PST 2021


On 2021-02-11 21:51, Joseph Brenner wrote:

> On 2/11/21, David Christensen wrote:

>> 2021-02-11 20:21:48 dpchrist at MacBook-Pro ~/MacOS-Foo $ perl
>> Makefile.PL Checking if your kit is complete... Segmentation fault:
>> 11

> That sounds pretty crazy...
> 
> Are familiar with the perl debugger?  You could try running with
> "perl -d", then single stepping ("n" or maybe "s") repeatedly to
> narrow down where it's segfaulting.
> 
> A random thought: you could try initializing the module differently, 
> rather than using h2xs.   Or try basing it on something besides 
> ExtUtils::Makemaker?

Thanks for the ideas.  :-)


Using the Perl debugger, entering 's', and then leaning on the <Enter> 
key for 1 minute 5 seconds:

...
Carp::ret_backtrace(/System/Library/Perl/5.28/Carp.pm:625):
625:	    return $mess;
   DB<1>
Signal SEGV at 
/Users/dpchrist/perl5/lib/perl5/darwin-thread-multi-2level/List/Util.pm 
line 23.
	require List/Util.pm called at 
/Users/dpchrist/perl5/lib/perl5/darwin-thread-multi-2level/Scalar/Util.pm line 
23
	require Scalar/Util.pm called at (eval 
29)[/System/Library/Perl/5.28/File/Copy.pm:18] line 1
	eval ' require Scalar::Util; require overload; 1 ' called at 
/System/Library/Perl/5.28/File/Copy.pm line 18
	require File/Copy.pm called at 
/Users/dpchrist/perl5/lib/perl5/ExtUtils/Manifest.pm line 6
	ExtUtils::Manifest::BEGIN() called at 
/Users/dpchrist/perl5/lib/perl5/darwin-thread-multi-2level/List/Util.pm 
line 0
	eval {...} called at 
/Users/dpchrist/perl5/lib/perl5/darwin-thread-multi-2level/List/Util.pm 
line 0
	require ExtUtils/Manifest.pm called at 
/Users/dpchrist/perl5/lib/perl5/ExtUtils/MakeMaker.pm line 1040
	ExtUtils::MakeMaker::check_manifest() called at 
/Users/dpchrist/perl5/lib/perl5/ExtUtils/MakeMaker.pm line 508
	ExtUtils::MakeMaker::new("MM", MM=HASH(0x7ff6938f1150)) called at 
/Users/dpchrist/perl5/lib/perl5/ExtUtils/MakeMaker.pm line 77
	ExtUtils::MakeMaker::WriteMakefile("NAME", "MacOS::Foo", 
"VERSION_FROM", "lib/MacOS/Foo.pm", "PREREQ_PM", HASH(0x7ff694018848), 
"ABSTRACT_FROM", "lib/MacOS/Foo.pm", ...) called at Makefile.PL line 5
Abort trap: 6


So, it blows up when Carp::ret_backtrace tries to return.  I don't know 
what to do with that...


I initially discovered this when I attempted to build my code.  I did 
the h2xs(1) to see if it was Perl or my Makefile.PL.


ExtUtils::MakeMaker is fundamental to Perl.  If that's broke, Perl is 
broke AFAIC.


Next idea -- blow away ~/perl5 (created by local::lib), log out, log in, 
and try again:

2021-02-11 22:16:30 dpchrist at MacBook-Pro ~/MacOS-Foo
$ cd

2021-02-11 22:19:01 dpchrist at MacBook-Pro ~
$ rm -rf perl5

2021-02-11 22:19:16 dpchrist at MacBook-Pro ~
$ exit
logout
Connection to dpchrist-mbp closed.

2021-02-11 22:27:17 dpchrist at tinkywinky ~
$ ssh dpchrist-mbp
Last login: Thu Feb 11 22:20:29 2021 from 192.168.5.74
Attempting to create directory /Users/dpchrist/perl5
-bash: /Users/dpchrist/perl5/perlbrew/etc/bashrc: No such file or directory

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

2021-02-11 22:27:21 dpchrist at MacBook-Pro ~
$ cd MacOS-Foo/

2021-02-11 22:27:24 dpchrist at MacBook-Pro ~/MacOS-Foo
$ make realclean

2021-02-11 22:27:26 dpchrist at MacBook-Pro ~/MacOS-Foo
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for MacOS::Foo
Writing MYMETA.yml and MYMETA.json


So, it was something in ~/perl5.


Now I need to reinstall CPAN modules required to build my code.  We'll 
see if I run into the module that breaks ExtUtils::MakeMaker...


David


More information about the SanFrancisco-pm mailing list