acinclude.m4 references incorrect PDO header location

Bug #1393640 reported by Brad Erickson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Undecided
Unassigned

Bug Description

The /usr/lib/php5/build/acinclude.m4 file looks for PDO header files in $prefix/include/php/ext/pdo/php_pdo_driver.h, but they are actually in $prefix/include/php5/ext/pdo/php_pdo_driver.h on Ubuntu. This bug stops PHP PDO extensions from compiling.

Current PHP source: https://github.com/php/php-src/blob/96220027e12d72b295808081136dee66bc3a9d61/acinclude.m4#L2774

dnl
dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
dnl
AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
  AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
    AC_MSG_CHECKING([for PDO includes])
    if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$abs_srcdir/ext
    elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
      pdo_cv_inc_path=$prefix/include/php/ext
    fi
  ])

Additional references to this issue:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647475 Debian.org - php5-dev: acinclude.m4's PHP_CHECK_PDO_INCLUDES fails to look in the right place for php_pdo_driver.h

https://bugs.php.net/bug.php?id=59450 PHP.net - ./configure fails with "Cannot find php_pdo_driver.h"

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511900 Debian.org - php5: Compiling pdo_oci extension fails with "Cannot find php_pdo_driver.h."

Description: Ubuntu 14.04.2 LTS
Release: 14.04
php5-dev:
  Installed: 5.5.9+dfsg-1ubuntu4.5
  Candidate: 5.5.9+dfsg-1ubuntu4.5
  Version table:
 *** 5.5.9+dfsg-1ubuntu4.5 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.5.9+dfsg-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

A temporary workaround:
sudo ln -s /usr/include/php5/ /usr/include/php

Revision history for this message
Brad Erickson (eosrei) wrote :

This patch changes the php_pdo_driver location test from php/ to php5/:

- elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_cv_inc_path=$prefix/include/php/ext
+ elif test -f $prefix/include/php5/ext/pdo/php_pdo_driver.h; then
+ pdo_cv_inc_path=$prefix/include/php5/ext

Seems like the correct solution to me, but I could be completely wrong. Thanks

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "acinclude-php5.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers