RoomFuConference Room SADv

Compile SAD in Linux and HP-UX

SpeakerFEun-San Kim

(Date: Monday, October 14, 2002 16:55:59)


1) Now I am going to install SAD to PLS Linux.
When I perform "make" command, I see the following messages.
/usr/bin/ld: cannot find -ltk8.3
collect2: ld returned 1 exit status
chmod: ../obj/Linux/sad1.exe: No such file or directory.
make[1]: Leaving directory `/home/eskim/oldsad/src'

Could you tell me what is tk8.3 ?

2) When I also perform "make" command in HP-UX, I see the following messages.
/bin/csh -f -v -c "make all_object_ARCH TARGETOS=`../bin/HostArch`"
Make: Couldn't load Shell. Stop.
*** Error exit code 1

Could you tell me the what I need to compile?

Sincerely yours,
Eun-San KIM


Comment by Akio Morita
( Date: Tuesday, October 15, 2002 11:46:43)

Case 1.
Default make target of sad distribution builds SAD with TKinter.
Tkinter is GUI widget set on SAD Script based on Tcl/Tk library.
Then, message `/usr/bin/ld: cannot find -ltk8.3' means that linkage loader can't find
Tcl/Tk's GUI toolkit library.

Solution A. build without Tkinter
To build SAD without Tkinter, you may use `notk' make target.
(But, you can't use Tkinter GUI widget set in SAD Script.)
% cd (somewhere)/oldsad/src
% make notk

Solution B. install Tcl/Tk
Install Tcl/Tk with SAD's special patch before compiling SAD.
See oldsad/src/README.TclTk-Linux file in SAD distribution package.
You can find `How to get and install Tcl/Tk'.


Comment by Kentaro Harada
( Date: Tuesday, October 15, 2002 18:10:17)

To install SAD (with TKinter), you need tk8.3.2.tar.gz and tcl8.3.2.tar.gz.
If you have account on ACSADs, you can get them from, for example, my directory.
/users/kentaro/
These two files are distributed in many places and by serching by google, goo, etc,
you can easily find them.

(follwings are written in oldsad/src/README.TclTk-Linux)

After you get them, you gunzip and extract them in your oldsad directory.

tar -zxvf oldsad.tar.gz
cd oldsad
tar -zxvf tk8.3.2.tar.gz
tar -zxvf tcl8.3.2.tar.gz

and after extraction of these files
(oldsad/tk8.3.2, and oldsad/tcl8.3.2 are made),

cd src
make TCLINSTALLDIR=(your oldsad directory)/tcltk tcltk
(for example, make TCLINSTALLDIR=/users/kentaro/oldsad/tcltk tcltk)

SAD version of tcl and tk are compiled in oldsad/tcltk.
(oldsad/tcltk is made)

then

(if you do not install epics in your PC. you comment out EPICS difinition
in Makefile.Linux.

# Makefile.Linux 9/19/1999 K. Oide
#

#EPICS variables

#EPICS=/users/akasaka/epics313/base
#EPICS=/proj/epics/R313/base <- comment out
TCLINSTALLDIR=/SAD/share/TclTk/Linux/
TCLSOURCEDIR=..
TCL_VERSION=8.3
TCL_PATCH_LEVEL=8.3.2
)


make TCLINSTALLDIR=(your oldsad directory)/tcltk

you can get oldsad/bin/Linux/sad1.exe


Comment by Kentaro Harada
( Date: Tuesday, October 15, 2002 18:33:33)

(I don't know well...)

Tcl is GUI library for X-windows. Tk is "tooikit" for tk.
SAD use them for GUI interface for accelerator control.
If you only use SAD for command line simulation, you do not
need tcltk. If you want graphics of Twiss parameter etc, you
can use "topdrawer". (you do not need tcltk.) I think tcltk is
only useful with epics (accelerator control libraries) or
your control system. If you do not think SAD for control your
accelerator, you do not need Tcl and Tk.