Artifacts Associated With Ticket 5916e48806d93dd9
Ticket change [edde64be1d] (rid 214105) by chrstphrchvz on 2023-04-29 22:24:48:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized 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>
- is_private initialized to: "0"
- login: "chrstphrchvz"
- priority initialized to: "5 Medium"
- private_contact initialized to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "chrstphrchvz"
- subsystem initialized to: "54. Configuration Reporting"
- title initialized to: "tcl.pc: hardcoded depedencies, missing build flags"
- type initialized to: "Bug"
Ticket change [406280d376] (rid 215947) by chrstphrchvz on 2023-06-26 20:54:00:
- icomment:
I am attaching a brief patch for 8.7 and later, which I would consider the bare minimum for improving tcl.pc to correctly indicate bundled or external libtommath dependency. It appears to work with Tkinter. The approach in the patch assumes that if external libtommath is used, then it was installed with pkg-config data; maybe it often is, but that is not guaranteed. (MacPorts, for example, only recently began installing libtommath.pc: [https://github.com/macports/macports-ports/pull/18424]) Ideally, if a dependency is listed in tcl.pc, then that should mean Tcl used pkg-config to detect it and retrieve its build flags (e.g. <tt>-lz</tt>, <tt>-ltommath</tt>); only when a dependency is <em>not</em> detected by pkg-config should Tcl try providing build flags.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"
- icomment:
Add attachment "5916e48806-ltm-8.7.diff" [f7831cd780] (rid 215949) by chrstphrchvz on 2023-06-26 20:59:25.
Ticket change [562cf1b749] (rid 216361) by jan.nijtmans on 2023-07-11 09:30:19:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2460136.89605867"
- closer changed to: "jan.nijtmans"
- icomment: "Fixed [4b11db28e63dbe4a|here]. Looks good to me."
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"