1821051 Members
2691 Online
109631 Solutions
New Discussion юеВ

Re: linker error problem

 
Anand_56
Occasional Advisor

linker error problem

I am facing a linker error in my application build process for a library.

Problem:
Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1

I am using gmake, aCC, ld, and Ansi C to compile my libraries on hp-ux 11.11.

===================
server info
===================

$ uname -a
HP-UX kihim B.11.11 U 9000/800 3245594018 unlimited-user license

$acc -V
aCC: HP ANSI C++ B3910B A.03.55

$ ls -l /usr/bin/cc
lr-xr-xr-t 1 root sys 17 Jun 16 18:57 /usr/bin/cc -> /opt/ansic/bin/cc

============
The ld that I am using
=============

$ ls -l /usr/bin/ld
lr-xr-xr-t 1 root sys 15 Feb 1 12:35 /usr/bin/ld -> /usr/ccs/bin/ld

============
gmake version
==============

$ gmake -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

============
CC options
============

$cc -D_UNIX -D_HPUX_SOURCE -I. -I../../../include -I/usr/oracle/10.1.0.2/precomp/public +DAportable +z -Ae +u4 +ESlit -c alosvi.c
============
LD options
============

$ld -o libalo10_1_0svp.sl -b +s alosvi.o -L../../../libs/HP-UX -L/usr/oracle/10.1.0.2/lib32 -lacmcrypt -lacmsys -lacmmem -lacmtr -lacmhh -laloaux -lmls -lclntsh_nopthread `cat /usr/oracle/10.1.0.2/lib32/ldflags` `cat /usr/oracle/10.1.0.2/lib32/sysliblist_org` -lm -lstd -lCsup -lstream -lc


Thanks in advance.

Anand.
8 REPLIES 8
Joseph Loo
Honored Contributor

Re: linker error problem

hi,

seems like u r trying to run Oracle 10g. not sure if u have follow the instructions given by Oracle.

could u reply on the ld version of /usr/lib/libpthread.sl:

# what /usr/lib/libpthread.sl


also, please note that this is a forum and not HP support site, thus do not expect immediate response, though the "forummer" here does reply faster than most of the other forums.

regards.

regards.
what you do not see does not mean you should not believe
Anand_56
Occasional Advisor

Re: linker error problem

Hi,
Here are the details you asked for.

===========
what /usr/lib/libpthread.sl
============
$ what /usr/lib/libpthread.sl
/usr/lib/libpthread.sl:
Pthread Interfaces
$Revision: libpthread.1: @(#) depot-32pa R11.11_BL2003_1209_2 PATCH_11.11 PHCO_29960 Tue Dec 9 01:51:37 PST 2003

Yes, I am trying to connect to 10g. I am following Oracle's guidelines.

When I compiled a sample executable and a sample library which connects to Oracle 10g it executed correctly.

I used the same cc flags and ld flags to compile my application library. That is failing.

Regards,
Anand.
V. Nyga
Honored Contributor

Re: linker error problem

Hi Anand,

which 'ld and linker' patch do you have installed?

'swlist -l product|grep linker'

At the moment PHSS_30966 is the most recommended patch - the later ones PHSS_30968 and PHSS_30970 are just recalled by HP because of the problem:
'PHSS_30968 introduced behavior that may cause dynamically loaded 32-bit setuid applications to fail because the SHLIB_PATH and LD_LIBRARY_PATH environment variables are ignored for setuid programs. The applications may fail to start due to missing libraries or may abort at startup due to libraries being loaded in a different order than intended.'

Volkmar

*** Say 'Thanks' with Kudos ***
Anand_56
Occasional Advisor

Re: linker error problem

============
linker patch
============

# swlist -l product|grep linker
PHSS_22535 1.0 ld(1) and linker tools cumulative patch


Previously I had PHSS_30970 and then I went back to PHSS_22535 because I was told PHSS_30970 had some problem.

Thanks.
V. Nyga
Honored Contributor

Re: linker error problem

Hi again,

you should try it with installed PHSS_30966 or at least check the description of PHSS_30966 if it could help or not.

V.
*** Say 'Thanks' with Kudos ***
Anand_56
Occasional Advisor

Re: linker error problem

Will try it out.

thanks.
Robert-Jan Goossens
Honored Contributor

Re: linker error problem

Looks like PHSS_30966 is the latest recommended version.

http://www4.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|patch.breadcrumb.patchDetail{PHSS_30970,hpux:800:11:11}|&patchid=PHSS_30966&context=hpux:800:11:11

HTH,
Robert-Jan
Joseph Loo
Honored Contributor

Re: linker error problem

hi,

from Oracle Metalink, PHSS_28871 [s700_800 11.11 ld(1) and linker tools cumulative patch] is a pre-requisite for Oracle 10g.

however, u have stated that your patch for ld and linker tools at PHSS_22535. thus, please patch it to PHSS_28871 or higher.

take note of these patches as well:

PHCO_28123
PHKL_29198
PHNE_28476 s/b PHNE_29825
PHNE_28923 s/b PHSS_30049
PHSS_28871
PHSS_28880
PHCO_26331 s/b PHCO_27958
PHCO_29109 s/b PHCO_29960
PHKL_25468 s/b PHKL_30542
PHKL_25842
PHKL_25993
PHKL_25994
PHKL_25995 s/b PHKL_30541
PHKL_26468 s/b PHKL_27316
PHKL_28489
where s/b indicates superceded by.

regards
what you do not see does not mean you should not believe