I'm trying to get Tcl Blend installed on a RedHat 5.2 Linux system,
and it almost works. This note is partly to let other folks who
may be interested in Tcl Blend and Linux know what I've done that
worked, and partly to see if anyone has suggestions for where to
go from here.
There were several preliminary steps to getting to TclBlend. First
off, the Java supplied with RedHat 5.2 doesn't seem to include
libraries. I found a java rpm, but that required a Motif library.
So, first LessTif, then Java, then Tcl, then Tcl Blend...
Here's the steps I've gone through:
1) Install LessTif.
I downloaded 'lesstif-current.tar.gz', configured, made, and it
created libXm.so.1.2.
I then made a symbolic link from the libXm.so.1.2 to
/usr/lib/libXm.so.2.
The jdk rpm file I downloaded required libXm.so.2.
2) Install the jdk kit. The java supplied with RedHat 5.2 didn't
seem to have the libraries. Perhaps I missed something.
I got jdk-1.1.7.1a-2glibc.i386.rpm and installed it with:
rpm -iv --test --nodeps jdk-1.1.7.1a-2glibc.i386.rpm
This installed under /usr/local/jdk1.1.7
3) Download and install Tcl8.0.4
I downloaded the tcl8.0.4.tar.gz and tk8.0.4.tar.gz from Scriptics,
configure --enable-shared
make
4) Download and compile TclBlend
I downloaded tclBlendSrc1.1a1.tar.gz from Scriptics
Used symbolic links to make a directory tree that resembled:
tclBlend1.1a1 tk8.0 tcl8.0
Made two symbolic links in the java distribution to pass the
sanity checks in configure:
ln -s /usr/local/jdk1.1.7/lib/i686 /usr/local/jdk1.1.7/lib/linux
ln -s /usr/local/jdk1.1.7/include/genunix \
/usr/local/jdk1.1.7/include/linux
set the JAVA_HOME environment variable to /usr/local/jdk1.1.7
configure \
--with-javaarchlib=/usr/local/jdk1.1.7/lib/i686/native_threads
Modify Makefile:
I added the java library to the libtclblend.so link line. Without
this, I got an undefined/unfound library when I tried to load
libtclblend.so
....
# Build the shared library
libtclblend$(SHLIB_SUFFIX): $(OBJS)
rm -f libtclblend$(SHLIB_SUFFIX)
$(SHLIB_LD) $(OBJS) \
-L/usr/local/jdk1.1.7/lib/i686/native_threads -ljava \
-o libtclblend$(SHLIB_SUFFIX)
....
make
This procedure got me a libtclblend.so that can be loaded into wish,
almost.
The Java Virtual Machine fails to find classes.zip.
$> wish I don't have source to the java kit, so I'm at a bit of a loss for So, being rude&crude, I copied classes.zip from /local/jdk/lib to /. $> wish8.0 The missing class *seems* to be in classes.zip: $> unzip -t classes.zip | grep System If anyone has gotten further than this, I'll be pleased to Clif ------------------------------ Clif Flynt -----------------------
% load "./libtclblend.so"
Unable to initialize threads: cannot find class java/lang/Thread
JNI_CreateJavaVM() failed.
Perhaps your CLASSPATH includes a classes.zip file for a version other
the one Tcl Blend was compiled with?
Currently, the CLASSPATH environment variable is set to:
/usr/local/jdk1.1.7/lib:/../../../classes:/../../classes.zip:/../../classes
The JVM currently is using the following
classpath:/../../../classes:/../../classes.zip:/../../classes.jar:/../../rt
% set env(CLASSPATH)
/usr/local/jdk1.1.7/lib
% set env(JAVA_HOME)
/usr/local/jdk1.1.7
what's happening in the java engine. Running strings on the libjava.so
indicates that the JVM classpath is initialized as
"%s/../../../classes...", but I couldn't figure out what variable was
being used for the %s. The obvious choices of JAVA_HOME, CLASSPATH,
and JAVA_CLASSPATH had no effect.
This improved matters a little. The load process takes much longer
before failing.
% load "./libtclblend.so"
Can't find class java.lang.System
JNI_CreateJavaVM() failed.
Perhaps your CLASSPATH includes a classes.zip file for a version other
the one Tcl Blend was compiled with?
Currently, the CLASSPATH environment variable is set to:
/usr/local/jdk1.1.7/lib:/../../../classes:/../../classes.zip:/../../classes
The JVM currently is using the following
classpath:/../../../classes:/../../classes.zip:/../../classes.jar:/../../rt
testing: java/lang/System.class OK
...
hear how far you got and how you got there.
--- Tcl/Tk for Real Programmers - Academic Press Professional ---
---------------- Release Date: December 1998 -----------------
- In theory there is no difference between theory and practice -
------------------------ In practice, there is. -----------------