Installed Perlbrew on 2019 Macbook Pro (Intel core i9) 32GB RAM. MacOS Sonoma 14.4.1. Tested and works well. Tried to install Tk using cpanm Tk. Recieved ERRORS in build.log configure: error: installation or configuration problem: C compiler cannot create executables.

Writing MYMETA.yml and MYMETA.json Building jpeg/libjpeg.a checking for gcc... cc checking whether the C compiler (cc -fno-common -DPERL_DARWIN -mmacosx +-version-min=14.4 -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe - +fstack-protector-strong -I/usr/local/include -fno-common -DPERL_DAR +WIN -mmacosx-version-min=14.4 -DNO_POSIX_2008_LOCALE -fno-strict-alia +sing -pipe -fstack-protector-strong -I/usr/local/include -mmacosx-ve +rsion-min=14.4 -fstack-protector-strong -L/usr/local/lib) works... no configure: error: installation or configuration problem: C compiler ca +nnot create executables. ERROR from evaluation of /Users/terryhimes/.cpanm/work/1716015046.9428 +1/Tk-804.036/JPEG/Makefile.PL: ERROR from evaluation of /Users/terryh +imes/.cpanm/work/1716015046.94281/Tk-804.036/JPEG/jpeg/Makefile.PL: E +rror opening Makefile: No such file or directory at ./Makefile.PL lin +e 41. at ./Makefile.PL line 41. require ./Makefile.PL called at /Users/terryhimes/perl5/perlbrew/p +erls/perl-5.38.2/lib/5.38.2/ExtUtils/MakeMaker.pm line 258 ExtUtils::MakeMaker::eval_in_x(PACK021=HASH(0x7fe6d883bef0), "/Use +rs/terryhimes/.cpanm/work/1716015046.94281/Tk-804.036/JPE"...) called + at /Users/terryhimes/perl5/perlbrew/perls/perl-5.38.2/lib/5.38.2/Ext +Utils/MakeMaker.pm line 245 eval {...} called at /Users/terryhimes/perl5/perlbrew/perls/perl-5 +.38.2/lib/5.38.2/ExtUtils/MakeMaker.pm line 245 ExtUtils::MakeMaker::eval_in_subdirs(PACK021=HASH(0x7fe6d883bef0)) + called at /Users/terryhimes/perl5/perlbrew/perls/perl-5.38.2/lib/5.3 +8.2/ExtUtils/MakeMaker.pm line 823 ExtUtils::MakeMaker::new("MM", PACK021=HASH(0x7fe6d883bef0)) calle +d at /Users/terryhimes/perl5/perlbrew/perls/perl-5.38.2/lib/5.38.2/Ex +tUtils/MakeMaker.pm line 78 ExtUtils::MakeMaker::WriteMakefile("VERSION", 804.036, "XS_VERSION +", 804.036, "DEFINE", "", "INC", "-I.. -Ijpeg -I/usr/X11R6/include -I +/opt/X11/include/freetype2", ...)
I have installed Perlbrew on a new 2023 Macbook Pro, then Tk with no problems, works great. I followed the same instructions in both cases. Any ideas?


In reply to cpanm Tk build errors by thimes

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.