Menu

#3629 Thread extension cannot compile with VC8

obsolete: 8.5a5
closed-fixed
5
2009-05-04
2007-01-24
No

I've just upgraded my system to use VC8 and the Thread extension doesn't compile :(

The error that I get is:

makefile.vc(12) : fatal error U1050:
You'll need to run vcvars32.bat from Developer Studio, first, to setup
the environment. Jump to this line to read the new instructions.

Tcl, Tk and Itcl compiles without problem and I see that some changes has been done to the makefile.vc. Seems that the Thread package is not in sync with the rest.

Thanks a lot.

Discussion

  • Twylite

    Twylite - 2007-03-27

    Logged In: YES
    user_id=91629
    Originator: NO

    And that's only the start of your problems ...

    I have just got the latest thread module from CVS, and am getting errors building it with VC6 or VC8 (on Windows 2000).

    c:\build\thread\win\vc>nmake /f makefile.vc all OPTS=threads TCLDIR=..\..\..\tcl
    ...<snip>
    LINK : fatal error LNK1181: cannot open input file "..\..\..\tcl\win\Release\tclstub84.lib"
    NMAKE : fatal error U1077: 'link' : return code '0x49d'
    Stop.

    I am, of course, building this extension for use with Tcl 8.5. The problem can be solved by adding a TCL_DOTVERSION argument to nmake, but this should be detected via tcl.h (and TCLDIR).

    nmake /f makefile.vc all OPTS=threads TCLDIR=..\..\..\tcl TCL_DOTVERSION=8.5

    --

    Next, the tests fail to run.

    c:\build\thread\win\vc>nmake /f makefile.vc test OPTS=threads TCLDIR=..\..\..\tcl TCL_DOTVERSION=8.5
    ...<snip>
    thread.test
    can't read "::tcl_PatchLevel": no such variable
    ...<snip>
    Tests ended at Tue Mar 27 17:16:53 +0200 2007
    all.tcl: Total 0 Passed 0 Skipped 0 Failed 0

    Capatalisation problem with patchLevel. Easily solved -- but it's been that way since January 2005?!

    --

    Third, "make install" only copies the DLL; it doesn't create pkgIndex.tcl.

    This can be solved by manually creating a pkgIndex.tcl based on pkgIndex.tcl.in, or modifying the makefile.vc to create the pkgIndex.tcl using its variables.

    The install also doesn't name the lib folder correctly (thread instead of thread2.6), and doesn't copy other thread lib files (ttrace.tcl).

    --

    Forth, pkg.vc reflects an old version (2.6.3) which is not in sync with configure.in.

    --

    And then you can't even build at all with VC8.

    --

    The attached patch updates the makefile.vc and rules.vc to be in line with the sampleextension in CVS (plus the changes I have submitted in bug [ 1689286 ] nmakehlp not building on Win32 with VC).

    Tested with VC6 and VC8 on Windows 2000. Builds, installs and runs correctly (including running all tests), so far as I can tell ;)

    There are a number of changes:
    - configure.in: note to change DOTVERSION in makefile.vc when you update the version
    - win/thread.rc: the sampleextension makefile.vc provides different variables/defines to rc
    - tests/thread.test: tcl_PatchLevel ==> tcl_patchLevel
    - win/makefile.vc, win/nmakehlp.c and win/rules.vc: added, based on sampleextension with minimal changes needed to make it work with threads extension

    The files win/vc/makefile.vc, win/vc/nmakehlp.c, win/vc/pkg.vc and win/vc/rules.vc are no longer required and should be deleted. They have effectively been moved to win/ and replaced with updates based on sampleextension. If these files stay in win/vc and get modified to be in a "non-standard" location, then we ensure this pain every time they need to be updated (otherwise we just copy from sampleextension).

     
  • Twylite

    Twylite - 2007-03-27

    Logged In: YES
    user_id=91629
    Originator: NO

    Umm ... I could be being thick here, but I can't see a way to attach a file to a bug ... ;(

    I've submitted my fix as a patch, please refer to patch 1689375.

     
  • Pat Thoyts

    Pat Thoyts - 2009-05-04

    was fixed a while back

     
  • Pat Thoyts

    Pat Thoyts - 2009-05-04
    • status: open --> closed-fixed