Unix Technical Forum

Question about chatr

This is a discussion on Question about chatr within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> I have a user with the following problem: I need help with the following. I currently use the following ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 05:19 PM
Jerry Heyman
 
Posts: n/a
Default Question about chatr

I have a user with the following problem:

I need help with the following. I currently use the following command to
change the internal attributes of my executables on HPUX 11i so that they
will pick up shared library linkages they need.

chatr +s enable myexecutable
export SHLIB_PATH='/xyz/lib'

What I would like to use is a linkage opt to set this automatically, so it
is set when the build is done. I am pretty sure there is one since I saw
it once somewhere, but unfortunately forgot where. I am using gcc to
compile along with the native linker (to my knowledge).

Any thoughts? I've looked at the link command options (ld), but to
no avail...

jerry
--
Jerry Heyman 919.224.1442 | IBM SWG/Tivoli Software|"Software is the
Build Infrastructure Architect | 3901 S Miami Blvd | difference between
jheyman@us.ibm.com | Durham, NC 27703 | hardware and reality"
http://www.cs.stedwards.edu/~heyman

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 05:19 PM
Mike Stroyan
 
Posts: n/a
Default Re: Question about chatr

Jerry Heyman <jheyman@us.ibm.com> wrote:
|I have a user with the following problem:

|I need help with the following. I currently use the following command to
|change the internal attributes of my executables on HPUX 11i so that they
|will pick up shared library linkages they need.

| chatr +s enable myexecutable
| export SHLIB_PATH='/xyz/lib'

|What I would like to use is a linkage opt to set this automatically, so it
|is set when the build is done. I am pretty sure there is one since I saw
|it once somewhere, but unfortunately forgot where. I am using gcc to
|compile along with the native linker (to my knowledge).

|Any thoughts? I've looked at the link command options (ld), but to
|no avail...

From "man ld"

+b path_list Specify a colon-separated list of directories
(embedded path) to be searched at program run-time
to locate shared libraries needed by the
executable output file that were specified with
either the -l or -l: option. An argument
consisting of a single colon ( indicates that ld
should build the list using all the directories
specified by the -L option and the LPATH
environment variable (see the +s option).

--
Mike Stroyan, mike.stroyan@hp.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 05:19 PM
jignaasu
 
Posts: n/a
Default Re: Question about chatr

> I need help with the following. I currently use the following command to
> change the internal attributes of my executables on HPUX 11i so that they
> will pick up shared library linkages they need.
>
> chatr +s enable myexecutable
> export SHLIB_PATH='/xyz/lib'
>
> What I would like to use is a linkage opt to set this automatically, so it
> is set when the build is done. I am pretty sure there is one since I saw
> it once somewhere, but unfortunately forgot where. I am using gcc to
> compile along with the native linker (to my knowledge).


you can also use the +s linker option to enable SHLIB_PATH lookup.
that lets the users have whatever path they want, unlike in the +b
case where they're restricted to the embedded path. note that +b
doesnt enable SHLIB_PATH lookup. if you are building a 64-bit binary,
SHLIB_PATH and embedded path lookup should be on by default unless
there is a +noenvvar option somewhere on the link line or in the
enviroment variable LDOPTS in the build environment.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:53 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com