#### Beyond Linux® From Scratch (systemd Edition) - Version 11.1

### Chapter 13. Programming

- Prev

  Sysprof-3.42.1

- Next

  Vala-0.54.7

- Up
- Home

# Tk-8.6.12

## Introduction to Tk

The Tk package contains a TCL GUI Toolkit.

This package is known to build and work properly using an LFS-11.1 platform.

### Package Information

- Download (HTTP): https://downloads.sourceforge.net/tcl/tk8.6.12-src.tar.gz

- Download MD5 sum: 1d6dcf6120356e3d211e056dff5e462a

- Download size: 4.3 MB

- Estimated disk space required: 25 MB

- Estimated build time: 0.3 SBU (add 2.0 SBU for tests)

### Tk Dependencies

#### Required

Xorg Libraries

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/tk

## Installation of Tk

Install Tk by running the following commands:

    cd unix &&
    ./configure --prefix=/usr \
                --mandir=/usr/share/man \
                $([ $(uname -m) = x86_64 ] && echo --enable-64bit) &&

    make &&

    sed -e "s@^\(TK_SRC_DIR='\).*@\1/usr/include'@" \
        -e "/TK_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \
        -i tkConfig.sh

Running the tests is not recommended. Failures will be reported during the tests, depending on the screen resolution/capabilities, fonts installed and other X related parameters, but the end report can show 0 failures. Some tests will steal focus and some might crash your X Server. To test the results anyway, issue: make test. Ensure you run it from an X Window display device with the GLX extensions loaded, but even so, tests might hang.

Now, as the `root` user:

    make install &&
    make install-private-headers &&
    ln -v -sf wish8.6 /usr/bin/wish &&
    chmod -v 755 /usr/lib/libtk8.6.so

## Command Explanations

`$([ $(uname -m) = x86_64 ] && echo --enable-64bit)`: This switch is used to enable 64 bit support in Tk on 64 bit operating systems.

make install-private-headers: This command is used to install the Tk library interface headers used by other packages if they link to the Tk library.

ln -v -sf wish8.6 /usr/bin/wish: This command is used to create a compatibility symbolic link to the wish8.6 file as many packages expect a file named wish.

sed -e ... tkConfig.sh: The Tk package expects that its source tree is preserved so that packages depending on it for their compilation can utilize it. This sed removes the references to the build directory and replaces them with saner system-wide locations.

## Contents

Installed Programs: wish and wish8.6
Installed Libraries: libtk8.6.so and libtkstub8.6.a
Installed Directory: /usr/lib/tk8.6

### Short Descriptions

wish | is a symlink to the wish8.6 program
wish8.6 | is a simple shell containing the Tk toolkit that creates a main window and then processes Tcl commands
`libtk8.6.so` | contains the API functions required by Tk

Last updated on

- Prev

  Sysprof-3.42.1

- Next

  Vala-0.54.7

- Up
- Home