Operating System - HP-UX
1833861 Members
2001 Online
110063 Solutions
New Discussion

libraries and where to start looking

 
SOLVED
Go to solution

libraries and where to start looking

It has been a long time since I last compiled a C program so my knowledge of Make etc is very rusty. Can anybody help with identifying the root of this problem.

Background

I am building a new HP-UX 11.00 server which is due to replace an old D class as our development server. A couple of years back somebody 'hardened' the D class and installed OpenSSL and Sendmail 8.12.6 etc. They left behind a limited amount of documentation but there are shortfalls in it.

Problem

I have compiled and installed OpenSSL OpenSSH and most of the other software called for in the documents. However when I compile and install Sendmail it complains that it cant find libcrypto.0.9.6 when I try to start it

It seems that it is looking for it in the current directory and not using SHLIB_PATH

The error messages are as follows

(ilife121 ilmd-root) / $ /sbin/init.d/sendmail start
/usr/lib/dld.sl: Can't open shared library: ./libcrypto.sl.0.9.6
/usr/lib/dld.sl: No such file or directory
/sbin/init.d/sendmail[76]: 10698 Abort
/usr/lib/dld.sl: Can't open shared library: ./libcrypto.sl.0.9.6
/usr/lib/dld.sl: No such file or directory
/sbin/init.d/sendmail[91]: 10702 Abort


Question

What am I doing wrong. Is the problem in Sendmail or dld.sl. What is dld.sl. How do I tell it to look for the libcrypto library in /opt/ssl/lib
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor

Re: libraries and where to start looking

Hi,

dld.sl is the dynamic loader. It loads the shared libraries required by the executable. Here it is not able to find libcrypto.sl.0.9.6 in it's known location. You can either export SHLIB_PATH or add /opt/ssl/lib in /etc/SHLIB_PATH file so that this is available to all the users. Make sure you have the library called libcrypto.sl.0.9.6 under /opt/ssl/lib. You will need to logoff and login if you made changes to /etc/SHLIB_PATH. Or you can simply do "export SHLIB_PATH=$SHLIB_PATH:/opt/ssl/lib" for the current shell and try starting sendmail.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor

Re: libraries and where to start looking

Did you try exporting SHLIB_PATH? I think ou tried this.

One workaround is creating the soft link in sendmail directory pointing it to actual libcrypto.0.9.6.

Anil
There is no substitute to HARDWORK

Re: libraries and where to start looking

I tried both the ENV Var and entry in /etc/SHLIB_PATH with no joy.

The only time I can get Sendmail to start is if I am sitting in a directory which has a copy of libcrypto in it. But I still get a problem when I try to send a mail as it looks for the library in the ./ as soon as I hit CTRL-D

I have included the /opt/ssl/lib in the confLIBDIRS config file for sendmail compile and used the Build -f option but it always seems to look for it in the . (current dir)


(ilife121 ilmd-root) / $ /sbin/init.d/sendmail start
/usr/lib/dld.sl: Can't open shared library: ./libcrypto.sl.0.9.6
/usr/lib/dld.sl: No such file or directory
/sbin/init.d/sendmail[76]: 10867 Abort
/usr/lib/dld.sl: Can't open shared library: ./libcrypto.sl.0.9.6
/usr/lib/dld.sl: No such file or directory
/sbin/init.d/sendmail[91]: 10871 Abort

(ilife121 ilmd-root) / $ tail /etc/SHLIB_PATH
/usr/lib:/opt/gnome/lib:/etc/opt/resmon/lib:/opt/ssl/lib

(ilife121 ilmd-root) / $ echo $SHLIB_PATH
/opt/ssl/lib
Sridhar Bhaskarla
Honored Contributor

Re: libraries and where to start looking

I believe it's because the path is hardcoded while compiling the sendmail. Try copying (or link) libcryptol.sl.0.9.6 into /usr/lib and see if it is relative to the current directory or for dld.sl itself.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor
Solution

Re: libraries and where to start looking

Post the following chatr `which sendmail`

This will list how it looks for shared library. Check what are the preferances set here. Where it looks first and where it looks second. Then if you want you can modify these preferances as you want. so that sendmail looks for SHLIB_PATH or embedded path. man chatr. chatr +b and chatr +s

Anil
There is no substitute to HARDWORK

Re: libraries and where to start looking

chatr showed both embedded path and SHLIB_PATH as disabled

I did a chatr +s enable /usr/sbin/sendmail and it is looking much better.

I promise I will stick to my Oracle DBA and Unix Admin role from now on and leave the C programming to the experts ;-)

Thanks a million.