Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-04-18
17:13 • Closed ticket [3546272fff]: win/makefile.vc produces different files than win/Ma... artifact: 67d07a4e51 user: jan.nijtmans
2014-02-21
19:11 • Ticket [3546272fff]: 1 change artifact: 0f10fdb453 user: jan.nijtmans
19:05 • Ticket [3546272fff]: 1 change artifact: 705ba71571 user: jan.nijtmans
2012-07-23
18:46 • Ticket [3546272fff]: 4 changes artifact: d0dbfd8d64 user: twylite
17:52 • Ticket [3546272fff]: 4 changes artifact: b843011a02 user: nijtmans
2012-07-21
19:04 • Ticket [3546272fff]: 4 changes artifact: 9730fd72a8 user: twylite
03:38 • Ticket [3546272fff]: 4 changes artifact: 89ff17ee1e user: mistachkin
2012-07-20
09:51 • New ticket [3546272fff]. artifact: e37177ddb4 user: nijtmans

win/makefile.vc produces different files than win/Makefile

Closed / Out of Date3546272fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 5 years ago
Descriptionplain2012-07-20 09:51:47
A normal build using win/Makefile, configured
with --enable-shared (the default) produces the
following file names:
    win/tcl86.dll
    win/tclsh86.exe
doing the same with win/makefile.vc produces:
    win/tcl86t.dll
    win/tclsh86t.exe

Doing a --disable-shared build with win/Makefile:
    win/tcl86s.dll
    win/tclsh86s.exe
doing the same with win/makefile.vc, using
OPTS=static,msvcrt (equivalent to
--disable-shared in win/configure) produces:
    win/tcl86tsx.dll
    win/tclsh86tsx.exe

Explanation: win/makefile.vc uses the
following suffixes (from win/rules.vc):
# Naming convention:
#   t = full thread support.
#   s = static library (as opposed to an
#import library)
#   g = linked to the debug enabled C
#run-time.
#   x = special static build when it
#links to the dynamic C run-time.

The option 't' (threads) is the default
since 8.6, and 'x' (msvcrt) is normally
used in combination with static
builds to reduce the size of the
executable (nowadays everyt win32
system has msvcrt.dll on-board)

In order to let win/makefile.vc produce
the same executable names as win/Makefile,
the following is proposed:
- Invert the option OPTS=msvcrt to
  OPTS=nomsvcrt, effectively making msvcrt
  the default for both dynamic and static
  builds, as win/Makefile does
- Invert the meaning of the options 't' and 'x'
  meaning 'no threads' and 'no msvcrt', so they
  only appear in the file name when using
  non-default builds.
- change the path where binaries are built
  (MSVC>6) to XXX_Dynamic (by default) or
  XXX_Static (for static builds). For non-threaded
  builds, prepend 'NonThreaded' to it, for
  non-msvcrt builds, append 'X' to it.

This way, no special tricks need to be done
any more in extensions, because Tcl/Tk
static libraries might have a 't' in the
filename (8.6) or not (<8.6)

(patch still being developed)
mistachkinplain2012-07-21 03:38:08
This kind of change worries me.  It has the potential to break people who build Tcl from sources with MSVC.
twyliteplain2012-07-21 19:04:53
+1 to what Joe said.  The impact is that all extensions that do "special tricks" (because they currently need to) must be changed, and can then only build against recently versions of Tcl; unchanged extensions will only build against older versions of Tcl.

Ideally the whole tsgx suffix should be removed (retaining only s for static), as it is specific to the MSVC build and only serves to complicate building and debugging for those for who work on Windows.  But doing so breaks extensions builds and introduces compatibility issues as described above.  I can offer an alternative: a Windows-specific Cmake-based build that follows the *nix naming convention (and is easy to maintain, and works with all MS compilers and more).
nijtmansplain2012-07-23 17:52:01
+1 to what Joe and twylite said. compatibility is most important!
Following that reasoning, in TIP #364, we accepted the build
be threaded by default starting with 8.6, it doesn't say anything
about filenames that change as a result. Using the Makefile-derived
build, nothing changes at all. But the "makefile.vc" derived build
doesn't adhere to that: it changes the produced filenames to be
different from what the Makefile-derived build produces.
> Ideally the whole tsgx suffix should be removed (retaining only s for
> static), as it is specific to the MSVC build and only serves to complicate
> building and debugging for those for who work on Windows
+1 to that
> I can offer an alternative: a Windows-specific Cmake-based build
Please don't. One more build system to be mainained ....   ;-)
twyliteplain2012-07-23 18:46:16
> it doesn't say anything about filenames that change as a result.

Nor does it say that the file names for threaded builds under MSVC will change.

The point is quite simply this: do you, as the originator of this "bug", actually build Tcl and extensions on Windows using makefile.vc on a regular or even semi-regular basis?  If not, then please stop trying to make it harder for those of us who do.  This change will break the builds of extensions that currently work, and make those extensions choose between building against 8.5 or 8.6.   

> But the "makefile.vc" derived build doesn't adhere to that: it changes the produced filenames to be different from what the Makefile-derived build produces.

And this has been the behaviour of makefile.vc for a long time.  I hate it, but it's now the legacy behaviour, and changing it breaks things.

>> I can offer an alternative: a Windows-specific Cmake-based build
> Please don't. One more build system to be mainained .... ;-)

And more developers actually willing to work with the Tcl sources under Windows, because we'll actually be able to use the tools we're used to.  The work I did towards a fix for #3545363 is directly due to being able to use tools that I can use productively (i.e. a VC10 vcproj generated by CMake).  A Windows-specific CMake build should trivially replace the makefile.vc/rules.vc, dsp/dsw, and half a dozen other unmaintained build files for Windows.
jan.nijtmans Ticket [3546272fff]: 1 change [History diff]2014-02-21 19:05:08
jan.nijtmans Ticket [3546272fff]: 1 change [History diff]2014-02-21 19:11:39
jan.nijtmanswiki2022-04-18 17:13:21

Starting with Tcl 8.7, the 't' suffix is not used any more

Log in (anonymous is fine) to add a comment.