I am having problems installing the Curses perl library from CPAN. I have been installing this on various versions of MacOS since 2001 with little or no problems. Now I'm trying to install it on Monterey (12.5), and I'm not making much progress. The main problem seems to be that curses.h is not found during the compile step and -lcurses is not found during the load step.
On my 10.14.6 system where everything works, the header file is in
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/curses.h
and the loader stub file is in
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libcurses.tbd
That stub file points to /usr/lib/libncurses.5.4.dylib, which I can verify does exist.
However, on my 12.5 system, the header and the stub files exist, but the actual *dylib file is not there.
I originally had these problems when I had only the command line tools installed on the 12.5 system. I have subsequently downloaded the full Xcode (about 30GB!!!), thinking that might fill in the missing pieces, but I still get the same errors. I presume that I have done something wrong during the command line tools install or during the full Xcode install, or maybe I need some environment variables to be set appropriately. Or maybe I need to somehow tell Xcode to download and install that *dylib file?
I have never had to debug this before, so I don't really know how the CPAN install process works, despite using it for 20 years. In the past, it has always just worked with minimal effort.
Has anyone else had this problem and know the solution?