Operating System - Linux
1823920 Members
3144 Online
109667 Solutions
New Discussion юеВ

expect, tcl, oratcl problem

 
SOLVED
Go to solution
Turgay Cavdar
Honored Contributor

expect, tcl, oratcl problem

Hi all,
I installed tcltk-8.4.14 from http://hpux.cs.utah.edu on hp-ux 11.23 (Itanium). I also installed oratcl4.4 and expect 5.43. The problem is when we try to run our scripts it give the error:
/usr/lib/hpux32/dld.so: Unable to find library '/u01/app/oracle/product/9.2.0/client_1/lib/libclntsh.sl'.
Oratcl_Init(): Failed to load /u01/app/oracle/product/9.2.0/client_1/lib/libclntsh.sl with error

while executing
"load /usr/local/lib/Oratcl4.4/libOratcl4.4.sl"
("package ifneeded" script)
invoked from within
"package require Oratcl"
(file "/opt/omd/bin/execsql" line 2)

Ok there is no librray called "libclntsh.sl" , actually this must be libclntsh.so. Any ssuggestions?
13 REPLIES 13
Torsten.
Acclaimed Contributor

Re: expect, tcl, oratcl problem

Did you get all the Run-time dependencies mentioned on the pages, see e.g.

http://hpux.cs.utah.edu/hppd/hpux/Tcl/expect-5.43/

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Turgay Cavdar
Honored Contributor

Re: expect, tcl, oratcl problem

yes
Sandman!
Honored Contributor

Re: expect, tcl, oratcl problem

Are you sure you downloaded the Itanium version of the tcltk source code since the ".sl" extension for shared libs applies to PARISC while the ".so" extension is for IPFs.
Turgay Cavdar
Honored Contributor

Re: expect, tcl, oratcl problem

I am sure i installed the itanium version, i download the source code and compile it. But the result is the same it still asks for ".sl" . I think, i need to compile tcl source code with a special way. Any one can help about this?
Dennis Handly
Acclaimed Contributor

Re: expect, tcl, oratcl problem

>But the result is the same it still asks for ".sl" . I think, i need to compile tcl source code with a special way.

You may have to rebuild but you could try setting up a symlink from .sl to .so.
Turgay Cavdar
Honored Contributor

Re: expect, tcl, oratcl problem

i alreadt tried the symbolic link but it is not succesful also.
Dennis Handly
Acclaimed Contributor

Re: expect, tcl, oratcl problem

>/usr/lib/hpux32/dld.so: Unable to find library

This message indicates you are using IPF.

>i already tried the symbolic link but it is not succesful

What does file(1) say about /u01/app/oracle/product/9.2.0/client_1/lib/libclntsh.sl
(Or where you put that symlink.)
Turgay Cavdar
Honored Contributor

Re: expect, tcl, oratcl problem

Dennis you are right about the link, i was linked to 64 bit libraries so it was not working i tried to link to $ORACLE_HOME/lib32 then tcl successfulyy call the oratcl.
But expect scripts still gives error. When i call tcl from an expect script such as:
#!/usr/local/bin/expect
package require Oratcl

it gives the error:
tel1t1:/tmp#./testt.exp
/usr/lib/hpux32/dld.so: Cannot dlopen load module '/usr/lib/hpux32/libpthread.so.1' because it contains thread specific data.
Oratcl_Init(): Failed to load /u01/app/oracle/product/9.2.0/client_1/lib32/libclntsh.so with error
Oratcl_Init(): ORACLE_LIBRARY = /u01/app/oracle/product/9.2.0/client_1/lib32/libclntsh.so : file not found.

Any suggestions about this?
Dennis Handly
Acclaimed Contributor
Solution

Re: expect, tcl, oratcl problem

>/usr/lib/hpux32/dld.so: Cannot dlopen load module '/usr/lib/hpux32/libpthread.so.1' because it contains thread specific data.

You need to link expect with -lpthread.

Or there may be a non-threaded version of libclntsh?
Dennis Handly
Acclaimed Contributor

Re: expect, tcl, oratcl problem

You have not assigned any points yet. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Turgay Cavdar
Honored Contributor

Re: expect, tcl, oratcl problem

I installed expect from the depot with the command swinstall -s /file.depot. And it is successfully but when i try to compile from binary with the command ./configure --enable-threads --enable-shared --with-tcl=/usr/local/lib/tcltk --with-tk=/usr/local/lib/tcltk and run make i failed.It stops with the fallowing error:
cc -O -I../unix -L/usr/local/lib/hpux32 -Wl,-E -o expect exp_main_exp.o libexpect.a -L/usr/local/lib/hpux32 -ltcl -ldld -lpthread -lxnet -lm -Wl,+s,+b,/usr/local/lib/hpux32:/usr/local/lib:.
ld: Unsatisfied symbol "expStateAnyIs" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "expStateCheck" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_forked" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "expDevttyGet" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "expect_key" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_trap_on" in file libexpect.a[exp_tty.o]
ld: Unsatisfied symbol "exp_new_state" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "expStateFromChannelName" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_flageq_code" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_error" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "expCloseOnExec" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_free_state_single" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_init_spawn_ids" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_i_update" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_configure_count" in file libexpect.a[exp_event.o]
ld: Unsatisfied symbol "exp_new_i_complex" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_init_spawn_id_vars" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_init_unit_random" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "expStdinoutGet" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_new_i_simple" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_close" in file libexpect.a[exp_chan.o]
ld: Unsatisfied symbol "exp_free_i" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "exp_onexit_action" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_create_commands" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_init_most_cmds" in file libexpect.a[exp_main_sub.o]
ld: Unsatisfied symbol "exp_trap_off" in file libexpect.a[exp_tty.o]
ld: Unsatisfied symbol "expDevttyIs" in file libexpect.a[exp_inter.o]
ld: Unsatisfied symbol "expStdinoutIs" in file libexpect.a[exp_inter.o]
ld: Unsatisfied symbol "exp_free_state" in file libexpect.a[expect.o]
ld: Unsatisfied symbol "expStateCurrent" in file libexpect.a[expect.o]
30 errors.
*** Error exit code 1

Stop.

How can compile expect with the option -lpthread ?
Thanks...
Dennis Handly
Acclaimed Contributor

Re: expect, tcl, oratcl problem

How did you add -lpthread to the link line? Did you remove an existing lib or change the order? Do you know what lib has those exp* symbols? expStateAnyIs ...

You can search your libs and objects with:
$ nm -pxAN libs ... objs | fgrep -e expStateAnyIs -e expStateCheck ...

(Upper case would be definitions.)

If you don't know how to fiddle with the build system, you could always use: LDOPTS=-lpthread

Or going back to your initial version, if you use:
$ LD_PRELOAD=/usr/lib/hpux32/libpthread.so.1 ./testt.exp
Turgay Cavdar
Honored Contributor

Re: expect, tcl, oratcl problem

As you said when i export LD_PRELOAD then expect works fine.

Thanks, Dennis...