http://www.perlmonks.org?node_id=11159611

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

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?