Firstly, check to see if perlbrew's perl is the one being used (as well as cpan) and not system perl: which perl; which cpan.

Secondly, check to see if the modules you installed via perlbrew's cpan/cpanm do install in their proper locations and that the correct modules are loaded (where "incorrect" modules are those loaded from system perl's INC places). Useful here is the @INC : perl -e 'print "@INC"'

Thirdly, the other interference from system perl+tk would be that their binary libraries (.so, .dylib) are loaded instead of perlbrew's perl+tk. You can check/affect that with the env vars: LD_LIBRARY_PATH and DYLD_LIBRARY_PATH and, better, sieve through the output of strace perl (consequently: strace /Library/Developer/CommandLineTools/usr/bin/make  all-am (note: I am not sure if this command will recursively strace all the calls inside the Makefile).

I think with the above you can detect where libraries and modules are loaded from, and, therefore, eliminate the possibility of "interference" from system perl+tk.

Using an older macOS is a bless and a curse: the newer (13.+) are locking the system with the so-called SIP with a really annoying effect: (DY)LD_LIBRARY_PATH env vars are *forbidden* (by the cupertino directorate) to be passed to executables, so this DYLD_LIBRARY_PATH=my-good-tk-libraries make all-am will have no effect and still be looking in /usr/lib first. The curse of course is that nothing works and the one daring to use older hardware feels like a leper, not least by the various forums' support.

bw, bliako


In reply to Re: Problem Installing Perl-Tk on macOS Monterey (12.6) with Apple M1 chip by bliako
in thread Problem Installing Perl-Tk on macOS Monterey (12.6) with Apple M1 chip by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.