Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#20 libtclcad refers to tk internal structures

Major Effort
closed-fixed
Sean Morrison
3
2007-12-17
2005-09-03
Michal Slonina
No

From libtclcad:

/** @file tkCanvBezier.c
*
* This module provides Bezier curve support for canvases.
*
* Author
* John Anderson
*/
#include <stdio.h>
#include "tkInt.h"
#include "tkPort.h"
#include "tkCanvas.h"

tkInt.h tkPort.h and tkCanvas.h hold internal tk
structures which should not be refered to externaly.
This is a very bad practice that breaks builds using
external tk.

Becouse of tk version mismatch (tk-8.4.9 on my
gnu/linux/gentoo) and internal from brlcad-7.4.2
libtk-8.4.6 linking process breaks on some structure
sizes mismatch.

Gentoo is from source distro, but after installing tk
there is no way to extract tkInt.h tkPort.h and
tkCanvas.h from the source.

Is there any way to get around using the tkInt.h and
friends?

Discussion

  • Sean Morrison
    Sean Morrison
    2005-09-29

    Logged In: YES
    user_id=785737

    tkCanvBezier is actually a component of Tk, intended as a new canvas
    type. The module actually used to reside inside of our modified sources to
    libtk, hence the references to internal files as it's meant to be a part of Tk.
    Nobody has had time to press the modification through the (arduous) Tk
    TIP process.

    As this was design and not by mistake, it's technically not a bug
    regardless of the unfortunate impact it has on external Tk builds. So it'll
    be moved to feature requests so that someone can take a look at whether
    it's easy to decouple the private headers.

     
  • Sean Morrison
    Sean Morrison
    2005-09-29

    • milestone: 387261 -->
    • assigned_to: nobody --> brlcad
    • labels: 622300 --> 621317
     
  • Lee Butler
    Lee Butler
    2006-02-07

    • priority: 5 --> 2
     
  • Sean Morrison
    Sean Morrison
    2007-12-17

    Logged In: YES
    user_id=785737
    Originator: NO

    This issue was taken care of earlier in the year, and should now be fully resolved. Instead of maintaining a full Tk modification (in libtk or in our libtclcad) for a new Bezier Canvas widget type, the code that used the widget was modified to use the 'raw' bezier curve support available to all Canvas widgets. By using the 'raw' widget with some additional direct spline solving of our own, I was able to replicate the behavior of the TkCanvasBezier entirely in Tcl making it possible to remove tkCanvBezier.c and it's associated dependencies with the Tk internals.

    The solution arrived at is considerably slower than our canvas, but much easier to maintain given we don't have to try and merge the change back into the Tk core. Thanks for the report and hopefully this will help with the Gentoo portage integration (as well as with other package management systems).

     
  • Sean Morrison
    Sean Morrison
    2007-12-17

    • priority: 2 --> 3
    • labels: 621317 --> Compilation
    • milestone: --> Major Effort
    • status: open --> closed-fixed