On Tuesday 04 August 2009, John Hunter wrote:
> Very odd. I suggest opening up setupext.py and finding the
> function "check_for_tk". There are a series of test which
> ultimately set the "gotit" variable to determine whether you have
> tk for building. Insert a lot of debug print statements throughout
> the logic of that function and find out where it is failing and let
> us know.
>
> My guess is you will fail in the "explanation =
> add_tk_flags(module)" part of the code, so you may need to dive
> into there and repeat the exercise to figure out what is failing
> and why. If you can repeat the steps that the build process is
> attempting in your python shell, you may be able to hone into the
> point of failure
OK, I've finally tracked this down. There are two issues:
1. On my system with Tk version 8.6
tk.getvar('tcl_library') returns /usr/share/tcl8.6 and
tk.getvar('tk_library') returns /usr/share/tk8.6
This means that TCL_TK_CACHE will contain these paths as tcl_lib_dir
and tk_lib_dir. Looking at the rest of the file, however, it appears
that /usr/lib64 is expected, or /usr/lib64/tk8.6 etc.
As a result, in parse_tcl_config (lines 858 ff.) the tclConfig.sh and
tkConfig.sh are not found due to this reason, since they reside
in/usr/lib64/tcl8.6/tclConfig.sh and /usr/lib64/tk8.6/tkConfig.sh and
not in /usr/share/...
Fortunately they are picked up by the hardcoded RHEL4 path (line
864-5) because they are symlinked to /usr/lib on my system.
2. From the config file (parse_tcl_config), tcl_lib is returned as
/usr/lib64 and tcl_inc as /usr/include/tcl8.6 (likewise for tk), which
appears to be OK. However, the main problem is that the method fails
(returns None) when trying to locate tk.h (line 911-912). The reason
for this is that there again are 2 copies of tk.h on my system (the
files are identical):
/usr/include/tk.h
/usr/include/tk8.6/generic/tk.h
but not the expected /usr/include/tk8.6/tk.h. Since tk.h is not found,
the error message is generated. A similar error occurs in the
guess_tcl_config method due to the location of tk.h (line 946-7)
I'm not sure if/how to patch this and keep it generic, but at least it
tracks it down. I'm also not sure whether other Tk8.6 releases but
their header file in /usr/include/tk8.6/generic/tk.h or whether this is
Mandriva 2009.1 specific.
Johann
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users