Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: cpanm Tk build errors

by bliako (Abbot)
on Jun 14, 2024 at 08:47 UTC ( [id://11159976]=note: print w/replies, xml ) Need Help??

in reply to Re^2: cpanm Tk build errors
in thread cpanm Tk build errors

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11159976]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-07-15 20:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.