One thing this patch breaks
is the building of a static wish:
/home/dgp/cvs/tk/unix/libtk8.5.a(tkStubLib.o): In function `Tk_InitStubs':
tkStubLib.c:(.text+0x16): undefined reference to `tclStubsPtr'
tkStubLib.c:(.text+0x111): undefined reference to `tclStubsPtr'
tkStubLib.c:(.text+0x14f): undefined reference to `tclStubsPtr'
collect2: ld returned 1 exit status
Closer examination shows that this is
because the static build configuration
for wish implies no USE_TCL_STUBS during
the compile, and a link against libtcl
instead of libtclstubs. This conflicts
with the code for Tk_InitStubs() in
generic/tkStubLib.c where code in the
source file itself forces the enabling
of USE_TCL_STUBS. Why?!
The attached patch for Tk inherits the
genstubs changes, as well as dropping
the forced USE_TCL_STUBS from tkStubLib.c.
Applying this patch makes static wish
build just fine.
Perhaps an even better answer is
to iterate on this reform, and
get tkStubsPtr and Tk_InitStubs()
out of libtk. I think that would
also solve the issue.
File Added: 1819422.patch
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
attached patches that
- make the symbols in libtclstub and libtkstub MODULE_SCOPE to avoid exporting them from extension shared libraries linked with the stub libs
- constify the *StubsPtr and stub table hook pointers
- fix USE_TCL_STUBS defines in tkStubLib.c and ttkStubLib.c
- remove now unnecessary unexporting of libtclstub symbols from libtk.
File Added: tcl-stubs-modulescope.diff
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=80530
Originator: YES
One thing this patch breaks
is the building of a static wish:
/home/dgp/cvs/tk/unix/libtk8.5.a(tkStubLib.o): In function `Tk_InitStubs':
tkStubLib.c:(.text+0x16): undefined reference to `tclStubsPtr'
tkStubLib.c:(.text+0x111): undefined reference to `tclStubsPtr'
tkStubLib.c:(.text+0x14f): undefined reference to `tclStubsPtr'
collect2: ld returned 1 exit status
Closer examination shows that this is
because the static build configuration
for wish implies no USE_TCL_STUBS during
the compile, and a link against libtcl
instead of libtclstubs. This conflicts
with the code for Tk_InitStubs() in
generic/tkStubLib.c where code in the
source file itself forces the enabling
of USE_TCL_STUBS. Why?!
The attached patch for Tk inherits the
genstubs changes, as well as dropping
the forced USE_TCL_STUBS from tkStubLib.c.
Applying this patch makes static wish
build just fine.
Perhaps an even better answer is
to iterate on this reform, and
get tkStubsPtr and Tk_InitStubs()
out of libtk. I think that would
also solve the issue.
File Added: 1819422.patch
Logged In: YES
user_id=68433
Originator: NO
See also discussion in #1716117.
I thought we decided to leave things as-is for 8.5? (2007-05-16 11:35 comment).
Will look at the patch later.
Logged In: YES
user_id=80530
Originator: YES
ah. there it is.
missed it since I searched
the Tcl tracker instead of Tk.
Got interested in the issue
again since I thought it might
be related to Bug 1792432.
Fine with me if these patches
sit for now, with intent to
re-examine/adopt early in 8.6
development.
Logged In: YES
user_id=80530
Originator: YES
Committed for 8.6a0.
Logged In: YES
user_id=90580
Originator: NO
attached patches that
- make the symbols in libtclstub and libtkstub MODULE_SCOPE to avoid exporting them from extension shared libraries linked with the stub libs
- constify the *StubsPtr and stub table hook pointers
- fix USE_TCL_STUBS defines in tkStubLib.c and ttkStubLib.c
- remove now unnecessary unexporting of libtclstub symbols from libtk.
File Added: tcl-stubs-modulescope.diff
Logged In: YES
user_id=90580
Originator: NO
MODULE_SCOPE patches committed to HEAD
File Added: tk-stubs-modulescope.diff