acinclude.m4 references incorrect PDO header location

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

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:

dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
  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
    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
    elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then

Additional references to this issue: - php5-dev: acinclude.m4's PHP_CHECK_PDO_INCLUDES fails to look in the right place for php_pdo_driver.h - ./configure fails with "Cannot find php_pdo_driver.h" - php5: Compiling pdo_oci extension fails with "Cannot find php_pdo_driver.h."

Description: Ubuntu 14.04.2 LTS
Release: 14.04
  Installed: 5.5.9+dfsg-1ubuntu4.5
  Candidate: 5.5.9+dfsg-1ubuntu4.5
  Version table:
 *** 5.5.9+dfsg-1ubuntu4.5 0
        500 trusty-updates/main amd64 Packages
        500 trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.5.9+dfsg-1ubuntu4 0
        500 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