Operating System - Linux
1754285 Members
3045 Online
108813 Solutions
New Discussion юеВ

Oratcl 4.4 errors on HP-UX 11.11

 
SOLVED
Go to solution
rameshyg
Occasional Contributor

Oratcl 4.4 errors on HP-UX 11.11

Hi all-

I had installed TclTk 8.4.14 hp-ux 11.11 box. The DBA has Oracle9.2 installed on the same machine. I'm trying to help get oratcl4.4 installed but am having issues.

I've tried making oratcl in both shared and not-shared mode but that doesn't seem to help.

I am able to install Oratcl4.4, but getting below errors when the user is running oralogon coammnds.

/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Oratcl_Init(): Failed to load /opt/oracle/OraHome1/lib32/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 "/webdata/cgi-includes/ngempss_logon.tinc" line 14)
invoked from within
"source /webdata/cgi-includes/ngempss_logon.tinc"
invoked from within
"if {$inEmplid == "518744PR" || $inEmplid == "253303--MaryLee"} {
puts "
LOGGING INTO WSIT!!
"
source /webdata/cgi-includes/ngempss_wsit_lo..."
(file "includes/init_logon.tinc" line 2)
invoked from within
"source includes/init_logon.tinc"
invoked from within
"if {$inLogonType == "init"} {
source includes/init_logon.tinc
} else {
source includes/logon.tinc
puts " "
}"
(file "/webdata/cgi-sbin/esources/logon.tcl" line 127)
$
================
Used the below configure command.
configure --with-tcl=/usr/local/lib/tcltk --with-oracle-directory=/opt/oracle/OraHome1 --enable-stubs --enable-shared --with-tk --without-tclx --enable-threads --enable-gcc


The make gave the below errors:
# make
gcc -pipe -DPACKAGE_NAME=\"Oratcl\" -DPACKAGE_TARNAME=\"oratcl\" -DPACKAGE_VERSION=\"4.4\" -DPACKAGE_STRING=\"Oratcl\ 4.4\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D_XOPEN_SOURCE_EXTENDED=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DUSE_TCL_STUBS=1 -DHAVE_DLFCN_H=1 -DSHLIB_SUFFIX=\".sl\" -I"/usr/local/include" -O2 -Wall -Wno-implicit-int -fPIC -c `echo ./generic/oratcl.c` -o oratcl.o
./generic/oratcl.c: In function 'Oratcl_Logon':
./generic/oratcl.c:1678: warning: dereferencing type-punned pointer will break strict-aliasing rules
./generic/oratcl.c:1685: warning: dereferencing type-punned pointer will break strict-aliasing rules
./generic/oratcl.c:1691: warning: dereferencing type-punned pointer will break strict-aliasing rules
./generic/oratcl.c:1736: warning: dereferencing type-punned pointer will break strict-aliasing rules
./generic/oratcl.c: In function 'Oratcl_Info':
./generic/oratcl.c:2382: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness
./generic/oratcl.c: In function 'Oratcl_Open':
./generic/oratcl.c:2505: warning: dereferencing type-punned pointer will break strict-aliasing rules
rm -f libOratcl4.4.sl
gcc -shared -o libOratcl4.4.sl oratcl.o oralob.o oralong.o -L/usr/local/lib -ltclstub
: libOratcl4.4.sl

---------------
# make install
rm -f libOratcl4.4.sl
gcc -shared -o libOratcl4.4.sl oratcl.o oralob.o oralong.o -L/usr/local/lib -ltclstub
: libOratcl4.4.sl
/opt/imake/bin/install -c libOratcl4.4.sl /usr/local/lib/Oratcl4.4/libOratcl4.4.sl
: /usr/local/lib/Oratcl4.4/libOratcl4.4.sl
Install pkgIndex.tcl /usr/local/lib/Oratcl4.4
Installing header files in /usr/local/include
Installing documentation in /usr/local/man
Installing ./doc/oratcl.n
=========================

How to overcome the errors?
/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Oratcl_Init(): Failed to load /opt/oracle/OraHome1/lib32/libclntsh.sl with error

ORACLE_HOME=/opt/oracle/OraHome1

I had also added the below line to .profile of the user "web", who is running these oralogon commands.
export LD_PRELOAD=/usr/lib/libcl.2 tclsh

Thanks
Ramesh Yarlagadda
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

If you expect to load libclntsh.sl, you must link your application with -lcl.
Or use LD_PRELOAD= as you had on the end.

rameshyg
Occasional Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

Denis,

How to link the application with -lcl? Can you please give me more info.

Thanks,
Ramesh
Dennis Handly
Acclaimed Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

>How to link the application with -lcl?

On the end of your link line for building tclsh, just add -lcl.
rameshyg
Occasional Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

Dennis,

Do I need to re-install tcl?

Thanks,
Ramesh
Luk Vandenbussche
Honored Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

Why don't you try the precompile version, installable as a depot

http://hpux.cs.utah.edu/hppd/hpux/Tcl/tcltk-8.4.14/
rameshyg
Occasional Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

Hi,

I had installed the tcltk 8.4.14 from the below URL. It is a Depot software and I had installed it with sam.
http://hpux.cs.utah.edu/hppd/hpux/Tcl/tcltk-8.4.14/

Thanks,
Ramesh
Dennis Handly
Acclaimed Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

>I had installed the tcltk 8.4.14 from the below URL.

No this build is "broken" in that you can't have plugins of Pascal, aC++ or Fortran and probably Java, without you using LD_PRELOAD.

If there is a way to ask them to add -lcl to their PA builds, I would suggest you do so.

Here is the info on the aC++ page about plugins:
http://www.docs.hp.com/en/7762/5991-4874/distributing.htm#linking

The only immediate info you need is:
The a.out must be linked with:
/usr/lib/libcl.sl (or on the link line -lcl)
rameshyg
Occasional Contributor

Re: Oratcl 4.4 errors on HP-UX 11.11

Hi,

There is no a.out in the system.

# find / -name "*a.out*"
/home/scheida1/PATCHES/PHSS_35381/C-INC/usr/include/a.out.h
/usr/share/man/man4.Z/a.out.4
/usr/share/man/ja_JP.eucJP/man4.Z/a.out.4
/usr/share/man/ja_JP.SJIS/man4.Z/a.out.4
/usr/include/a.out.h
/var/adm/sw/save/PHSS_33035/C-INC/usr/include/a.out.h
/var/adm/sw/save/PHSS_35381/C-INC/usr/include/a.out.h

What do you mean by the build is broken?

Thank you very much,

Ramesh
Dennis Handly
Acclaimed Contributor
Solution

Re: Oratcl 4.4 errors on HP-UX 11.11

>There is no a.out in the system.

Sorry, a generic term for the executable.

>What do you mean by the build is broken?

You're having trouble, so by definition the build is broken. ;-)