php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66604 'pdo/php_pdo_error.h' not copied to the include dir
Submitted: 2014-01-29 07:13 UTC Modified: 2014-04-13 06:52 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: php-bugs-2014 at ryandesign dot com Assigned: mbeccati (profile)
Status: Closed Package: PDO PgSQL
PHP Version: 5.6.0alpha1 OS: OS X 10.9.1
Private report: No CVE-ID: None
 [2014-01-29 07:13 UTC] php-bugs-2014 at ryandesign dot com
Description:
------------
Building the pdo_pgsql extension fails with:

/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_php/php56-postgresql/work/php-5.6.0alpha1/ext/pdo_pgsql/pgsql_driver.c:33:10: fatal error: 'pdo/php_pdo_error.h' file not found
#include "pdo/php_pdo_error.h"
         ^
1 error generated.

The other modules in php 5.6.0alpha1 build fine. pdo_pgsql built fine in php 5.5.8.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-07 04:51 UTC] php-bugs-2014 at ryandesign dot com
I've worked around the problem. You might decide that this was a user error.

I'm the maintainer of php in MacPorts, and we build most of the bundled extensions separately from php itself, so that they can be installed and uninstalled separately. The pdo extensions don't build out of the box because they can't find the pdo headers, because the main php ports install them in a nonstandard location (to allow multiple different php versions to be installed simultaneously). For example php56 installs them in /opt/local/include/php56/php/ext/pdo. The extension build is looking for the pdo headers in the path ext/pdo relative to the source directory, which when building the extensions separately is the extension's own directory. I've been dealing with this for the past 4 years by adding a symlink to the pdo headers installed by the php port. So for example, when building the php56 version of pdo_pgsql, I'd have MacPorts make a symlink from ext/pdo_pgsql/ext/pdo pointing to /opt/local/include/php56/php/ext/pdo. This worked with previous versions, but not version 5.6.0alpha1, because now the source directory ext/pdo contains this php_pdo_error.h header which does not get installed. On the assumption that this is intended to be a private header, I've changed my build strategy to now make the symlink from ext/pdo_pgsql/ext/pdo point to ext/pdo, and the build now succeeds.
 [2014-04-13 00:58 UTC] tyrael@php.net
-Assigned To: +Assigned To: mbeccati
 [2014-04-13 00:58 UTC] tyrael@php.net
let's see what Matteo thinks about this (as he was the person introducing php_pdo_error.h in http://git.php.net/?p=php-src.git;a=commitdiff;h=1e36e45d97da9e212b00f339c90b995908efa70c )
 [2014-04-13 06:52 UTC] mbeccati@php.net
-Summary: 'pdo/php_pdo_error.h' file not found +Summary: 'pdo/php_pdo_error.h' not copied to the include dir
 [2014-04-13 06:52 UTC] mbeccati@php.net
Nice catch!

Yes, php_pdo_error.h is supposed to be external, and that's why I moved the code away from php_pdo_int.h.

I believe I forgot to add a reference to it in config.m4/w32, but what's weird is that on my test box the header file is installed anyway.
 [2014-04-13 06:57 UTC] mbeccati@php.net
Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7fd9898a2d00d3df95d581df0fe67d91ced86661
Log: Fixed bug #66604 'pdo/php_pdo_error.h' not copied to the include dir
 [2014-04-13 06:57 UTC] mbeccati@php.net
-Status: Assigned +Status: Closed
 [2014-04-15 12:04 UTC] ab@php.net
Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7fd9898a2d00d3df95d581df0fe67d91ced86661
Log: Fixed bug #66604 'pdo/php_pdo_error.h' not copied to the include dir
 [2014-04-15 13:05 UTC] ab@php.net
Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7fd9898a2d00d3df95d581df0fe67d91ced86661
Log: Fixed bug #66604 'pdo/php_pdo_error.h' not copied to the include dir
 [2014-05-01 14:59 UTC] tyrael@php.net
Automatic comment on behalf of mbeccati
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7fd9898a2d00d3df95d581df0fe67d91ced86661
Log: Fixed bug #66604 'pdo/php_pdo_error.h' not copied to the include dir
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC