question

Babu avatar image
Babu asked Babu posted

TCL rendering issue in linux

Can i know how to set TCLLIBPATH in Linux.

iTest
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Babu avatar image
Babu answered Babu posted

Hi,

 

Can you tell me how to do tcl rendering in linux. 

Following are the setup which i have done.

 

[root@localhost tcl]# export TCLLIBPATH=$TCLLIBPATH /root/Fanfare/itest_3.4/tcl

 [root@localhost tcl]# echo $TCLLIBPATH

 /root/Fanfare/itest_3.4/tcl

 

When i do tclsh

%package require itest

 

I get a message as 

can't find package itest.


 

 

8 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

HosoonK avatar image HosoonK commented ·

The message suggest it can not find the iTest tcl files located under "iTest_installation_dir/tcl".

If you have not changed the default iTest installation directory it should be "your_home/Fanfare/iTest_3.4" and it is case sensitive.

 

Can you check your iTest installation directory and make sure TCLLIBPATH has exactly the same directory without any typos or case differences.

 

Thanks, 

 

 

0 Likes 0 ·
tau avatar image tau HosoonK commented ·

Hi,

 

I'm also having trouble with setting up environment.  When doing tclsh and 'package require itest' I'm getting 'can't find package itest'.  The path seems correct as shown below.  Would anyone have any suggestions?

 

 

tau@mundoverde-itest:~$ echo $TCLLIBPATH

/root/iTest_3.4/tcl /home/qiuyued/ats5.1.0/lib

tau@mundoverde-itest:~$

tau@mundoverde-itest:~$

tau@mundoverde-itest:~$ ls /root/iTest_3.4/tcl

AETest          itestenv.tcl  itestsession.tcl  itest.tcl

itestcomms.tcl  itestrun      iteststep.tcl     pkgIndex.tcl

tau@mundoverde-itest:~$

tau@mundoverde-itest:~$

tau@mundoverde-itest:~$ tclsh

% package require itest

can't find package itest

%

 

Thank you.

0 Likes 0 ·
KumarS avatar image KumarS tau commented ·

From your screenshot, it does not look like you are doing anything wrong.

 

You may want to try the following just to make sure that nothing has gone wrong in syntax in between the two entries you have in TCLLIBPATH.

 

export TCLLIBPATH /root/iTest_3.4/tcl

tclsh

package require itest

 

 

Another reason you may want to check is if you have read permissions on these tcl files. It seems like this is installed as root and you are trying to access them as a normal user.

0 Likes 0 ·
ZhongyuZ avatar image ZhongyuZ KumarS commented ·

Can you show the install directory of iTest?

 

In one post you set

  export TCLLIBPATH=$TCLLIBPATH /root/Fanfare/itest_3.4/tcl

 

later you showed

  tau@mundoverde-itest:~$ echo $TCLLIBPATH

  /root/iTest_3.4/tcl /home/qiuyued/ats5.1.0/lib

 

First make sure the path is correct. Second note your above setting is not correct, space has to be put in quotes:

  export TCLLIBPATH="$TCLLIBPATH /root/Fanfare/itest_3.4/tcl"

0 Likes 0 ·
VidyaH avatar image VidyaH ZhongyuZ commented ·

Hi Zhongyu,

I think you got confused as the TCLLIBPATH you have mentioned are from  two  different post by different users.

 

Thanks,

Vidya

0 Likes 0 ·
tau avatar image tau VidyaH commented ·

Thank you for the replies.  I got it to kinda work by trying Vidya's earlier posts.

 

Added following in my .bashrc file:


export TCLLIBPATH="/root/iTest_3.4/tcl /home/qiuyued/ats5.1.0/lib"


Then sourced it:


tau@mundoverde-itest:~$source .bashrc

tau@mundoverde-itest:~$ 

tau@mundoverde-itest:~$ echo $TCLLIBPATH

/root/iTest_3.4/tcl /home/qiuyued/ats5.1.0/lib

tau@mundoverde-itest:~$ 

tau@mundoverde-itest:~$ 

tau@mundoverde-itest:~$ tclsh

%

% package require itest

error reading package index file /home/qiuyued/ats5.1.0/lib/pkgIndex.tcl: can't read "env(AUTOTEST)": no such variable

1.4.1

% package require itest

1.4.1


sj22lab-as3:357> 

 

Follow up question is why the error message after invoking 'package require itest' the first time and error message is not displayed when same cli is executed again.  I did change permssion to file pkgIndex.tcl.

 

Thank you.

0 Likes 0 ·
tau avatar image tau tau commented ·

Issue resolved.  Added following to .bashrc file:

 

export AUTOTEST=”/root/iTest_3.4/tcl /home/qiuyued/ats5.1.0”

 

tau@mundoverde-itest:~$ tclsh

%

% package require itest

1.4.1

 

Thank you.

0 Likes 0 ·
KumarS avatar image KumarS tau commented ·

This is because you have a bug in "ats5.1.0" library where it needs AUTOTEST variable being set. It is not behaving properly as a standard TCL package. The underlying error message had nothing to do with iTest.

0 Likes 0 ·
VidyaH avatar image
VidyaH answered VidyaH posted

you can use the below for setting the TCLLIBPATH , in this case it is for traffic gen applications...

 

export TCLIBPATH="/home/fanfare/Agilent/N2X/tcl/extras  /opt/Ixia/IxOS/lib /home/fanfare/Spirent_TestCenter_2.01/Spirent_TestCenter_Application_Linux"

 

After setting this , then type "env" on console to verify the TCLLIBPATH is set properly.

 

 

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

HosoonK avatar image HosoonK commented ·

To make the env variable (TCLLIBPATH) setting permanent for your user account, you can add/modify the .bashrc file from the user's home.

If your account is located at /home/fanfare you will find this file under /home/fanfare/.bashrc 

 

Simply add the line that Vidya mentioned as above in your .bashrc file.

Each time when you open a new bash shell this .bashrc will be sourced 

 

Typical .bashrc file could include

 

..

export ITEST_HOME=/home/fanfare/Fanfare/iTest_3.4more

export N2X_AGTCLIENT=/home/fanfare/Agilent/N2X/tcl/extras
export N2X_QUICKTEST=/home/fanfare/Agilent/N2X/QuickTest
export N2X_QUICKTEST_TCL=tclsh

export IXIA_HOME=/opt/ixia_5.30_ea
export IXIA_VERSION=5.30.450.21
export IXIA_RESULTS_DIR=/tmp
export IXIA_LOGS_DIR=/tmp
export IXIA_SAMPLES=$IXIA_HOME/samples
export IXIA_TCL_DIR=$IXIA_HOME/lib

export TCLLIBPATH="/home/fanfare/Agilent/N2X/tcl/extras /usr/local/ActiveTcl/lib $ITEST_HOME/tcl $IXIA_HOME/lib $IXIA_HOME/lib/IxTclNetwork $IXIA_HOME/lib/ixTcl1.0  $IXIA_HOME/IxLoadTclAPI4.10.94.82-EA-SP1-Patch1"

export LD_LIBRARY_PATH=$IXIA_HOME/lib:$IXIA_HOME/lib/IxTclNetwork:$IXIA_HOME/lib/ixTcl1.0:$IXIA_HONE/IxLoadTclAPI4.10.94.76-EASP1

0 Likes 0 ·
KumarS avatar image
KumarS answered KumarS posted

If you are using BASH shell, you can do:

 

export TCLLIBPATH="/home/foo/bar /home/foo/zzz"

 

Remember that entries need to be space separated.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.