php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41730 lib64 libs are not detected correctly
Submitted: 2007-06-18 15:49 UTC Modified: 2007-06-18 16:22 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: lehmann at cnm dot de Assigned:
Status: Wont fix Package: Compile Failure
PHP Version: 4.4.7 OS: Red Hat Enterprise Linux ES 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lehmann at cnm dot de
New email:
PHP Version: OS:

 

 [2007-06-18 15:49 UTC] lehmann at cnm dot de
Description:
------------
RedHat puts most of the libraries into /usr/lib64 in 64 bit environments instead of /usr/lib as usual. The configure script doesn't use the lib64 directory to check for libraries.

Reproduce code:
---------------
Run

configure \
	--with-ldap \
	--with-jpeg \
	--with-png \
	--with-mysql \
	--with-imap \
	--with-kerberos

on a 64 bit system (RHEL4).

Expected result:
----------------
All libraries should be found.

Actual result:
--------------
There are errors like

configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-18 16:05 UTC] scottmac@php.net
You can use --with-libdir from PHP 5.1.0 onwards, there are no plans to backport this patch to the 4.4 branch.
 [2007-06-18 16:22 UTC] lehmann at cnm dot de
It is not required to backport it. Extending some test-clauses would help. This my personal patch which will not work on all 32 bit systems:

--- configure.php       2007-06-18 17:18:13.000000000 +0200
+++ php-4.4.7/configure 2007-06-18 18:04:53.000000000 +0200
@@ -17482,7 +17482,7 @@
     fi

     for i in $PHP_KERBEROS; do
-      if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
+      if test -f $i/lib/libkrb5.a || test -f $i/lib64/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME || test -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then
         PHP_KERBEROS_DIR=$i
         break
       fi
@@ -21225,7 +21225,7 @@
   withval="$with_jpeg_dir"

     for i in $withval /usr/local /usr; do
-      if test -f "$i/lib/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/lib/libjpeg.a"; then
+      if test -f "$i/lib64/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/lib64/libjpeg.a"; then
         CPDF_JPEG_DIR=$i
         break;
       fi
@@ -33503,6 +33503,9 @@

 ; return 0; }
 EOF
+echo "DEBUG: " $LIBS
+LIBS=`echo $LIBS | sed 's/-lxml //g'`
+echo "DEBUG: " $LIBS
 if { (eval echo configure:33507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
@@ -33547,7 +33550,7 @@
   if test "$PHP_JPEG_DIR" != "no"; then

     for i in $PHP_JPEG_DIR /usr/local /usr; do
-      test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break
+      test -f $i/lib64/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib64/libjpeg.a && GD_JPEG_DIR=$i && break
     done

     if test -z "$GD_JPEG_DIR"; then
@@ -33822,7 +33825,7 @@
   if test "$PHP_PNG_DIR" != "no"; then

     for i in $PHP_PNG_DIR /usr/local /usr; do
-      test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break
+      test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib64/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a -o -f $i/lib64/libpng.a && GD_PNG_DIR=$i && break
     done

     if test -z "$GD_PNG_DIR"; then
@@ -35343,7 +35346,7 @@
   if test "$PHP_JPEG_DIR" != "no"; then

     for i in $PHP_JPEG_DIR /usr/local /usr; do
-      test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i && break
+      test -f $i/lib64/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib64/libjpeg.a && GD_JPEG_DIR=$i && break
     done

     if test -z "$GD_JPEG_DIR"; then
@@ -35618,7 +35621,7 @@
   if test "$PHP_PNG_DIR" != "no"; then

     for i in $PHP_PNG_DIR /usr/local /usr; do
-      test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i && break
+      test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib64/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a -o -f $i/lib64/libpng.a && GD_PNG_DIR=$i && break
     done

     if test -z "$GD_PNG_DIR"; then
@@ -45189,6 +45192,10 @@
   for i in `echo $str`; do
     test -r $i && IMAP_LIBDIR=$IMAP_DIR/lib && break 2
   done
+  str="$IMAP_DIR/lib64/lib$lib.*"
+  for i in `echo $str`; do
+    test -r $i && IMAP_LIBDIR=$IMAP_DIR/lib64 && break 2
+  done


   str="$IMAP_DIR/c-client/lib$lib.*"
@@ -45467,7 +45474,7 @@
     fi

     for i in $PHP_KERBEROS; do
-      if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
+      if test -f $i/lib/libkrb5.a || test -f $i/lib64/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME || test -f $i/lib64/libkrb5.$SHLIB_SUFFIX_NAME; then
         PHP_KERBEROS_DIR=$i
         break
       fi
@@ -49744,7 +49751,7 @@
   if test -f $i/include/ldap.h; then
     LDAP_DIR=$i
     LDAP_INCDIR=$i/include
-    LDAP_LIBDIR=$i/lib
+    LDAP_LIBDIR=$i/lib64
   elif test -f $i/include/umich-ldap/ldap.h; then
     LDAP_DIR=$i
     LDAP_INCDIR=$i/include/umich-ldap
@@ -62103,7 +62110,7 @@
       ;;
   esac

-  for i in lib lib/mysql; do
+  for i in lib lib64 lib/mysql lib64/mysql; do

   str="$MYSQL_DIR/$i/lib$MY_LIBNAME.*"
   for j in `echo $str`; do
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Sep 23 20:01:27 2020 UTC