Sponsored Content
Operating Systems AIX Embedding Runtime Search Path into Library on AIX Post 302921231 by MadeInGermany on Thursday 16th of October 2014 12:57:20 AM
Old 10-16-2014
Anyway -R or LD_RUN_PATH set a library search path at compile time that becomes hard-coded in the binary. It cannot evaluate a MYPATH at runtime.
I think you need to create a start wrapper at installation time that sets LD_LIBRARY_PATH - typically a shell wrapper that prepends the custom location to LD_LIBRARY_PATH. At the end the wrapper calls the binary, passing the command line arguments.
Code:
#!/bin/sh
installdir=/usr/local # to be patched
LD_LIBRARY_PATH=$installdir/lib
export LD_LIBRARY_PATH
exec $installdir/bin/binary "$@"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

library path

How do you get an application to use an alternate library? Dave:confused: (2 Replies)
Discussion started by: nucca
2 Replies

2. Linux

Plz Help me to find GNU C++ Runtime Library

Hi, I am working with red hat Linux and i want to install one program but I am getting the error This product requires the GNU C++ Runtime Library (libstdc++-libc6.2-2.so.3) or later. Your system must be upgraded before installation can proceed. So please tell me how can i remove this... (2 Replies)
Discussion started by: smartgupta
2 Replies

3. Solaris

How to get the path during runtime?

Hi guys, I have commands like /solaris/opt/VRTS/bin/vxdisk /opt/VRTS/bin/vxdisk From these two commands, i need to get the directory path value before /VRTS/bin/vxdisk at runtime. e.g /solaris/opt/VRTS/bin/vxdisk as /solaris/opt /opt/VRTS/bin/vxdisk as /opt I have tried with cut... (1 Reply)
Discussion started by: Nandagopal
1 Replies

4. Solaris

Re:How to get the path during runtime?

Thank u vgesh99 It works well.. (1 Reply)
Discussion started by: Nandagopal
1 Replies

5. AIX

runtime libs accessed by application in AIX

Hi , I need some inputs on runtime or shared libs for an application(s) in AIX . i have a requirement saying i need to rehost all the production applications into new AIX OS . Here Source and target oS is AIX but with different versions so for this i need to identify what are the... (1 Reply)
Discussion started by: naren_chella
1 Replies

6. Programming

Shared library versioning problem at runtime

My executable was linked under RedHat using the LessTif GUI shared library. When I try to run it under UBUNTU, I get an error message that the LessTif library cannot be found. The LessTif library is there, but it is a newer VERSION. My executable is looking for the older version it was linked with.... (1 Reply)
Discussion started by: imagtek
1 Replies

7. AIX

How to Check the what runtime package is applied on AIX OS

Hi Experts, How to Check the what runtime package is applied on AIX OS? I would like to verify if “xlcpp.rte.10.1.0.aix.base” package is applied or not ? thanks in advance. -Mallela (1 Reply)
Discussion started by: meetmallela
1 Replies

8. Programming

C++ library path

Hello, How to set up the path for downloaded C/C++ libraries (or, header files) so that they can be included like system headers (stdio.h or iostream)? The libraries/headers are from a package containing different folders each has different sets of headers and put in... (1 Reply)
Discussion started by: yifangt
1 Replies

9. UNIX for Advanced & Expert Users

AIX runtime programming issue

I hope my title is accurate enough. I have a product that we port to various UNIX platforms. It is known to run on AIX but using the IBM compiler from years ago. Recently we got a different used AIX P5 platform running AIX 5.3 and we setup the GCC compiler (4.4.5 I think). C and C++ source code.... (5 Replies)
Discussion started by: Pug
5 Replies

10. AIX

AIX full path to socket library

Can somebody help me too identify full path to socket library on AIX? Cannot find anything Thanks for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies
CGI::Application::Plugin::ActionDispatch(3pm)		User Contributed Perl Documentation	     CGI::Application::Plugin::ActionDispatch(3pm)

NAME
CGI::Application::Plugin::ActionDispatch - Perl extension SYNOPSIS
# In "WebApp.pm"... package WebApp; use base 'CGI::Application'; use CGI::Application::Plugin::ActionDispatch; sub do_stuff : Path('do/stuff') { ... } sub do_more_stuff : Regex('^/do/more/stuff/?$') { ... } sub do_something_else : Regex('do/something/else/(w+)/(d+)$') { ... } DESCRIPTION
CGI::Application::Plugin::ActionDispatch adds attribute based support for parsing the PATH_INFO of the incoming request. For those who are familiar with Catalyst. The interface works very similar. This plugin is plug and play and shouldn't interrupt the default behavior of CGI::Application. CAVEATS
Be aware though, this plugin will not likely work with other modules that use attributes. This module should work with mod_perl. It however has not be thoroughly tested as such. If you have used it with mod_perl please e-mail me with your experience. METHODS
action_args() If using capturing parentheses in a Regex action. The captured values are accessible using this method. sub addElement : Regex('add/(d+)/(d+)') { my $self = shift; my($column, $row) = $self->action_args(); ... } The Path action will store everything after the matched path into the action args. # http://example.com/state/pa/philadelphia sub find_state_and_city : Path('state/') { my $self = shift; my($state, $city) = $self->action_args(); # $state == pa, $city == philadelphia ... } ACTIONS
Regex Regex action is used for regular expression matching against PATH_INFO. If capturing parentheses are used; the matched parameters are accesssible using the action_args() method. Regex('^blah/foo'); The Regex action either matches or it doesn't. There are no secrets to it. It is important to note Regex action takes priority. It is assumed if a Path and Regex action both match. The Regex action will take priority, which may not always be the outcome of least suprise, for instance: # http://example.com/music/the_clash sub clash : Path('/music/the_clash') {} # This is an exact match, BUT. sub the_class : Regex('/music/the_clash') {} # This takes priority. Beware. Path The Path action is basically a shortcut for a commonly used Regex action. # http://example.com/products/movies/2 sub show_product : Path('products/') { my $self = shift; my($category, $id) = $self->action_args(); .... } Is basically the same thing as. sub show_product : Regex('^/products/(w+)/(d+)') { my $self = shift; my($category, $id) = $self->action_args(); ... } For those that care, the Path('products/') will be converted to the regular expression "^/products/?(/.*)$"; then split('/') is run on the captured value and stored in action_args(). Runmode This action will take the method name and run a match on that. # http://example.com/foobar sub foobar : Runmode {} Default The default run mode if no match is found. Essentially the equivalent of the start_mode() method. sub default_mode : Default {} EXAMPLE
In CGI::Application module: package WebApp; use base 'CGI::Application'; use CGI::Application::Plugin::ActionDispatch; use strict; sub setup { my $self = shift; self->mode_param('test_rm'); $self->run_modes( basic_runmode => 'basic_runmode' ); } # Regular runmodes should work. sub basic_runmode { my $self = shift } The product() runmode will match anything starting with "/products" in the PATH_INFO. # http://example.com/myapp.cgi/products/this/is/optional/and/stored/in/action_args/ sub product : Path('products/') { my $self = shift; my($category, $product) = $self->action_args(); } The music() runmode will match anything starting with "/products/music" in the PATH_INFO. The product() runmode also matches "/products/music". However since this runmode matches closer it takes priority over product(). # http://example.com/myapp.cgi/products/music/product/ sub music : Path('products/music/') { my $self = shift; my $product = $self->action_args(); ... } This beatles() runmode will match ONLY "/product/music/beatles" or "/product/music/beatles/". Regex takes priority over Path so the previous runmodes which match this PATH_INFO are not run. # http://example.com/myapp.cgi/products/music/beatles/ sub beatles : Regex('^/products/music/beatles/?') { my $self = shift; ... } SEE ALSO
CGI::Application, CGI::Application::Dispatch http://github.com/jaywhy/cgi-application-plugin-actiondispatch AUTHOR
Jason Yates, <jaywhy@gmail.com> COPYRIGHT AND LICENSE
Copyright (C) 2006-2008 by Jason Yates This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available. perl v5.12.4 2011-10-26 CGI::Application::Plugin::ActionDispatch(3pm)
All times are GMT -4. The time now is 05:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy