Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2013 06:54:41 GMT
From:      Erick Turnquist <jhujhiti@adjectivism.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/185151: net/php5-ldap fails to build when LOCALBASE is not /usr/local
Message-ID:  <201312240654.rBO6sfqY036727@oldred.freebsd.org>
Resent-Message-ID: <201312240700.rBO700Vk004488@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         185151
>Category:       ports
>Synopsis:       net/php5-ldap fails to build when LOCALBASE is not /usr/local
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 24 07:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Erick Turnquist
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD rhea 9.1-RELEASE-p7 FreeBSD 9.1-RELEASE-p7 #4: Sat Sep 14 03:52:41 UTC 2013     root@rhea:/usr/obj/usr/src/sys/CUSTOM  amd64
>Description:
This was a difficult issue to track down.

I use a non-default LOCALBASE/PREFIX setting (/usr/pkg instead of /usr/local). net/php5-ldap has been failing to build. It turns out that the --with-ldap-sasl configure option can also accept a path and it doesn't respect the --with-ldap path. We can see how this has been working for those users who leave LOCALBASE/PREFIX alone by noticing the default value of SEARCH_DIRS in this snippet from the extension's config.m4:

----

AC_DEFUN([PHP_LDAP_SASL_CHECKS], [
  if test "$1" = "yes"; then
    SEARCH_DIRS="/usr/local /usr"
  else
    SEARCH_DIRS=$1
  fi

  for i in $SEARCH_DIRS; do
    if test -f $i/include/sasl/sasl.h; then
      LDAP_SASL_DIR=$i
      AC_DEFINE(HAVE_LDAP_SASL_SASL_H,1,[ ])
      break
    elif test -f $i/include/sasl.h; then
      LDAP_SASL_DIR=$i
      AC_DEFINE(HAVE_LDAP_SASL_H,1,[ ])
      break
    fi
  done
  
  if test "$LDAP_SASL_DIR"; then
    LDAP_SASL_INCDIR=$LDAP_SASL_DIR/include
    LDAP_SASL_LIBDIR=$LDAP_SASL_DIR/$PHP_LIBDIR
  else
    AC_MSG_ERROR([sasl.h not found!])
  fi

----

A trivial patch is attached to fix this.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- Makefile.ext.orig   2013-12-24 01:33:10.561057965 -0500
+++ Makefile.ext.patched        2013-12-24 01:34:09.068057995 -0500
@@ -160,7 +160,7 @@
 USE_OPENLDAP=  yes
 
 . ifdef(WANT_OPENLDAP_SASL)
-CONFIGURE_ARGS+=--with-ldap-sasl
+CONFIGURE_ARGS+=--with-ldap-sasl=${LOCALBASE}
 . endif
 .endif
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312240654.rBO6sfqY036727>