This section describes how to resolve a common start-up 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
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 httpd
in this case) doesn't explicitly link to the affected libraries at start-up time.
The run-time library is usually found in the /usr/lib/
Libraries are set for preloading by including them in the LD_PRELOAD
setenv LD_PRELOAD /usr/lib/librt.sl
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.