Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-09-24
12:07 • Closed ticket [3544967fff]: Missing objectfiles in static lib plus 7 other c... artifact: 7b0bf13555 user: dkf
2012-07-31
18:48 • Pending ticket [3544967fff]. artifact: 3445aadbc9 user: nijtmans
2012-07-18
15:51 • Ticket [3544967fff]: 4 changes artifact: 5f9fe92bae user: decosterjos
15:42 • Ticket [3544967fff]: 4 changes artifact: 3538e2caef user: nijtmans
13:56 • Ticket [3544967fff]: 4 changes artifact: 57b2565b9c user: decosterjos
13:36 • Ticket [3544967fff]: 5 changes artifact: 0cbbdffa4c user: nijtmans
13:32 • Ticket [3544967fff]: 4 changes artifact: ad62949c1d user: decosterjos
13:27 • Ticket [3544967fff]: 7 changes artifact: bf67cff883 user: nijtmans
13:05 • Open ticket [3544967fff]. artifact: 56b0c296d7 user: decosterjos
01:54 • Pending ticket [3544967fff]. artifact: c6b9853438 user: dkf
2012-07-17
22:20 • Ticket [3544967fff]: 4 changes artifact: 9330e79c62 user: dgp
21:52 • Ticket [3544967fff]: 4 changes artifact: d448ec60ed user: nijtmans
21:29 • Ticket [3544967fff]: 4 changes artifact: 760ba2595f user: decosterjos
21:23 • Ticket [3544967fff]: 5 changes artifact: 553c7a9cd4 user: nijtmans
20:36 • Ticket [3544967fff]: 4 changes artifact: 5d3e37f447 user: decosterjos
20:31 • Ticket [3544967fff]: 4 changes artifact: 7ddc146aea user: dgp
15:55 • Add attachment makefile.vc.tcl.static.patch to ticket [3544967fffffffff... artifact: d07605223e user: decosterjos
15:55 • Ticket [3544967fff] Missing objectfiles in static lib status still Open with... artifact: 5dfa83eb28 user: decosterjos
08:55 • New ticket [3544967fff]. artifact: 79a44d3d1c user: decosterjos

Missing objectfiles in static lib

Closed / Fixed3544967fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 13 years ago
Descriptionplain2012-07-17 08:55:26
When building a static tclsh and .lib using makefile.vc, the dde and registry code is not added to the .lib. The attached patch adds those object files to the static .lib.

Aa a side question: what should be done with tclOOStubLib.obj, tclStubLib.obj and tclTomMathStubLib.obj when building a static .lib with makefile.vc? Should they be added to the .lib too?
decosterjosplain2012-07-17 15:55:33
File Added - 449125: makefile.vc.tcl.static.patch
dgpplain2012-07-17 20:31:36
dde and registry are [load]able packages.  Not clear to
me why their code ought to be in a static Tcl library.

The other things you mention have dev history as packages,
but they are now simply part of Tcl.  Need to be in the Tcl library.
decosterjosplain2012-07-17 20:36:05
When building with OPTS=staticpkg dde and registry are linked into the tclsh, but should also be in the tcl86.lib to make it possible to embed Tcl into an app with Tcl statically linked, including dde and registry.
nijtmansplain2012-07-17 21:23:28
tclOOStubLib.obj, tclStubLib.obj and tclTomMathStubLib.obj
are in the stub library tcl86stub.lib. Previously they were in
the static library as well, but not any more since 8.6. That's
on purpose!

Applications linking with OPTS=staticpkg
still can load dde/registry dynamically, or include it in the
build. If you want the latter, you can just add tclWinDde.o,
tclWinReg.o and tclstub86.lib to the link line, then you
have everything.

Would that work for you?
decosterjosplain2012-07-17 21:29:51
I ship tcl86.lib to customers, having everything in one lib is far easier. Why add it to tclsh and not to the lib? For me OPTS=staticpkgs hints at non-loadable packages present in the lib, not just the tclsh.
nijtmansplain2012-07-17 21:52:03
In Tcl 8.5's makefile.vc I see:

TCLSHOBJS = \
$(TMP_DIR)\tclAppInit.obj \
!if $(TCL_USE_STATIC_PACKAGES)
$(TMP_DIR)\tclWinReg.obj \
$(TMP_DIR)\tclWinDde.obj \
!endif
$(TMP_DIR)\tclsh.res

To me that means that OPTS=staticpkgs means
that the registry and dde packages should be
added to tclsh.exe, not to tclsh85.lib. Changing
that would be a feature request, not a bug.
dgpplain2012-07-17 22:20:59
Apologies.  I overlooked the "StubLib" part of those
filenames.
dkfplain2012-07-18 01:54:34
The *only* purpose of the *StubLib files is to allow an external piece of code to connect to Tcl's API (or the API one of the built-in extensions). Code that's "inside" Tcl (in the same executable) doesn't need stubs; it should be directly bound. There's no point at all in building the *StubLib objects into a Tcl executable; they're just for extension DLLs.
decosterjosplain2012-07-18 13:05:51
Feature or bug, I perceive it as a bug in the way I need the lib to be built so I can distribute it. Without this change, I'd need to ship the lib and some .obj files or make the change to the makefile after each release. I don't see much use for having the dde and registry .obj not in the .lib.
nijtmansplain2012-07-18 13:27:21
data_type - 360894

So, let's make it a feature request ;-)

Actually, I don't have a problem really
with putting tclWinReg.o and tclWinDde.o
in the static library when OPTS=staticpkgs
is specified. However putting the
tcl*StubLib.obj files in it is
problematic! This means that
there are multiple static libraries
with the same symbols.

This means that you should
distribute two static libraries
(the normal one and the stub
library) to your clients, both
should be linked against
is dde and registry functionality
is desired.

Would that work for you?
decosterjosplain2012-07-18 13:32:39
OK, thanks. About the *stub* file: I was only asking as I was not sure when they are needed. It's OK not to have them in the static lib for me.
nijtmansplain2012-07-18 13:36:30
Committed to frq-3544967 branch for testing
decosterjosplain2012-07-18 13:56:42
Tested OK for me.
nijtmansplain2012-07-18 15:42:23
Well, I'm not 100% satisfied yet. If we put tclWinReg.obj
and tclWinDde.obj in the static lib using makefile.vc, we
should do the same with Makefile.in as well.

committed that to frq-3544967 now, with some comment
updates in makefile.vc. Still needs more testing before
being merge to trunk. (Anyway, I want to wait on
Tcl 8.6b3 before doing that, preventing any risk
on delay for the b3 release)
decosterjosplain2012-07-18 15:51:47
I understand. I appreciate your support.
nijtmansplain2012-07-31 18:48:56
Merged to trunk now.

> (Anyway, I want to wait on Tcl 8.6b3 before doing that,
> preventing any risk on delay for the b3 release)
It works well, with minimal risk, and doing this now
gives more time for testing for the b3 release. Since
there are other test failures being investigated now,
I don't think this will delay 8.6b3.
dkf Closed ticket [3544967fff]. [History diff]2013-09-24 12:07:10
Log in (anonymous is fine) to add a comment.

Attachments: