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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 ( 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 |
| ||||
| > 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. |