Thoughts on Tcl (long but necessary)

Randy McMurchy randy at
Sat Apr 29 11:44:20 PDT 2006

Bruce Dubbs wrote these words on 04/28/06 21:13 CST:

> The more I research this, the more I think that this should be a basic
> CMMI package.  We should just fundamentally use the LFS Chapter 5
> instructions:
> cd unix
> ./configure --prefix=/usr --enable-threads
> make
> make install
> make install-private-headers
> ln -sv tclsh8.4 /tools/bin/tclsh

(of course, the /tools/... would be /usr/...)

So far, I've built several packages from BLFS and a couple Non
BLFS packages. In this testing, I didn't modify tcl/
and only used 'make install-private-headers' to install any
private headers. Nothing so far has failed to build.

There are packages (for example Expect) that pick up the wrong
LDFLAGS, but it didn't affect the build as apparently it also
had /usr/lib in the LDFLAGS setting. Here is example output from
Expect's configure:

checking for Tcl configuration... found /usr/lib/
checking Tcl build library... -L/home/rml/build/tcl8.4.13/unix -ltcl8.4 -ldl  -lpthread -lieee -lm

and how this was passed along in the Makefile to the make
command (this was actually all one long line):

gcc -pipe   -Wl,--export-dynamic -o expect exp_main_exp.o
libexpect5.43.a -L/home/rml/build/tcl8.4.13/unix -ltcl8.4
-ldl  -lpthread -lieee -lm -lutil

Notice how it picked up the non-existent build directory
from the But since /usr/lib is indirectly
passed, the build didn't fail.

Makes me wonder if there are programs that will use this
build dir only. Not sure why they would as the TCL_LIB_SPEC
variable is what should be used:

TCL_LIB_SPEC='-L/usr/lib -ltcl8.4${TCL_DBGX}'

and not the TCL_BUILD_LIB_SPEC:

TCL_BUILD_LIB_SPEC='-L/home/rml/build/tcl8.4.13/unix -ltcl8.4${TCL_DBGX}'

But, as we know, what programmers should do and what actually
is done may be two different things. Anyway, it would seem it
would be a trivial fix if a package didn't pick up Tcl's lib
dir correctly. So I think we can get away without modifying
the tcl/ files.

> Nothing more unless we can positively establish a need.  At least they
> say that the private headers are needed for expect.

The only other things left are these two symlinks:

ln -v -nsf ../../include/tcl8.4 /usr/lib/tcl8.4/include
ln -v -sf /usr/lib/

Though I stupidly created these when I installed Tcl/Tk for testing,
I went back through the build trees (including logs of all output
during building) of all the packages I built and grepped for
indications that anything looked for the include directory as a sub
of /usr/lib/{tcl,tk}8.4 or if anything used -l{tcl,tk} instead of
-l{tcl,tk}8.4. I couldn't find anything. Again, probably a trivial
fix if any package were to use references to the symlinks instead of
the actual installed library/include files.


rmlscsi: [bogomips 1003.28] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
[GNU C Library stable release version 2.3.6] [Linux i686]
13:09:01 up 35 days, 46 min, 1 user, load average: 0.48, 0.16, 0.05

More information about the blfs-dev mailing list