1832541 Members
6195 Online
110043 Solutions
New Discussion

Runtime woes

 
Jeff Fulmer_1
Occasional Advisor

Runtime woes

I compiled apache on one HP-UX server. I've been able to move and successfully run the binary on three different 3440s here in our data center. But when I move the binary to our hosting company I get the following error on the 3440 there:

$ sudo bin/apachectl start
/usr/lib/dld.sl: Unresolved symbol: getaddrinfo (code) from /usr/local/httpd/lib/libapr-1.sl.2
/usr/lib/dld.sl: Unresolved symbol: getnameinfo (code) from /usr/local/httpd/lib/libapr-1.sl.2
/usr/lib/dld.sl: Unresolved symbol: freeaddrinfo (code) from /usr/local/httpd/lib/libapr-1.sl.2
/usr/lib/dld.sl: Unresolved symbol: gai_strerror (code) from /usr/local/httpd/lib/libapr-1.sl.2
bin/apachectl[80]: 25766 Abort(coredump)

Can anyone offer some insight?
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: Runtime woes

It could be something as simple as you need to set SHLIB_PATH or you could be missing a shared library. Have you made sure that you installed all the run-time dependencies? As a first step, execute ldd /bin/apachectl and make sure that you have all the shared libraries.
If it ain't broke, I can fix that.
Jeff Fulmer_1
Occasional Advisor

Re: Runtime woes

Clay: here's the ldd output (apachectl is a sh wrapper)

/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/httpd/lib/libapr-1.sl.2 => /usr/local/httpd/lib/libapr-1.sl.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/httpd/lib/libexpat.sl.1 => /usr/local/httpd/lib/libexpat.sl.1
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/httpd/lib/libaprutil-1.sl.2 => /usr/local/httpd/lib/libaprutil-1.sl.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/httpd/lib/libapr-1.sl.2 => /usr/local/httpd/lib/libapr-1.sl.2
/usr/local/httpd/lib/libexpat.sl.1 => /usr/local/httpd/lib/libexpat.sl.1
A. Clay Stephenson
Acclaimed Contributor

Re: Runtime woes

You now use the ldd output to make sure that all the listed libraries are present, have appropriate permissions, and match your platform (i.e are PA-RISC rather than IA libraries).
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: Runtime woes

If you get unsats for getaddrinfo, you need to install a newer libc patch. gai_strerror also seems to be there. (These weren't there in the initial 11.11 release.)

A search of the forum for getaddrinfo should have told you this.
A. Clay Stephenson
Acclaimed Contributor

Re: Runtime woes

Okay, Dennis has spilled the beans. I was intentionally taking you through the general case so that you could find out how to solve this sort of thing in the future.

A rather good way to find missing symbols is to nm a list of libraries into a text file that you can then search. This works across all flavors of UNIX where not all utilities are available.

For example,
cd /usr/lib/
nm lib* > /home/cstephen/nmlist

You can then search nmlist (using vi if you like) to help you hunt down symbols and the libraries that contain them.
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: Runtime woes

>Clay: nm lib* > /home/cstephen/nmlist

>You can then search nmlist (using vi if you like) to help you hunt down symbols and the libraries that contain them.

If you are going to search, you should use "nm -pxAN", that will include the the filename and symbol in the same line.