cmv has asked for the wisdom of the Perl Monks concerning the following question:
I've been away from both Perl and the Monastery for some time now, and am delighted to be getting back in the swing of things!
My first goal is to get working Perl with Perl-Tk up and running on my M1 Mac mini, running macOS Monterey (12.6).
Taking the path of least resistance, I decided to use perlbrew to get me started. Everything worked great, but the CPAN install of pTk hangs forever on one of the first tests.
Here is a summary of how I got there:
# Install Homebrew (from https://brew.sh) $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebre +w/install/HEAD/install.sh)" # Use Homebrew to install some stuff MacOSx doesn't normally have: $ brew install wget $ brew install tcl-tk # Needed due to apple's old, buggy, version $ brew install tkdiff $ brew install gawk $ brew install perl $ brew install --cask xquartz # Needed for X11 on Mac # Use CPAN shell to install perl modules $ /opt/homebrew/bin/perl -MCPAN -e shell install Term::ReadLine::Perl install CPAN reload CPAN install YAML install Tk
At this point the Tk testing failed with these messages:
... /Library/Developer/CommandLineTools/usr/bin/make all-am make[3]: Nothing to be done for `all-am'. make[2]: Nothing to be done for `all'. make[2]: Nothing to be done for `test_dynamic'. make[2]: Nothing to be done for `test_dynamic'. "/opt/homebrew/Cellar/perl/5.36.0/bin/perl" "-I../t" "-MTkTest" "-e" " +checked_test_harness('../xt', 0, '../blib/lib', '../blib/arch')" t/*. +t t/basic.t .. Failed 4/5 subtests t/crash.t .. Failed 1/1 subtests Test Summary Report ------------------- t/basic.t (Wstat: 11 (Signal: SEGV) Tests: 1 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 5 tests but ran 1. t/crash.t (Wstat: 11 (Signal: SEGV) Tests: 0 Failed: 0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 1 tests but ran 0. Files=2, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.09 cusr + 0.01 csys = 0.11 CPU) Result: FAIL Failed 2/2 test programs. 0/1 subtests failed. make[1]: *** [test_dynamic] Error 255 make: *** [subdirs-test_dynamic] Error 2 SREZIC/Tk-804.036.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports SREZIC/Tk-804.036.tar.gz Failed during this command: SREZIC/Tk-804.036.tar.gz : make_test NO
Somewhere in the output, it complained about DistnameInfo needing to be installed, so I did that, then tried installing Tk again, and it hangs on one of the first tests in an infinite loop:
install CPAN::DistnameInfo ... install Tk ... /Library/Developer/CommandLineTools/usr/bin/make all-am make[3]: Nothing to be done for `all-am'. make[2]: Nothing to be done for `all'. make[2]: Nothing to be done for `test_dynamic'. make[2]: Nothing to be done for `test_dynamic'. "/opt/homebrew/Cellar/perl/5.36.0/bin/perl" "-I../t" "-MTkTest" "-e" " +checked_test_harness('../xt', 0, '../blib/lib', '../blib/arch')" t/*. +t t/basic.t .. 1/5
Looking at the process, it's continuously using up 100% of a single core:
ID COMMAND %CPU TIME #TH #WQ #PORTS MEM PURG 47971 perl 99.7 37:19.27 1/1 0 10 15M 0B
My guess at what is happening here...
This is completely wrong, the installed tcl-tk does not seem to impact this at all
I'm suspecting that the old buggy version of tcl-tk that is shipped by Apple, is somehow causing this. I would like for the newer, working version of tcl-tk that I installed via Homebrew to be used, but I don't know how to specify that.
FYI: When I first installed tkdiff and ran it, things were all hosed up and it wasn't until I installed the newer, working version of tcl-tk that fixed the problem. I'm guessing that pTk is having the same issue as well.
Any pointers or help is much appreciated!
Thanks
-Craig
|
---|