DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19349>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19349

./configure file has hardcoded locations for zlib and others

           Summary: ./configure file has hardcoded locations for zlib and
                    others
           Product: Apache httpd-2.0
           Version: 2.0.45
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Build
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I am trying to compile Apache 2.0.x on RedHat 7.2, with source locations 
of /usr/local/zlib, /usr/local/ssl, ... rather than using the RedHat 
distributed files.

Problem:

./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-
deflate --enable-ssl --with-z=/usr/local/zlib --with-ssl=/usr/local/ssl

<code output>
checking for zlib location... /usr
</code output>

What is happening:

If your system contains zlib.h in usr/include, ./configure will use /usr
(include) as the source dir of zlib, over specified --with-z=dir.

Solution:

rename /usr/include/zlib.h;
than (after more problems)
rename /usr/include/zutil.h;

---------------------------------
Apache compiled on a virgin system is not a problem.

But if you have RedHat, or a distro with distributed files: libcrypto.so 
in /lib, zlib.h in /usr/include,... and try to compile apache with zlib(or 
openssl, or some other modules); you will find out that code in ./configure has 
locations with hardcoded search locations that are searched BEFORE --with-
ssl=dir or --with-z=dir... Wrong lib files are used, or worse of, the build 
process errors out.

In zlib, the proper --with-z=dir, will be used first; but then, for some 
reason, another code block(in ./configure) will use a hardcoded location and 
change the zlib field.

Now before someone goes and tells me that "/usr" means /usr/local/zlib, I have 
been on this for months, following the code and trying different run arounds. 
Search the code for 'zlib.h', 'zutil.h', 'openssl version'...And you will 
understand.

This is the proper output after the renaming of zutil.h and zlib.h in 
usr/include.  Without this:

adding "-I/usr/local/zlib/include" to INCLUDES
adding "-L/usr/local/zlib/lib" to LDFLAGS

never happens.


checking whether to enable mod_deflate... checking dependencies
  adding "-I/usr/local/zlib/include" to INCLUDES
  adding "-L/usr/local/zlib/lib" to LDFLAGS
  setting LIBS to "-lz"
checking for zlib library... found
checking zutil.h usability... yes
checking zutil.h presence... yes
checking for zutil.h... yes
checking whether to enable mod_deflate... shared (most)

I believe this code section is the culprit.

# Check whether --with-z or --without-z was given.
if test "${with_z+set}" = set; then
  withval="$with_z"

    if test "x$withval" != "xyes" && test "x$withval" != "x"; then
      ap_zlib_base="$withval"
    fi

fi;
  if test "x$ap_zlib_base" = "x"; then
    echo "$as_me:$LINENO: checking for zlib location" >&5
echo $ECHO_N "checking for zlib location... $ECHO_C" >&6
    if test "${ap_cv_zlib+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

      for dir in /usr/local /usr ; do
        if test -d $dir && test -f $dir/include/zlib.h; then
          ap_cv_zlib=$dir
          break
        fi
      done

fi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to