Operating System - HP-UX
1829142 Members
4302 Online
109986 Solutions
New Discussion

Error installing Apache 2.2.11 on HP-UX 11.11

 
Mark P Fleming
Occasional Advisor

Error installing Apache 2.2.11 on HP-UX 11.11

Error executing make operation during Apache 2.2.11 install. Error as shown below;

Making all in support
/opt/apache/httpd-2.2.11/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHPUX11 -D_REENTRANT -D_HPUX_SOURCE -D_LARGEFILE64_SOURCE -I/opt/apache/httpd-2.2.11/srclib/pcre -I. -I/opt/apache/httpd-2.2.11/os/unix -I/opt/apache/httpd-2.2.11/server/mpm/prefork -I/opt/apache/httpd-2.2.11/modules/http -I/opt/apache/httpd-2.2.11/modules/filters -I/opt/apache/httpd-2.2.11/modules/proxy -I/opt/apache/httpd-2.2.11/include -I/opt/apache/httpd-2.2.11/modules/generators -I/opt/apache/httpd-2.2.11/modules/mappers -I/opt/apache/httpd-2.2.11/modules/database -I/opt/apache/httpd-2.2.11/srclib/apr/include -I/opt/apache/httpd-2.2.11/srclib/apr-util/include -I/opt/apache/httpd-2.2.11/srclib/apr-util/xml/expat/lib -I/opt/apache/httpd-2.2.11/modules/proxy/../generators -I/opt/apache/httpd-2.2.11/modules/ssl -I/opt/apache/httpd-2.2.11/modules/dav/main -prefer-non-pic -static -c htpasswd.c && touch htpasswd.lo
/opt/apache/httpd-2.2.11/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread -o htpasswd htpasswd.lo -lm /opt/apache/httpd-2.2.11/srclib/pcre/libpcre.la /opt/apache/httpd-2.2.11/srclib/apr-util/libaprutil-1.la /opt/apache/httpd-2.2.11/srclib/apr-util/xml/expat/lib/libexpat.la /opt/apache/httpd-2.2.11/srclib/apr/libapr-1.la -lrt -lm -lpthread -ldld
libtool: link: warning: this platform does not like uninstalled shared libraries
libtool: link: `htpasswd' will be relinked during installation
/usr/ccs/bin/ld: Unsatisfied symbols:
apr_generate_random_bytes (first referenced in .libs/htpasswd.o) (code)
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
fedra:/opt/apache/httpd-2.2.11 >

Similar error found in a Post; link shown below

http://forums11.itrc.hp.com/service/forums/bizsupport/questionanswer.do?admit=109447626+1245179939785+28353475&threadId=1297740

Tried executing solution in attachment at end of post. However, still got following make error;

Making all in srclib
Making all in apr
Making all in apr-util
Making all in xml/expat
/bin/sh ./libtool --silent --mode=link gcc -I/opt/apache/httpd-2.2.11/srclib/apr-util/xml/expat/lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o examples/elements libexpat.la
libtool: link: warning: this platform does not like uninstalled shared libraries
libtool: link: `examples/elements' will be relinked during installation
/usr/ccs/bin/ld: Unsatisfied symbols:
main (Not referenced yet! Probably due to -u option)
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
fedra:/opt/apache/httpd-2.2.11 >




15 REPLIES 15
Shinji Teragaito_1
Respected Contributor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Hi Mark,

I showed the procedure using latest expat-2.0.1 instead of the
bundled expat in the past thread. Do you have the same need to
use the latest expat ?

What kind of options do you specify to the configure script
using gcc, not HP ANSI C compiler ?

Thank you,

Shinji
Mark P Fleming
Occasional Advisor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

No, I don't have any particular need to use the 2.0.1 version of expat. I am just trying to get past the initial make error; where it can't seem to find apr_generate_random_bytes.

When I execute the configure script I am only using the --prefix option. From the output of configure, it does seem to find gcc. I am attaching the results of the configure script.
Shinji Teragaito_1
Respected Contributor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

You have to specify LDFLAGS to the configure script to avoid apr
unsat error as you encounted:

LDFLAGS="-Wl,-E \
-Wl,+b,/opt/apache/lib \
-L`pwd`/srclib/apr/.libs \
-L`pwd`/srclib/apr-util/xml/expat/.libs \
-L`pwd`/srclib/apr-util/.libs"

Good luck !!
Mark P Fleming
Occasional Advisor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Thanks for the quick reply. Do I put the LDFLAGS into the configure script or specify it on the command line?
Shinji Teragaito_1
Respected Contributor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

I always give LDFLAGS to configure script directly as I mentioned
in the past.
Mark P Fleming
Occasional Advisor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

I added the LDFLAGS to the configure script, ran it, and then did the make. Unfortunately I got the same error. I am attaching the output from the configure and will attach the make output to my next post.
Mark P Fleming
Occasional Advisor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Output from make showing same error with unstatisfied symbols; apr_generate_random_bytes
Steven Schweda
Honored Contributor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

I know nothing, but a Google search for
apache apr_generate_random_bytes
found:

http://www.nabble.com/Problem-compiling-apache-httpd-2.2.9-on-HP-UX-td19637631.html

which offers some suggestions.
Shinji Teragaito_1
Respected Contributor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Mark> Output from make showing same error with unstatisfied symbols;

Because you didn't specify the correct directory paths to LDFLAGS
in order to avoid link-time unsat error.

Looking at your output from the configure script, I can see as follows:

> restoring LDFLAGS to "-Wl,-E -Wl,+b,/opt/apache/lib
> -L/opt/apache/srclib/apr/.libs
> -L/opt/apache/srclib/apr-util/xml/expat/.libs
> -L/opt/apache/srclib/apr-util/.libs"

As I mentioned, you have to specify as follows:

LDFLAGS="-Wl,-E \
-Wl,+b,/opt/apache/lib \
-L`pwd`/srclib/apr/.libs \
-L`pwd`/srclib/apr-util/xml/expat/.libs \
-L`pwd`/srclib/apr-util/.libs"

NOTE: Suppose that Apache 2.2.11 is installed in /opt/apache and
its libraries are installed in /opt/apache/lib.

You should not replace -L`pwd` with -L/opt/apache.
Shinji Teragaito_1
Respected Contributor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

I didn't see any errors while building httpd-2.2.11 using either
gcc (3.4.2) or HP ANSI C compiler (latest):

env CC=gcc CFLAGS="-O2" LDFLAGS="-Wl,-E \
-Wl,+b,/usr/local/apache2/lib:/usr/local/lib \
-L/usr/local/lib -L`pwd`/srclib/apr/.libs \
-L`pwd`/srclib/apr-util/xml/expat/lib/.libs \
-L`pwd`/srclib/apr-util/.libs" ./configure \
--enable-so --with-mpm=worker --enable-mods-shared=all \
--prefix=/usr/local/apache2

env CC=cc CFLAGS="+O2" LDFLAGS="-Wl,-E \
-Wl,+b,/usr/local/apache2/lib:/usr/local/lib \
-L/usr/local/lib -L`pwd`/srclib/apr/.libs \
-L`pwd`/srclib/apr-util/xml/expat/lib/.libs \
-L`pwd`/srclib/apr-util/.libs" ./configure \
--enable-so --with-mpm=worker --enable-mods-shared=all \
--prefix=/usr/local/apache

NOTE:
* mod_deflate links /usr/local/lib/libz.sl
* -L{dir} avoids link-time error
* -Wl,+b,{dir1:dir2} avoids run-time error. directories are configured as embeded path
Mark P Fleming
Occasional Advisor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Output from configure must resolve it. In the configure script, it is specified as you specified.

Here's the exact line form the configure script;

LDFLAGS="-Wl,-E -Wl,+b,/opt/apache/lib -L`pwd`/srclib/apr/.libs -L`
pwd`/srclib/apr-util/xml/expat/.libs -L`pwd`/srclib/apr-util/.libs"
Scott R Bell
New Member

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Hi there, I am running into this problem as well. Below is my configure command and output.

Before I go and try to find out where apr_generate_random_bytes is and how to crowbar it into the configure, has anyone figured out why this happens?

./configure --prefix=/install-dir/httpd LDFLAGS="-Wl,-E \
-Wl,+b,/opt/apache/lib\
-L`pwd`/srclib/apr/.libs \
-L`pwd`/srclib/apr-util/xml/expat/.libs \
-L`pwd`/srclib/apr-util/.libs"

Here is the output:
/install-dir/srclib/apr/libtool --silent --mode=link cc -g -Ae +Z +DAportable -mt -Wl,-E -Wl,+b,/opt/apache/lib -L/install-dir/srclib/apr/.libs -L/install-dir/srclib/apr-util/xml/expat/.libs -L/install-dir/srclib/apr-util/.libs -o htpasswd htpasswd.lo -lm /install-dir/srclib/pcre/libpcre.la /install-dir/srclib/apr-util/libaprutil-1.la /install-dir/srclib/apr-util/xml/expat/lib/libexpat.la /install-dir/srclib/apr/libapr-1.la -lrt -lm -lpthread -ldld
libtool: link: warning: this platform does not like uninstalled shared libraries
libtool: link: `htpasswd' will be relinked during installation
/usr/ccs/bin/ld: Unsatisfied symbols:
apr_generate_random_bytes (first referenced in .libs/htpasswd.o) (code)
Scott R Bell
New Member

Re: Error installing Apache 2.2.11 on HP-UX 11.11

FYI: It looks like it is building the libraries, and I see this function in the sources, but none of the built libraries seem to contain this symbol. (fgrep apr_generate_random_bytes .libs/* returns nothing) However:
find . -exec fgrep -sq apr_generate_random_bytes {} ; -print
./CHANGES
./include/apr_general.h
./misc/netware/rand.c
./misc/unix/rand.c
./misc/win32/rand.c
./test/testrand.c
./exports.c

You will note that no object files seem to contain it.

Where is this object supposed to be?

Cheers,
Scott
Mark P Fleming
Occasional Advisor

Re: Error installing Apache 2.2.11 on HP-UX 11.11

I was finally to get it to config, make and install by doing the following three things.

1) Installed openssl v0.9.8k (that installation was straightforward, just followed standard installation procedures)

2) Used the following options for config command for apache install (replace specific file paths)

--disable-so --with-mpm=worker --enable-mods-shared=none --with-included-apr --with-devrandom --with-egd --enable-deflate=no --with-ssl=/opt/ssl --enable-mods-ssl=yes --enable-ssl --enable-setenvif --prefix=/opt/apache

3) After you do the config, but before you run the make for apache, execute the following touch command (replace exact path with your location);

touch /opt/apache/httpd-2.2.11/modules/ssl/ssl_expr_scan.c

I was lucky to find that last tip on another posting, but it fixed my last make error
Scott R Bell
New Member

Re: Error installing Apache 2.2.11 on HP-UX 11.11

Thank you, Mark!

The only problem I have is that I am not root on this server and I cannot install openssl. I do not need to use SSL for my tests with Apache, do you know of any way I can install Apache 'without' requiring apr (and thus SSL)?

Thanks!
Scott