tclsh SDDS OS RPN extension

Moderators: cyao, soliday

Post Reply
Philippe Piot
Posts: 83
Joined: 20 Aug 2008, 13:18
Location: Northern Illinois University & Argonne National Laboratory
Contact:

tclsh SDDS OS RPN extension

Post by Philippe Piot » 17 Apr 2012, 06:08

All,
I recently re-installed from source the elegant/SDDS/oag distribution on a cluster (where I am not superuser). Everything seems to run fine but I am having trouble with tcl/tk intepreter "seeing" the APS libraries/packages (SDDS,etc..). Specifically trying to run something like

#!/bin/sh
# \
exec tclsh "$0" "$@"

set Argonne /opt/nicadd/contrib/piot/Argonne_32/
set auto_path [linsert $auto_path 0 $Argonne/oag/apps/lib/linux-x86]
set auto_path [linsert $auto_path 0 $Argonne/oag/apps/bin/linux-x86]
set auto_path [linsert $auto_path 0 $Argonne/epics/extension/lib/linux-x86]
set auto_path [linsert $auto_path 0 $Argonne/epics/extension/bin/linux-x86]

puts $auto_path

APSStandardSetup

set MyYear [APSMakeFourDigitYear 10]
puts $MyYear

set Error [catch {package require ca} results]
puts "$Error $results"

set Error [catch {package require os} results]
puts "$Error $results"

set Error [catch {package require sdds} results]
puts "$Error $results"


returns
[piot@node1 Xband_Multi]$ ./test.tcl
/opt/nicadd/contrib/piot/Argonne_32//epics/extension/bin/linux-x86 /opt/nicadd/contrib/piot/Argonne_32//epics/extension/lib/linux-x86 /opt/nicadd/contrib/piot/Argonne_32//oag/apps/bin/linux-x86 /opt/nicadd/contrib/piot/Argonne_32//oag/apps/lib/linux-x86 /usr/share/tcl8.4 /usr/share /usr/lib
2010
1 can't find package ca
1 can't find package os
1 can't find package sdds

I can see the package in /oag/apps/lib/linux-x86 [I am assuming these are the libraries libtclCa.a libtclCa.so libtclOS.a libtclOS.so libtclRPN.a libtclRPN.so libtclSDDS.a libtclSDDS.so]. Somehow a similar install worked on our previous system but does not work on the present computer which runs Scientific linux SL5.5 (2.6.18-194.26.1.el5). Is there a env variable I have to set? Thanks a lot! -- Philippe.

Philippe Piot
Posts: 83
Joined: 20 Aug 2008, 13:18
Location: Northern Illinois University & Argonne National Laboratory
Contact:

Re: tclsh SDDS OS RPN extension

Post by Philippe Piot » 17 Apr 2012, 11:09

All,
I "fixed" my problem (though I think it is more a "quick-and-dirty" fix):

I updated my tcl file and changed the auto_path set to also include the src directory:
set auto_path [linsert $auto_path 0 $Argonne/oag/apps/src/tcltkinterp/extensions]

This insure the autopath point to the pkgIndex.tcl's files associated to the extensions. Then I manually went in each sub-directories of $Argonne/oag/apps/src/tcltkinterp/extensions (os, sdds, and rpn) and did a cp O.linux-x86/libtcl* . to insure the libraries are in the same directory as the corresponding pkgindex.tcl's files.

It is probably not a nice way to do but it works... If somebody has a cleaner way or can tell me which step I might have messed up in the installation (I followed the linux install notes) I would appreciate.

Thank you! -- PHilippe.

Post Reply