Computing.Net > Forums > Solaris > finding libraries during startup

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

finding libraries during startup

Reply to Message Icon

Name: Krishna Prasad
Date: July 16, 2002 at 08:09:54 Pacific
Comment:

Hi ,

I have the following problem when i tried to make my application during system startup.
According to the requirement i have to start the application at the startup as a boot up application. In this case i created a link in the etc\init.d which runs a script which inturn runs my application.

The problem is when the application launches it finds a library file (.so file). In normal case we place this file in a directory and set the LD_LIBRARY_PATH to point to this library. But when we use it as a startup application then the application is not able to find this library as i feel it could not load the .profile of root during system startup. So my application does not start as it could not find this library. Is there anyway to find a library file other than using the load library path setting at system startup.




Sponsored Link
Ads by Google

Response Number 1
Name: umang
Date: July 17, 2002 at 04:48:38 Pacific
Reply:

do not understand..can u not supply an absolute path to the library..??


0

Response Number 2
Name: labtech
Date: July 17, 2002 at 12:00:41 Pacific
Reply:

yeah - change the default path that the ld program uses to search for files ... that is, change the default library load path on a system wide level.
You will definatley want to do a man on crle
before doing any of this.....
type crle at a prompt to see your current defaults. Write down the "Default Library Path" paths. Issue something like:
crle –l /usr/lib –l /usr/local/lib -l /path-to-the-library

making sure that you have all the paths from the "Default Library Path" added into the command using -l followed by the path to the directory where the needed library lives
(find this for sure by running ldd on your application to make sure which library it is trying to use and from where)

The above has worked for me in the past for a program that needed a particular .so at bootup. In particular it has worked for loading some ssl libs before the root profile was in effect.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


e10k system board flash p... Solaris 8 on AMD Athlon X...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: finding libraries during startup

GCC and ld library problem www.computing.net/answers/solaris/gcc-and-ld-library-problem/3553.html

How to check the OS bit ? www.computing.net/answers/solaris/how-to-check-the-os-bit-/3106.html

XP Home Edition and Solaris 8 - Dual Boo www.computing.net/answers/solaris/xp-home-edition-and-solaris-8-dual-boo/1015.html