1. How to: tcl7.5a1 and tk4.1a1 for Linux ELF
How to compile tcl7.5 and tk4.1 for Linux ELF
---------------------------------------------
The stock tcl7.5a1 unix/configure script isn't set up for Linux ELF.
To fix that, you need to replace the linux shared library entry with
the following (look for "Linux*)" in the script):
Linux*)
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="gcc -shared"
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
LD_FLAGS=""
;;
Edit Makefile.in as follows:
1. Replace the line:
CFLAGS = -O
with
CFLAGS = -O -fPIC
2. If you want to make a dynamically linked tcl shared library, and a
dynamically linked tclsh executable add the following after the "all:"
line:
libtcl7.5.so.1: ${OBJS}
${SHLIB_LD} -o libtcl7.5.so.1 ${OBJS}
tclsh-dynamic: ${TCLSH_OBJS} libtcl7.5.so.1
${CC} ${LD_FLAGS} ${TCLSH_OBJS} -L. -ltcl7.5 ${DL_LIBS} \
${LIBS} ${MATH_LIBS} -o tclsh-dynamic
Then run
./configure
make tclsh-dynamic
Install tclsh-dynamic as tclsh7.5 in your binary directory, and install
libtcl7.5.so.1 in your library directory, and inform your loader about
it with:
/sbin/ldconfig
To make tk4.1a1 (AFTER installing libtcl7.5.so.1): unpack it in the
same directory in which you've unpacked tcl7.5. Edit Makefile.in as
follows:
1. Replace the line:
with:
2. Replace the line:
CFLAGS = -O
with
CFLAGS = -O -fPIC
3. If you want to make a dynamic tk shared library, and a
dynamically-lined wish executable, add the following after the "all:"
line:
libtk4.1.so.1: ${OBJS}
${SHLIB_LD} -o libtk4.1.so.1 ${OBJS}
wish-dynamic: libtk4.1.so.1
${CC} ${LD_FLAGS} ${WISH_OBJS} -ltcl7.5 ${DL_LIBS} \
${LIBS} ${MATH_LIBS} -o wish-dynamic
Then run
./configure
make wish-dynamic
Install wish-dynamic as wish4.1 in your binary directory, and install
libtk4.1.so.1 in your library directory, and inform the loader about
it with:
/sbin/ldconfig
--
2. FreeBSD resources, or some quick Newbie Answers..
3. problems compiling uudeview code with tcl7.5/tk4.1
4. SAMBA on SunOS does not like NT4.0
5. tcl7.5, tk4.1, scotty-2.1.5, linux 2.0.22
6. Problems with CD-ROM under Linux 1.2.11
7. Linux-Makefile shared [Tcl7.4/Tk4.0]b4 libs, used by tclsh+wish
8. just wondering..
9. Building Tcl7.4/Tk4.0 as shared libraries in Linux?
10. Need help with Tcl7.6/Tk4.2, gcc, FORTRAN/C/C++ shared libraries (LONG)
11. When to get tcl7.6 and tk4.2 ?
12. tkgnuplot for tcl7.4/tk4.0/Tix4.0?
13. Tcl7.4/Tk4.0 extension a.out shared libraries