thimes has asked for the wisdom of the Perl Monks concerning the following question:

I am running on a 2019 Macbook Pro with Ventura 13.1. I have Brew and Cpan installed. I also have Xcode and Xquartz installed and running. I successfully installed Perl 5v36 and ran a quick test. Now I need to install Perl/Tk. It failed and hung. Three (3) forked "perl" processes were left running with one pegging my cpu at 100%. Here is the output (captured by script), Beginning and End only. I have the full output, but no way to attach it here.

Script started on Fri Jan 13 08:20:48 2023 Loading internal logger. Log::Log4perl recommended for better logging Reading '/Users/thimes/.cpan/Metadata' Database was generated on Fri, 13 Jan 2023 06:29:01 GMT Running install for module 'Tk' Checksum for /Users/thimes/.cpan/sources/authors/id/S/SR/SREZIC/Tk-804 +.036.tar.gz ok 'YAML' not installed, will not store persistent state Configuring S/SR/SREZIC/Tk-804.036.tar.gz with Makefile.PL /usr/local/Cellar/perl/5.36.0/bin/perl is installed in /usr/local/opt/ +perl/lib/perl5/5.36/darwin-thread-multi-2level okay PPM for perl5.036000 Test Compiling config/perlrx.c [...] lots of output, too long to put here. "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- PNG.bs ../blib/arch/auto/Tk/PNG/PNG.bs 644 Manifying 1 pod document "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- NBFrame.bs ../blib/arch/auto/Tk/NBFrame/NBFrame.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Mwm.bs ../blib/arch/auto/Tk/Mwm/Mwm.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Menubutton.bs ../blib/arch/auto/Tk/Menubutton/Menubutt +on.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Listbox.bs ../blib/arch/auto/Tk/Listbox/Listbox.bs 644 cd jpeg && make libjpeg.a make[2]: `libjpeg.a' is up to date. make[2]: Nothing to be done for `all'. "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- JPEG.bs ../blib/arch/auto/Tk/JPEG/JPEG.bs 644 Manifying 1 pod document Manifying 1 pod document "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- InputO.bs ../blib/arch/auto/Tk/InputO/InputO.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- IO.bs ../blib/arch/auto/Tk/IO/IO.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- HList.bs ../blib/arch/auto/Tk/HList/HList.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Event.bs ../blib/arch/auto/Tk/Event/Event.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Entry.bs ../blib/arch/auto/Tk/Entry/Entry.bs 644 Manifying 3 pod documents "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Compound.bs ../blib/arch/auto/Tk/Compound/Compound.bs +644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- Canvas.bs ../blib/arch/auto/Tk/Canvas/Canvas.bs 644 "/usr/local/Cellar/perl/5.36.0/bin/perl" -MExtUtils::Command::MM -e 'c +p_nonempty' -- PNG.bs ../blib/arch/auto/Tk/PNG/PNG.bs 644 cd zlib && make libz.a "CC=cc " RANLIB="ranlib" make[2]: `libz.a' is up to date. /Applications/Xcode.app/Contents/Developer/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'. "/usr/local/Cellar/perl/5.36.0/bin/perl" "-I../t" "-MTkTest" "-e" "che +cked_test_harness('../xt', 0, '../blib/lib', '../blib/arch')" t/*.t t/basic.t .. t/basic.t .. 1/5 Script done on Fri Jan 13 08:23:29 2023
I have searched Perlmonks and found some with the same problem, but no solution, unless I'm missing something. Any help would be greatly appreciated. Terry

Replies are listed 'Best First'.
Re: Problem installing Perl/Tk
by bliako (Abbot) on Jan 16, 2023 at 14:14 UTC

    This module has tests which try to render a window and do stuff in it. But on mac it may need an X server (XQuartz) running? I am not sure though and the hanging processes are probably not because of this, unless it tries to spawn the X server and fails but persists. Also, you can filter through the "long output" and see where the failure is and post it here.

Re: Problem installing Perl/Tk
by thimes (Acolyte) on Jan 13, 2023 at 22:59 UTC

    Update 13.Jan.2023 Went into /Users/thimes/.cpan and found the Tk build directory. Looking at the INSTALL to try a manual install... Perl/Tk can be installed using: perl Makefile.PL make make test. (FAILED as before. Bypassed it) make install Run "make install" seemed to be successful. Tested on several of my Perl/Tk programs and it worked well. Solution: "make test" fails when trying to install Tk.pm from CPAN. Manually run the "makes" listed above.

      Tk seems to install fine for almost everyone else - see the Darwin test results. If make test fails on your platform you should try to determine why that is. Try running t/basic.t in isolation, determine which test fails and why. If it is something wrong with the module itself, then you should raise a bug report against the module so that this can be fixed.

      You get to use all this wonderful open source software for free. It would be rude not to contribute back simply by analysing the installation problems and reporting the cause to the module authors.


      🦛