Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Problems for installing Perl-Tk on MAC (OS version BigSur).

by asspat2021 (Initiate)
on Oct 20, 2021 at 09:47 UTC ( [id://11137786]=perlquestion: print w/replies, xml ) Need Help??

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

I am trying to install Tk402.001 for Perl version 5.34.0
on my MAC (with OS version BigSur). Running "perl Makefile.PL",
I obtain a lot of errors ; after that, "make" will end with
'Sorry no HTML building yet' and "make test" will fail.

Before upgrading Perl 5.34.0 and BigSur, Perl-Tk was working
very well and I used it for my own word processor. I need it
since I don't know another way to obtain text widgets (in fact
Curses would work, but without Unicode ; and unfortunately
CamelBones is no longer maintained).

How could I install Tk for Perl 5.34.0 on MAC (with BigSur) ?

Replies are listed 'Best First'.
Re: Problems for installing Perl-Tk on MAC (OS version BigSur).
by hippo (Bishop) on Oct 20, 2021 at 09:58 UTC
    I am trying to install Tk402.001 for Perl version 5.34.0

    Can you explain why you are trying to install such an ancient version of Tk? That's 24 years old now. Why not use an up-to-date version instead?


    🦛

Re: Problems for installing Perl-Tk on MAC (OS version BigSur).
by kcott (Archbishop) on Oct 20, 2021 at 20:06 UTC

    G'day asspat2021,

    Welcome to the Monastery.

    Unfortunately, your post is rather sketchy and light on details; this makes it difficult for us to help you. Please don't take this as a rebuke; it's just a fact — this is your first post and I'll assume you simply didn't know what was needed. In the first instance, read "How do I post a question effectively?" which describes the sort of things to include: "will fail", "was working", and similar are not useful in isolation; state what the previous versions were, not that you just upgraded some unspecified earlier version; provide verbatim error messages within <code>...</code> tags, as opposed to prosaic paraphasing of such messages.

    I used macOS for many years but abandoned it probably around 2017 or 2018 (all versions used were prior to Big Sur): I'm unable to provide any direct testing for Big Sur. I have located my last set of installation notes: I can reference that information where appropriate. I wrote a number of posts last year — "Re: Understanding Perl / Brew Perl and Cpan on macOS" and "Re: Upgrade to Big Sur perl issue" — please read these, as I won't be copying large tracts of existing text to this post, but will be referring to content therein.

    In the absence of other information, here's roughly the steps I think you may need; although, possibly not all of them. This is subject to change depending upon subsequent information you might provide.

    • If you are using the system Perl, you should stop doing that. If you've already made changes to that, you may need to reinstall it.
    • Install Perlbrew.
    • Use Perlbrew to install Perl 5.34.0 (the latest, stable release at the time of writing).
    • Install any non-core (CPAN) modules you need using v5.34.
      • You should be able to do this with the core cpan utility.
      • There are other non-core utilities that I'm aware others prefer (e.g. cpanm and cpanp). You can use these if you prefer; of course, you'll still need cpan to install these (well, at least the first one). I don't use these so can't provide further help with that; other monks will certainly be able to provide information if it's wanted.
      • Unless you have some special reason for doing so, you should not need to do this by hand (i.e. the "perl Makefile.PL; make; make test; make install" incantation).
      • If you do decide to install by hand, make must be successful for make test to work. If make fails, running make test is pointless until you fix the make problems.
    • Install "Tk 804.036" (again, the latest, stable release at the time of writing). Some notes:
      • Before doing this, ensure you have an X server running. In my personal notes, I indicate that "startx &" should be run; that may be different for you. The DISPLAY environment variable should have a value like ":0"; that's what I always see but, again, it could be different for you.
      • I completely agree with ++hippo's comments about using the the ancient 402.001 version (from last century). The current 804.036 version will have far greater Unicode support, which you seemed to indicate you wanted.
      • You should be able to use the core cpan utility for this as well; that's all I've ever needed.
      • You will occasionally get some test failures. Mostly these are problems in one or more *.t files and not an issue with Tk itself. If this happens, go ahead and force installation: this typically works.
      • Run the widget demo (I usually do this in the background: widget &) and do some basic checks. Run your "word processor" and any other Tk applications you use: check these still work.

    I've successfully installed many versions of Tk, on many versions of Perl, on many OSes; failures have been very rare. My last, on macOS, was Perl 5.26 and Tk 804.034 (that required a force install after 1 subtest failure). My current, on Cygwin, is Perl 5.34 and Tk 804.036 (that also required a force install): it's been running without any problems for about the last six months. Using that combination, I've posted quite a few complete working Tk scripts on this site and have used it for a far greater number, with subtantially more complexity, for my own personal use.

    — Ken

Re: Problems for installing Perl-Tk on MAC (OS version BigSur).
by Anonymous Monk on Oct 20, 2021 at 22:40 UTC

    I can't think of the last time I have seen Tk's test suite actually run under macOS, much less succeed. So I grit my teeth and install it anyway, and so far it has worked. Tk 804.036 on Big Sur (specifically macOS 11.6) works on an Intel Mac with XQuartz 2.8.1 installed, though the test did not run any better for me there than under previous versions.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 16:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found