Operating System - HP-UX
1836547 Members
2732 Online
110102 Solutions
New Discussion

Re: SHLIB_PATH - what do I get?

 
SOLVED
Go to solution
Jörgen Edström
New Member

SHLIB_PATH - what do I get?

I thought I knew how SHLIB_PATH works, apparently I was wrong. My problem is this:

On a new itanium box running 11.23 I'm installing ImageMagick. All packages are taken from the porting archives. When I try a simple conversion (jpg to gif) I get this:

/usr/lib/hpux32/dld.so: Unsatisfied code symbol '__udivsi3' in load module '/usr/local/lib/hpux32/libMagick.so'.

Searching the forums tells me that these symbols are part of libgcc (libgcc.a). With hp-gcc installed and the porting archives libgcc package, I have libgcc.a in the following places:

/usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/hpux64/libgcc.a
/usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/libgcc.a
/usr/local/lib/hpux32/libgcc.a
/opt/hp-gcc-4.1.1/lib/gcc/ia64-hp-hpux11.23/4.1.1/hpux64/libgcc.a
/opt/hp-gcc-4.1.1/lib/gcc/ia64-hp-hpux11.23/4.1.1/libgcc.a

The 64-bit ones are obviously off, but how do I write my SHLIB_PATH to get this working? I just can get this to work, is the only way forward to compile from source? Who's being stupid, me or the box?
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: SHLIB_PATH - what do I get?

Shalom,

You probably do know how SHLIB_PATH.

Most likely you have bad code from the porting and archive center.

SHLIB_PATH works just like PATH

Omit pathes you don't need from it and it reads from beginning to end right to left until it finds what its looking for.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alpha977
Valued Contributor

Re: SHLIB_PATH - what do I get?

Hello Jörgen!

This is my SHLIB for Oracle into .profile of user:

export SHLIB_PATH=$PATH:ORACLE_HOME/lib

regards
Jörgen Edström
New Member

Re: SHLIB_PATH - what do I get?

Let me rephrase a little:

a) Is it possible for a shared library to ignore the SHLIB_PATH?
b) If yes can this behaviour be changed without compiling from source?

To those who replied so far:
- Please define bad code, i.e. is it useless or usable with some tweaks?
- I'm no guru but having your PATH in your SHLIB_PATH cannot help much. I'm close to calling it stupid but I wont...
Alpha977
Valued Contributor

Re: SHLIB_PATH - what do I get?

a) Is it possible for a shared library to ignore the SHLIB_PATH?

i'm not a programmer, but depend from wich user launch the application.

SHLIB_PATH is defined into the .profile.

I think you can try to:
- put absolute path of library into the application code

- put an '#' on the SHLIB_PATH

- create another user without SHLIB_PATH or a different SHLIB_PATH.

Regards
Jörgen Edström
New Member

Re: SHLIB_PATH - what do I get?

Sorry but I cannot listen to advice about SHLIB_PATH from someone with:

export SHLIB_PATH=$PATH:ORACLE_HOME/lib

in oracle's profile. It isn't exactly a sign of expertise in this particular field of hpux system administration, sorry.
Alpha977
Valued Contributor

Re: SHLIB_PATH - what do I get?

Probably,

but this isn't Oracle's profile, it is of another user...

and... is configured by HP technichains, not from me.

Regards
Steve Lewis
Honored Contributor

Re: SHLIB_PATH - what do I get?

This might help,

man chatr

I think that +s is the likely parameter to use because it enables/disables SHLIB_PATH look-up in the file, without re-compilation.
Check that SHLIB_PATH is listed, at least.

Anyway start off with running
chatr [executable]
and see what the order is, then go from there.

Another option is to try and add those directories onto the end of your SHLIB_PATH, but make sure that you have the right versions of gcc.



Dennis Handly
Acclaimed Contributor
Solution

Re: SHLIB_PATH - what do I get?

>/usr/lib/hpux32/dld.so: Unsatisfied code symbol '__udivsi3' in load module 'libMagick.so'.

If you get this unsat, you are out of luck and must relink. (But see below.) You most likely can't solve it with SHLIB_PATH. (You should really use LD_LIBRARY_PATH on IPF.)

>but how do I write my SHLIB_PATH to get this working?

You can't. You need to use LPATH at link time.

>I'm installing ImageMagick. All packages are taken from the porting archives.

libMagick.so was linked incorrectly. You may be able to "fix" it by linking your application with -u__udivsi3.

>- Please define bad code, i.e. is it useless or usable with some tweaks?

Not sure. You may be able to use the -u kludge.

>- I'm no guru but having your PATH in your SHLIB_PATH cannot help much. I'm close to calling it stupid but I wont...

It depends, but most likely it is "stupid" since libs should not be in bin directories.
Jörgen Edström
New Member

Re: SHLIB_PATH - what do I get?

Given the information so far I have decided to build imagemagick from source code. I'll try chatr later when I'm not on a deadline - thanks.
Jörgen Edström
New Member

Re: SHLIB_PATH - what do I get?

The lesson learned from this experience is not to assume that packages downloaded from the porting archives will work. If you need to rely on a specific function you should probably do it yourself.
Dennis Handly
Acclaimed Contributor

Re: SHLIB_PATH - what do I get?

>The lesson learned from this experience is not to assume that packages downloaded from the porting archives will work.

The only trouble with this, did you report they didn't work and offer a solution? That way the next user can benefit.