Try cpanm --look Tk . This will take you to the Tk build dir. If you are versed with autotools edit ./configure to find the position where it fails. It should be creating a C test program to compile and saving it to a tmp dir. And also there should be the compilation command line (which is also printed on the console). Halt it there and add lines to tell you where that test C program is AND what is the path of cc with which cc.
Also run ./configure with explicitly specifying the fullpath to the compiler: ./confgure CC=/x/y/z/cc (or something like this)
The possible reasons for the errors you get are: 1) test C program includes files which are not found, 2) the compiler executable is not what you think it is (note that it does not use the fullpath to the compiler), 3) compiler flags are wrong (note that you may already have ENV vars in your shell which specify CFLAGS, LDFLAGS, CC etc. 4) the compilation fails at the linking stage because LIBRARIES are not found or wrong ones are used. This is/was controlled with LD_LIBRARY_PATH and apple-specific DYLD_LIBRARY_PATH. Do you have those set in your ENV? Their use is frowned upon but sometimes is the last resort.
Far fetched but: check what user the compilation is run under (whoami) and whether it has in its path the specific compiler and uses that compiler with no extra CFLAGS, library paths etc. from login settings e.g. in bashrc
In reply to Re^3: cpanm Tk build errors
by bliako
in thread cpanm Tk build errors
by thimes
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |