Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: edde64be1d2473af0574ee26d688185f91f052430eae9a9697167835b9046faf
Ticket: 5916e48806d93dd9b24f8f73c3f4d7ed74b04eb3
tcl.pc: hardcoded depedencies, missing build flags
User & Date: chrstphrchvz on 2023-04-29 22:24:48
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    I am not very familiar with pkg-config, but there seem to be a few issues with the installed tcl.pc file.
    
    <ol>
    <li>My understanding is that the only time libtommath (on 8.7 and later) or zlib should be specified Requires.private field of tcl.pc is if they are installed on the system with pkg-config data, and Tcl is built to use them.</li>
    
    <li>If pkg-config-supporting copies of the libraries are not present, then pkg-config will complain when tcl.pc is used:
    
    <pre>
    Package zlib was not found in the pkg-config search path.
    Perhaps you should add the directory containing `zlib.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'zlib', required by 'tcl', not found
    
    Package libtommath was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libtommath.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libtommath', required by 'tcl', not found
    </pre>
    </li>
    
    <li>If Tcl has built against external copies of these libraries, but they do not provide pkg-config data, then presumably tcl.pc is responsible for providing any necessary build flags.</li>
    
    <li>If external libtommath is used, then <tt>-DTCL_WITH_EXTERNAL_TOMMATH</tt> should be specified in the cflags field of tcl.pc.
    
    Python, for its official binary distributions, would likely prefer to continue having Tcl build with its bundled libtommath, since nothing else in CPython uses libtommath. Defining <tt>TCL_NO_TOMMATH_H</tt> allows Tkinter to build against Tcl with bundled libtommath. But handling the case of Tcl built with external libtommath seems to require knowing whether <tt>TCL_WITH_EXTERNAL_TOMMATH</tt> is defined; and Tkinter, by default, tries to use pkg-config to get Tcl/Tk build flags, rather than from TEA/tclConfig.sh/<tt>TCL_DEFS</tt> as usually done by Tcl/Tk software. 
    </li>
    
    <li>If Tcl was built using bundled versions of these libraries, then there is nothing which should be put in tcl.pc for them--at least not in Requires.private or linking flags.</li>
    </ol>
    
  5. is_private changed to: "0"
  6. login: "chrstphrchvz"
  7. priority changed to: "5 Medium"
  8. private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "chrstphrchvz"
  13. subsystem changed to: "54. Configuration Reporting"
  14. title changed to: "tcl.pc: hardcoded depedencies, missing build flags"
  15. type changed to: "Bug"