Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Build TkTable with Patch

90 views
Skip to first unread message

welle ozean

unread,
May 3, 2021, 5:34:50 PM5/3/21
to
Hello,

I am in need to build TkTable on macOS with a patch to solve a visualisation issue on Retina display. I have never build a Tk package before (I am also not a Tcl developer).

Is there a fool-proof guide out there on how to do it?

TkTable and patch here: https://sourceforge.net/p/tktable/bugs/309/
Message has been deleted

welle ozean

unread,
May 3, 2021, 7:35:47 PM5/3/21
to
Update. I did this:

./configure --prefix=/Users/fc/Desktop/IB/Frameworks/8.6.11.1/Compile/Tktable2.10 --exec-prefix=/Users/fc/Desktop/IB/Frameworks/8.6.11.1/Compile/Tktable2.10 --with-tcl=/Users/fc/Desktop/IB/Frameworks/8.6.11.1/Compile/build/tcl/Tcl.framework/
--with-tk=/Users/fc/Desktop/IB/Frameworks/8.6.11.1/build/tk/Tk.framework/tkConfig.sh

However it complains with:
checking for Tk public headers... configure: error: tk.h not found. Please specify its location with --with-tkinclude

Indded there is no tk.h in my directory.

I build Tcl/Tk myself. Any idea?

Claudio Fantinuoli

unread,
May 3, 2021, 8:15:45 PM5/3/21
to
Edit 2

I found tk.h in the source directory, so I added this line to the build command:

--with-tkinclude=/Users/fc/Desktop/IB/Frameworks/8.6.11.2/Compile/tk8.6.11/generic/tk.h

Still complaining.

Kevin Walzer

unread,
May 3, 2021, 9:41:29 PM5/3/21
to
This works for me (modify as appropriate for your installation):

./configure \
--prefix=/usr/local --libdir=/Library/Tcl \
--with-tcl=/Library/Frameworks/Tcl.framework \
--with-tclinclude=/Library/Frameworks/Tcl.framework/Headers \
--with-tk=/Library/Frameworks/Tk.framework \
--with-tkinclude=/Library/Frameworks/Tk.framework/Headers \
--enable-threads

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

welle ozean

unread,
May 4, 2021, 2:06:26 AM5/4/21
to

> ./configure \
> --prefix=/usr/local --libdir=/Library/Tcl \
> --with-tcl=/Library/Frameworks/Tcl.framework \
> --with-tclinclude=/Library/Frameworks/Tcl.framework/Headers \
> --with-tk=/Library/Frameworks/Tk.framework \
> --with-tkinclude=/Library/Frameworks/Tk.framework/Headers \
> --enable-threads

This sill does not work for me. I inspected my Tk.framework and indeed it has no Headers folder (which is present in Tcl.framework) but an alias which does not point to anywhere. So, I fear the problem is in my installation which I complied by simply doing the following:

export ver="8.6.11"
make -C Compile/tcl8.6.11/macosx embedded CFLAGS_OPTIMIZE="-O2 -mmacosx-version-min=10.14"
make -C Compile/tk8.6.11/macosx embedded CFLAGS_OPTIMIZE="-O2 -mmacosx-version-min=10.14"

I am then trying to build Tktable directly from the Frameworks in the datastructure produced by the above steps. Should I have done some more steps?

Christian Gollwitzer

unread,
May 4, 2021, 4:05:47 AM5/4/21
to
Am 03.05.21 um 23:34 schrieb welle ozean:
If it helps, I added the patch to the kbs build system and it did
compile on my macOS 10.13.6 High Sierra.

https://github.com/auriocus/kbskit

That would be:

./kbs.tcl -r install tktable2.10

I haven't checked that it actually works - there are many warnings "cast
to 'char *' from smaller integer type 'int'"

Best regards,

Christian

welle ozean

unread,
May 4, 2021, 4:52:49 AM5/4/21
to

> ./configure \
> --prefix=/usr/local --libdir=/Library/Tcl \
> --with-tcl=/Library/Frameworks/Tcl.framework \
> --with-tclinclude=/Library/Frameworks/Tcl.framework/Headers \
> --with-tk=/Library/Frameworks/Tk.framework \
> --with-tkinclude=/Library/Frameworks/Tk.framework/Headers \
> --enable-threads

I installed ActiveState Tcl to exclude issues with my compiled installation. Your commands now work. However, when I run make, I get the following error:

Undefined symbols for architecture x86_64:
"_XSetClipRectangles", referenced from:
_TableDisplay in tkTable.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libTktable2.10.dylib] Error 1

Any idea?

Kevin Walzer

unread,
May 4, 2021, 4:32:31 PM5/4/21
to
On 5/4/21 2:06 AM, welle ozean wrote:
> make -C Compile/tcl8.6.11/macosx embedded CFLAGS_OPTIMIZE="-O2 -mmacosx-version-min=10.14"
> make -C Compile/tk8.6.11/macosx embedded CFLAGS_OPTIMIZE="-O2 -mmacosx-version-min=10.14"

Don't do "make embedded" -- that strips out a lot of stuff. Fine for
deployment of Wish-based apps, but not as a development environment for
building extensions. Just do "make" and the relevant bits will be
installed on your system.

Reviewing the other error, my guess is that you are installing an older
version of Tk from ActiveState and there have been some API changes. Try
building Tktable against your current bleeding edge build of Tk and see
if that works.

welle ozean

unread,
May 4, 2021, 4:52:38 PM5/4/21
to
> Reviewing the other error, my guess is that you are installing an older
> version of Tk from ActiveState and there have been some API changes. Try
> building Tktable against your current bleeding edge build of Tk and see
> if that works.

This was exactly what I was trying to do, and it worked!

For whatever reason, the Tktable with patch needs a recent version of Tk (8.6.11), and ActiveState is older. So, I installed 8.6.11 with homebrew, patched Tktable (info in the download page) and configured it with:
$ ./configure --prefix=/Users/fc/Desktop/Tktable2.10/ \
--with-tcl=/usr/local/Cellar/tcl-tk/8.6.11_1/lib \
--with-tk=/usr/local/Cellar/tcl-tk/8.6.11_1/lib

This worked fine. Some messages as Christian said (thank you for your tool, but I missed some components to run it), but it seems Tktable works fine, now also on Retina displays. Tested on Mojave and Big Sur.
0 new messages