The Landslide Tcl API provides support for 64-bit or 32-bit Tcl/Java on Linux, Windows and Mac.
64-bit Tcl/Java is possible on Windows and Mac, but user must provide their own Tcl and/or compile
their own Tcl/TclJBlend libraries. For information on how to compile see Compile Landslide provided 64-bit TCL 8.6.10
Landslide Tcl API depends upon TclBlend
or tclJBlend. We provide TclBlend libraries for 32-bit
Linux and Windows installations, and JBlend for 64-bit Linux, Windows, and MAC installations.
The 64-bit Windows and Mac JBlend libraries are included in the JBlendLibs.zip file that will be in the
Landslide Tcl API Packages/Files (landslidetclapi.zip) file. For JBlend download and usage from tclJBlend WiKi page.
Java 8+ (1.8.0) is required for the Landslide TCL API.
The 32-bit and 64-bit 1.8.0 JRE for common OSs can be downloaded from the Landslide
Troubleshoot Java Web Start Problems
page.
All Java versions can be downloaded from
Oracle's Java Website or for Open JDK from AdoptOpenJDK page.
If any of the file links return 404/not found, i.e. are not available from the
Landslide homepage, ask Support for copies.
Once you have installed the Tcl API, go to the
Using the Tcl API topic in the Landslide User Guide for more information.
If do not already have your own Tcl installed on your system, you can use our provided version of Tcl 8.4 (32-bit) or Tcl 8.6 (64-bit) that is pre-packaged to work with our Tcl API.
Our standalone Tcl API install provides its own version Tcl 8.6.10 compatible with 64-bit Java.
####################################################################### # Install location for the landslide TCL api and JRE libjvm.so/libjvm.dylib library # Set these to the correct locations for your 64-bit system ####################################################################### api_home=/home/tester/landslidetclapi export JVM_LIB_PATH=/usr/jdk8u282-b08/jre/lib/amd64/server/libjvm.so jblend_lib=${api_home}/lib/tclJBlend-2.1 ... #Change this to meet your memory needs of the Tcl API export JAVA_MAX_MEMORY=1024m
-bash-5.0$ mkdir landslidetclapi -bash-5.0$ cd landslidetclapi -bash-5.0$ tar zxf ../linux64tclblend8.6.tar.gz -bash-5.0$ unzip -q ../landslidetclapi.zip -bash-5.0$ cp jtclsh64 landslidetclapi -bash-5.0$ chmod 755 landslidetclapi -bash-5.0$ vi landslidetclapi//EDIT THE VARIABLES IN THE FILE AT THIS POINT
-bash-5.0$ ./landslidetclapi % source landslidetclapi.tcl Starting Java with Max Heap=1024m Debug Logs will be located in: /home/tester/.tas named: tclapi_0_.N.log %
If you have any issues with missing 32-bit libraries when using Java 8, see KB article, KNI14185
# Install location for tclblend and landslide Tcl API # Set these to the location of your tclblend and JRE api_home=/home/user/landslidetclapi --- Path to your directory jblend_lib=${api_home}/lib/tclJBlend-2.1 #And update JVM_LIB_PATH: export JVM_LIB_PATH=/usr/java/jre1.8.0_121/lib/amd64/server/libjvm.so #Change this to meet your memory needs of the Tcl API export JAVA_MAX_MEMORY=1024m
rem Set this to where you installed Landslide API, i.e. most likely the directory this file is in set API_HOME=D:/TclApi rem Set this to where Java/JRE is installed set JRE_HOME=C:/Programs/Java/zulu11.58.23-ca-jre11.0.16.1-win_x64 rem Set this to where Java/JRE main DLL is located set JVM_LIB_PATH=C:/Programs/Java/zulu11.58.23-ca-jre11.0.16.1-win_x64/bin/server/jvm.dll rem Set this to your TCL Executable location set TCLSH=%API_HOME%/IronTcl/bin/tclsh86t rem Change this as needed for memory set JAVA_MAX_MEMORY=256m
rem Set this to where you installed Landslide API set API_HOME=D:/COTS/tclapi rem Set this to where Java/JRE is installed set JRE_HOME=c:/Programs/Java/jdk1.6.0_10/jre rem Change this to meet your memory needs of the Tcl API export JAVA_MAX_MEMORY=1024m
If you already have your own Tcl installation, then you can install our Tcl API as a package to your Tcl configuration. Your Tcl environment should be compiled to support threading.
1. PATH must include the following paths: %JRE_HOME%/bin/client %API_HOME%/lib/tcljava1.4.0 2. CLASSPATH must be set and include the following paths: %API_HOME%/sp_product.jar %API_HOME%/coast_shared.jar %API_HOME%/coast_client.jar %API_HOME%/landslidetclclient.jar 3. TCLLIBPATH must include the following path AFTER your default paths: %API_HOME%/lib %API_HOME%/lib/tclJBlend-2.1
Where JRE_HOME is the path to the Java/JRE installation and API_HOME is the path to the Landslide Tcl API installation (i.e. from step 2 in standalone install)
Note: Our jtclsh script includes all of these variables, so you can see how we did it.
unzip -q JBlendLibs.zip
"ibtclJBlend.dylib"" cannot be opened because the developer cannot be verified.See Mac Gatekeeper
####################################################################### # Change these if you want to use your own Tcl installation ####################################################################### WISH=$api_home/bin/wish8.4 TCLSH= PATH TO YOUR TCL EXECUTBLE # i.e. your own Tcl executable: TCLSH=/usr/bin/tclshAs long as the rest of the environment variables line up it should work. Otherwise, if you need to use your own startup script, three things must be configured.
1. PATH must include the following paths: %JRE_HOME%/bin/client 2. CLASSPATH must be set and include the following paths: %API_HOME%/sp_product.jar %API_HOME%/coast_shared.jar %API_HOME%/coast_client.jar %API_HOME%/landslidetclclient.jar 3. TCLLIBPATH must include the following path AFTER your default paths: %API_HOME%/lib %API_HOME%/lib/tclJBlend-2.1
Where JRE_HOME is the path to the Java/JRE installation and API_HOME is the path to the Landslide Tcl API installation (i.e. from step 2 in standalone install)
Note: Our jtclsh script includes all of these variables, so you can see how we did it.
Issues? See Linux Troubleshooting before contacting support
1. LD_LIBRARY_PATH must include the following paths: $JRE_HOME/lib/i386/client $JRE_HOME/lib/i386/native_threads $JRE_HOME/lib/i386 $API_HOME/lib/tcljava1.4.1 If you are using our provided Tcl 8.4, you must add $API_HOME/lib, otherwise do what you need for your own Tcl installation. 2. CLASSPATH must be set and include the following paths: $API_HOME/sp_product.jar $API_HOME/coast_shared.jar $API_HOME/coast_client.jar $API_HOME/landslidetclclient.jar 3. TCLLIBPATH must include the following path AFTER your default paths: $API_HOME/lib $API_HOME%/lib/tclJBlend-2.1
Where JRE_HOME is the path to the Java/JRE installation and API_HOME is the path to the Landslide Tcl API installation (i.e. from step 2 in standalone install)
Note: Our jtclsh script includes all of these variables, so you can see how we did it.
Issues? See Linux Troubleshooting before
contacting support
You must upgrade your Landslide Tcl API any time you upgrade your TAS! Just follow this simple procedure:
These are some notes that may help in troubleshooting Tcl API setups.
If you get this error on startup:
"XpUtils::iload -d /home/ddiolosa/api/lib/tcljava1.4.1 tclblend" failed: couldn't load file "/home/ddiolosa/api/lib/tcljava1.4.1/libtclblend.so": libjava.so: cannot open shared object file: No such file or directory
This means you are not pointing to a JRE properly... Is LD_LIBRARY_PATH
pointing to 32-bit JRE or 64-bit JRE to match your target installation?
If you are still installing the 32-bit API, it requires 32-bit libraries even if running on 64-bit linux, if they
are not installed, you should try these commands to make sure:
Redhat/Centos/yum: yum install unzip glibc.i686 Debian/apt-get: apt-get install lib32z1 lib32gcc1
If you get this error on startup:
JNI_CreateJavaVM failed. Please also check "tclblend_init" settings and if your JVM is compatible with the Tcl interpreter (i.e. both 34 bit or both 64 bit)
This means the JRE you are pointing to is not supported for some reason by the API. It could be 32-bit vs 64-bit thing or some other special JRE limited distribution. Try a different JRE. A Server JRE seems to work better than Client JRE.
If you get this warning on login:
Java HotSpot(TM) Client VM warning: You have loaded library /home/ddiolosa/api/lib/tcljava1.4.1/libtclblend.so which might have disabled stack guard. The VM will try to fix the stack guard now.
We have provided a new libtclblend.so in your API directory, you can copy this into API_HOME/lib/tcljava1.4.1 directory.Or else you will want to run execstack to remove the warning:
/usr/sbin/execstack -c API_HOME/lib/tcljava1.4.1/libtclblend.so apt-get install execstack
You may need to get libhpi.so, which we provided in the API_HOME
directory. See KB http://docid.spirent.com/KNI14185.
And install in your JRE as directed, or else put it somewhere else in
your library path.
If you get this warning when exiting Tcl:
libgcc_s.so.1 must be installed for pthread_cancel to work
You need to get your 32-bit libgcc_s.so.1.
We have provided one that should be in your API_HOME.
Just put this file in your library path somewhere, maybe in
API_HOME/lib
If you get these warnings:
“ java.lang.UnstatisfiedLinkError:/xxxx/lib/i386/libbawt_xawt.so:libXext.so.6: cannot open shared object file:no such file or directory”. “ java.lang.UnstatisfiedLinkError:/xxxx/lib/i386/libbawt_xawt.so: libXrender.so.1: cannot open shared object file:no such file or directory”. “ java.lang.UnstatisfiedLinkError:/xxxx/lib/i386/libbawt_xawt.so: libXi.so.6: cannot open shared object file:no such file or directory”.
Explanation/Resolution:
See KB http://docid.spirent.com/KNI14828 There are three required
packages for i386 architecture missing in the system which are
libxrender1, libxtst6, libxi6. They can be fixed by install these
three packages: apt-get install libxrender1:i386 libxtst6:i386
libxi6:i386
enter following command:
> ./configure --prefix= <absolute directory path of landslide tcl api home > --enable-64bit --enable-threads > make && make install
enter following command, if you want more options, follow the README
> ./configure --prefix= <absolute directory path of landslide tcl api home > --enable-64bit --enable-threads > make -C . > sudo make -C . install