Tcl Source Code

View Ticket
Login
Ticket UUID: 2901803
Title: tclThreadTest.c and Tcl_PackageRequire link problem
Type: Bug Created on: 2009-11-21 15:53:01
Submitter: jeremy_c Assigned to: dkf
Subsystem: 49. Threading Severity:
Priority: 9 Immediate Last modified: 2009-11-23 07:04:32
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2009-11-23 00:04:32
Version: obsolete: 8.6b1.1
Description:
CVS head (as of this post at least) will not link on Windows using MSys/MinGW. The error I receive is:

gcc -shared -O2 -fomit-frame-pointer  -o tcltest86.dll -Wl,--out-implib,libtcltest86.a tclTest.o tclTestObj.o tclTestProcBodyObj.o tclThreadTest.o tclWinTest.o libtclstub86.a -lws2_32 /home/Jeremy/TclTk_CVS/tcl/compat/zlib/win32/zdll.lib
Creating library file: libtcltest86.a
tclThreadTest.o:tclThreadTest.c:(.text+0x119d): undefined reference to `Tcl_PackageRequire'
collect2: ld returned 1 exit status
make: *** [tcltest86.dll] Error 1

Commenting lines 590-593 out in generic/tclThreadTest.c causes tcl to then link correctly. It appears that this section was added in the last commit (11/19) of tclThreadTest.c. I am unsure of the root problem.
User Comments:
jeremy_c added on 2009-11-22 21:12:06:
Here is the diff to fix this bug...

$ cvs diff generic/tclThreadTest.c
Index: generic/tclThreadTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclThreadTest.c,v
retrieving revision 1.32
diff -r1.32 tclThreadTest.c
590c590
<     result = Tcl_PackageRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1);
---
>     result = Tcl_PkgRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1);

dkf added on 2009-11-23 07:04:32:

allow_comments - 1

Oh, if only all bugs were as easy to fix as this. (And if only people didn't commit such obviously non-working code...)