>Number:         2527
>Category:       os-linux
>Synopsis:       Incorrect assumptions in the 1.3.0 Configure script for Linux 
>2.0.x/libc5 (non-glibc2) systems.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Jun 29 14:20:00 PDT 1998
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3.0
>Environment:
Linux ecwav.panoptic.com 2.0.34 #31337 Mon Jun 22 18:25:40 EDT 1998 i486 unknown
Reading specs from /usr/lib/gcc-lib/i486-unknown-linuxlibc1/2.7.2.2/specs
gcc version 2.7.2.2

>Description:
Building Apache 1.3.0 on my Linux 2.0.34 box yielded some unsatisfactory
results.  Partly due to the configuration script's inability to detect
the need for -ldl for the --enable-shared=max, and the use of -lcrypt
(which is clearly documented as being needed for glibc 2.x, and my box
is a libc 5.x system, yet the configure script thinks I'm also glibc 2.x).

>How-To-Repeat:
Here is the configure command I used:
./configure --compat --prefix=/usr/www --proxycachedir=/usr/www/cache \
  --enable-module=proxy --enable-module=expires --enable-module=log_referer \
  --enable-module=status --enable-shared=max
>Fix:
Here is a diff with the changes necessary to get a clean build:

--- apache_1.3.0/src/Configure.old      Tue May 12 08:13:50 1998
+++ apache_1.3.0/src/Configure  Mon Jun 29 16:44:35 1998
@@ -1052,6 +1052,10 @@
 if [ "x$using_shlib" = "x1" ] ; then
     DL_LIB=""
     case $PLAT in
+        *-linux* )
+            # linux libc5? requires -ldl for dl* functions.  -Dossy 980629
+            DL_LIB="-ldl"
+            ;;
         *-ibm-aix* )
             DL_LIB="-lld"
             ;;
@@ -1144,6 +1148,12 @@
 
 # Use TestCompile to look for various LIBS
 case "$PLAT" in
+    *-whatever-linux*)
+       # my non-glibc2 $PLAT is i486-whatever-linux2, which does not have
+       # -lcrypt.  The "*-linux*" needs to be rewritten to be more
+       # specific and only recognize glibc2 linux boxes.  -Dossy 980629
+       ;;
+
     *-linux*)
        # newer systems using glibc 2.x need -lcrypt
        if ./helpers/TestCompile lib crypt; then

---end-of-diff---

The first change would be more appropriate in helpers/TestCompile lib dl,
and have it properly recognize that Linux needs -ldl to build shared
libraries.

The second change should just require better identifying glibc 2.x systems
or Linux systems that require -lcrypt in general.

My patch was just a temporary fix to get Apache 1.3.0 to build cleanly
and to illustrate the problems I encountered.

Good luck, and if you need any more information, feel free to send me
e-mail.

-Dossy
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]



Reply via email to