Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others pondering the Monastery: (3)
    As of 2024-07-23 19:58 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?
      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.