php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75615 PDO Mysql module can't be built as module
Submitted: 2017-12-03 12:36 UTC Modified: 2017-12-16 21:43 UTC
From: jdolecek at NetBSD dot org Assigned:
Status: Closed Package: PDO MySQL
PHP Version: 7.2.0 OS: NetBSD,pkgsrc
Private report: No CVE-ID: None
 [2017-12-03 12:36 UTC] jdolecek at NetBSD dot org
Description:
------------
NetBSD package system pkgsrc maintains several patches, which we'd like to feed upstream. This is one of them.

ext/pdo_mysql/config.m4 contains incorrect includes (bare -I, and unnecessary -I$pdo_cv_inc_path) and hence is not buildable separately as extension.


Patches

patch-ext_pdo__mysql_config.m4 (last revision 2017-12-03 12:36 UTC by jdolecek at NetBSD dot org)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-16 21:43 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2017-12-16 21:43 UTC] nikic@php.net
The -I$pdo_cv_inc_path seems to be necessary. I get the following compile error when applying this patch:

~/php-7.2/ext/pdo_mysql/pdo_mysql.c:29:25: fatal error: pdo/php_pdo.h: No such file or directory
 [2017-12-17 11:35 UTC] jdolecek at NetBSD dot org
NetBSD pkgsrc libtool inserts some more include paths, maybe that's why this doesn't happen there. I've tested patch where just the base -I was removed, that worked too.

So the new patch:

--- ext/pdo_mysql/config.m4.orig    2015-06-23 17:33:33.000000000 +0000
+++ ext/pdo_mysql/config.m4
@@ -156,7 +156,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
   fi

   dnl fix after renaming to pdo_mysql
-  PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_cv_inc_path -I -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+  PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_cv_inc_path -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
   ifdef([PHP_ADD_EXTENSION_DEP],
   [
     PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)

Sorry, can't now change back to open, have the password stored on different computer.
 [2017-12-17 11:48 UTC] nikic@php.net
Automatic comment on behalf of jdolecek@NetBSD.org
Revision: http://git.php.net/?p=php-src.git;a=commit;h=200bf9b5d76b4ff2b17981000293213ca14d094b
Log: Fix bug #75615
 [2017-12-17 11:48 UTC] nikic@php.net
-Status: Feedback +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 10:01:27 2024 UTC