Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Using Apache DSOs under HP-UX

This section describes how to resolve a common startup problem that can be encountered when using the Gateway Apache DSOs (CSPa[n][Sys].so) under the HP-UX operating system.

The essential symptom is that Apache fails to start and reports an error message to the console indicating a missing symbol, such as sem_init (or similar).

Example:


apachectl start
Syntax error on line 1137 of /opt/hpws/apache/conf/httpd.conf:
Cannot load /opt/cspgateway/bin/CSPa2.so into server: 
Unresolved symbol: sem_init (code) from /opt/cspgateway/bin/CSPa2.so

The Semaphore functions are contained in the standard run-time library, librt.so. This is one of a series of libraries that have to be preloaded when thread-safe libraries (such as the Gateway DSOs) are used. This holds true if the hosting executable (Apache httpdin this case) doesn't explicitly link to the affected libraries at startup time.

The run-time library is usually found in the /usr/lib/ directory.

Libraries are set for preloading by including them in the LD_PRELOAD environment variable.

For example:

export LD_PRELOAD=/usr/lib/librt.sl
apachectl start

Or:

setenv LD_PRELOAD /usr/lib/librt.sl
apachectl start

Alternatively, if sudo is used to start Apache:

sudo sh -c "export LD_PRELOAD=/usr/lib/librt.sl; apachectl start" 

After pre-loading the run-time librtary, Apache should start without reporting any further error conditions.

FeedbackOpens in a new tab