[Python-bugs-list] [ python-Bugs-704641 ] _tkinter.c won't build w/o threads?

SourceForge.net noreply@sourceforge.net
Tue, 18 Mar 2003 19:29:30 -0800


Bugs item #704641, was opened at 2003-03-16 15:57
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=704641&group_id=5470

Category: Tkinter
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: John Speno (corvus)
Assigned to: Jason Tishler (jlt63)
Summary: _tkinter.c won't build w/o threads?

Initial Comment:
I'm out of my area of expertice here trying to build python on Windows using cygwin and trying to use Tcl/Tk 8.4.2, but...

Anyway, it looks like I can't compile _tkinter.c unless I've configured python to use threads and I didn't because the main python README says not to with cygwin.

For example, tcl_lock is used in many places in _tkinter.c but it is only defined when WITH_THREAD is defined.

And there's no Sleep() function when WITH_THREADS is off, and that's used in WaitForMainLoop().

And in Tkapp_New() there's a call to PyThread_free_lock() that isn't inside an #ifdef WITH_THREAD block.

----------------------------------------------------------------------

>Comment By: John Speno (corvus)
Date: 2003-03-18 22:29

Message:
Logged In: YES 
user_id=2138

jlt63> Do you really need to build CVS? Or, will the pre-built
jlt63> Cygwin Python 2.2.2 suffice?

At the time, I needed 2.3a2. However, I was able to use a pre-built version for Windows and replace the included Tcl/Tk with 8.4.2. So, I'm good for now.

Is it really the case that you need to build Python with threads in order to build Tkinter? Why bother with all those #ifdef WITH_THREAD in _tkinter.c if building w/o threads isn't an option? Once I added them in, everything compiled and using Tkinter didn't give me any errors. It didn't give me any widgets on screen either, but I don't think that was related. :-)

Take care.

----------------------------------------------------------------------

Comment By: Jason Tishler (jlt63)
Date: 2003-03-18 22:09

Message:
Logged In: YES 
user_id=86216

nnorwitz> Jason, can you help with this?

Yes. The short answer is I have been meaning to
update the official Python README. I guess that
I can't procrastinate anymore...

corvus> I'm out of my area of expertice here trying
corvus> to build python on Windows using cygwin
corvus> and trying to use Tcl/Tk 8.4.2, but... 

Do you really need to build CVS? Or, will the pre-built
Cygwin Python 2.2.2 suffice?

corvus> Anyway, it looks like I can't compile _tkinter.c
corvus> unless I've configured python to use threads
corvus> and I didn't because the main python README
corvus> says not to with cygwin.

Well, that's simple the "main python README" is wrong.
See above. :,)

If _tkinter requires threads under other Unixes, then I
think that updating the official Python README is
sufficient. Do others agree?

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-03-18 19:44

Message:
Logged In: YES 
user_id=33168

Jason, can you help with this?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=704641&group_id=5470