Installing and compiling Apache on the HP RISC platform can be problematic, due to defects in Apache build scripts and problems linking to Apache libraries.
The following instructions are guidelines for building
with SSL. You may need to tweak these steps, based on your environment
and machine configuration.
Building Apache on HP RISC to use EAServer plug-in
libraries
Compile Apache using aCC. By default, Apache searches for both cc and aCC, but use aCC to compile all code, including the C code in Apache. Also use aCC to link the httpd binary, because aCC links libCsup, libstream, and libstd, which are necessary to load C++ libraries. The EAServer redirector plug-ins are all written in C++.
Use the GNU make tool gmake to build Apache. Apache uses GNU autconf and automake to generate makefiles.
Install Perl version 5.0 or later on your machine. You can download the Perl binary depot file from the HP Web site. You need Perl version 5.0 or later to build OpenSSL.
Download OpenSSL to your machine, and follow the instructions in the README and INSTALL files. You can download OpenSSL from the OpenSSL Web site.
Download the Apache 2.0 .tar file, and extract the contents into the /work/httpd-2.0.53 directory. You can download Apache from one of the mirror sites listed on the Apache Software Foundation Web site.
Change to the /work/httpd-2.0.53 directory, and run:
CC="aCC" CFLAGS="-Ae +Z +DA1.1 +DS2.0 +u4 -D_HPUX -DHPUX \ -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -DNATIVE" \ LDFLAGS="-v -Wl,-v,+s,+n" LD="aCC" \ ./configure --prefix=/work/apache2 \ --enable-mods-shared=all --enable-rewrite=shared \ --enable-speling=shared --disable-auth-digest \ --enable-ssl --with-ssl=/work/ssl
Note the name of the module that reports problems during configuration. You can choose to disable this module.
Verify that there are no errors reported during configuration. If you ignore configuration errors, Apache will be installed correctly. Configuration requires several minutes to complete. If it completes too quickly, it probably failed.
OpenSSL is installed in the /work/ssl directory, and includes bin, include, and lib subdirectories.
Run gmake, and capture the console output to help debug errors:
gmake 2>&1 | tee out
This command works in Korn shell and Bash. It does not
work in C shell.
Errors may occur when building apr and apr-util/xml/expat. The errors usually correspond to linking libraries, because of incorrect link commands. Apache may not be tested to run an entire build with aCC, so it is necessary to work around bugs in their makefiles.
To debug build errors associated with apr and apr-util/xml/expat, use the following example as a guide. You can decide how to fix the problem based on the error messages you receive.
To debug apr, change to /work/httpd-2.0.53/srclib/apr/build.
Using a text editor, open libtool.m4, and search for “+h” and “+b.” Verify that each command line with a “+h” or “+b” looks similar to:
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -Wl,+b,$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compil er_flags
Preceding each “+h” or “+b” and its value must be either “${wl}” or “-Wl.” In the example above:
${wl}+h ${wl}$soname
Wl,+b,$install_libdir
For apr, change to /work/httpd-2.0.53/srclib/apr
For apr-util/xml/expat, change to /work/httpd-2.0.53/srclib/apr-util/xml/expat.
Using a text editor, open libtool, and verify the syntax for the “+h” and “+b” strings, as described in step b.
archive_cmds="\$LD -b \${wl}+h \${wl}\$soname \${wl}+b \${wl}\$install_libdir -o \$lib \$libobjs \$deplibs \$linker_flags”
Check the build settings in the *.mk files.
Change to /work/httpd-2.0.53, and run gmake again.
To determine which command line is being executed, disable the LTFLAGS variable. This variable sets libtools to silent. Use grep to search for “silent” in the libtool or libtool.m4 directory, then comment out this variable.
Once all build errors are resolved, verify that the httpd binary is linked correctly:
Delete /work/httpd-2.0.53/httpd.
Change to /work/httpd-2.0.53/build.
Using a text editor, open config_vars.mk. Search for these variables, and comment them out:
CFLAGS
EXTRA_CPPFLAGS
LTFLAGS (comment out to display entire command line)
Change to /work/httpd-2.0.53, and re-run gmake.
When the build is error free, change to /work/httpd-2.0.53/.libs, and run:
chatr httpd
This should show you all the libraries that are linked to httpd. Verify that libCsup, libstream, and libcl are linked. If they are not, there is a problem.
Once you verify that there are no errors, change to /work/httpd-2.0.53, and run:
gmake install
The Apache files should be installed to /work/apache2, based on your prefix.
Edit /work/apache2/bin/envvars, and set SHLIB_PATH to the location of the JDK libraries, and set JAGUAR_CLIENT_ROOT to the EAServer installation directory (required for SSL):
SHLIB_PATH="/work/apache2/lib:/sun/jdk/jdk1.3.1_10/jre/lib/PA_RISC2.0:/sun/jdk/jdk1.3.1_10/jre/lib/PA_RISC2.0/native_threads:/sun/jdk/jdk1.3.1_10/jre/lib/PA_RISC2.0/classic:$SHLIB_PATH" export SHLIB_PATH JAGUAR_CLIENT_ROOT=/Sybase/EAServer export JAGUAR_CLIENT_ROOT
Now, you should be able to start an Apache 2.0 server with an EAServer compatible configuration.