php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56474 Missing php_pdo_sqlite_int.h
Submitted: 2005-08-05 03:01 UTC Modified: 2005-08-22 11:08 UTC
From: cb at ip3 dot com Assigned:
Status: Not a bug Package: PDO_SQLITE (PECL)
PHP Version: 5.0.3 OS: Debian Linux 2.4.18
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cb at ip3 dot com
New email:
PHP Version: OS:

 

 [2005-08-05 03:01 UTC] cb at ip3 dot com
Description:
------------
With version 0.9 running the command:

./pear install -f PDO_SQLITE

Generates the following error:

In file included from /tmp/tmpi8EMfD/PDO_SQLITE-0.9/pdo_sqlite.c:31:
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:24:21: sqlite3.h: No such file or directory
In file included from /tmp/tmpi8EMfD/PDO_SQLITE-0.9/pdo_sqlite.c:31:
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:50: error: syntax error before "sqlite3"
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:50: warning: no semicolon at end of struct or union
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:53: error: syntax error before '}' token
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:53: warning: data definition has no type or storageclass
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:56: error: syntax error before "pdo_sqlite_db_handle"
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:56: warning: no semicolon at end of struct or union
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:57: warning: data definition has no type or storageclass
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:58: error: syntax error before ':' token
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:59: error: syntax error before ':' token
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:60: warning: data definition has no type or storageclass
make: *** [pdo_sqlite.lo] Error 1
`make' failed


The previous version worked correctly. PDO is installed and functional. PDO_MYSQL is also installed. This URL has a thread with a couple reporting the same issue with tar ball:
http://www.mail-archive.com/internals@lists.php.net/msg16018.html

Reproduce code:
---------------
Run: ./pear install -f PDO_SQLITE

Expected result:
----------------
tmp/tmpi8EMfD/PDO_SQLITE-0.9/pdo_sqlite.c:31:
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:24:21: sqlite3.h: No such file or directory
In file included from /tmp/tmpi8EMfD/PDO_SQLITE-0.9/pdo_sqlite.c:31:
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:50: error: syntax error before "sqlite3"
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:50: warning: no semicolon at end of struct or union
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:53: error: syntax error before '}' token
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:53: warning: data definition has no type or storageclass
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:56: error: syntax error before "pdo_sqlite_db_handle"
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:56: warning: no semicolon at end of struct or union
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:57: warning: data definition has no type or storageclass
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:58: error: syntax error before ':' token
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:59: error: syntax error before ':' token
/tmp/tmpi8EMfD/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:60: warning: data definition has no type or storageclass
make: *** [pdo_sqlite.lo] Error 1
`make' failed

Actual result:
--------------
Proper Compilation

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-22 11:08 UTC] tuupola at appelsiini dot net
It is sqlite3.h what your build does not find. Looking at config.m4 it is only searched from /usr/local/include/sqlite3.h and /usr/include/sqlite3.h. You have it installed somewhere else. I agree configure should search for the headers from several more places.

You still can install the driver by hand. Let's say your sqlite3 is installed in /usr/local/sqlite3 and the header files are in /usr/local/sqlite3/include. What you need to do is:

#pear download pdo_sqlite-beta
#tar -xzvf PDO_SQLITE-0.9.tgz
#cd PDO_SQLITE-0.9
#phpize
#./configure --with-pdo-sqlite=/usr/local/sqlite3
#make
#make install
#pear install -r pdo_sqlite-beta

(The last line just registers the package as installed so it will show when issuing a  pear list  command)
 [2005-09-01 19:17 UTC] akorthaus at web dot de
Why is this Bug marked "Bogus"? It's a problem with the latest PECL-Package:

I compiled latest PHP 5.0 snapshot with:

./configure --prefix=$PHP_PREFIX --disable-all

I used:

$PHP_PREFIX/bin/phpize
./configure --with-php-config=$PHP_PREFIX/bin/php-config

to configure PDO_SQLITE-0.9 (PECL). ./configure works, but make fails with the same error as mentioned above:

In file included from /home/akorthaus/src/PDO_SQLITE-0.9/pdo_sqlite.c:31:
/home/akorthaus/src/PDO_SQLITE-0.9/php_pdo_sqlite_int.h:24:21: sqlite3.h: No such file or directory

There is no sqlite3.h in the PDO_SQLITE-0.9 tarball, but it is created by ./configure in sqlite/src/sqlite3.h. If I copy this file to the local directory (.) make works perfectly.

The following patch against config.m4 from latest CVS checkout of PDO_SQLITE, solves the issue, but I don't know if this is "the correct" way:

--- config.m4_orig      2005-09-02 01:11:09.000000000 +0200
+++ config.m4   2005-09-02 01:11:42.000000000 +0200
@@ -90,7 +90,7 @@
       AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer])
       PDO_SQLITE_VERSION=`cat $ext_srcdir/sqlite/VERSION`
       PDO_SQLITE_VERSION_NUMBER=`echo $PDO_SQLITE_VERSION | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}'`
-      sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in > $ext_builddir/sqlite/src/sqlite3.h
+      sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in > $ext_builddir/sqlite3.h

       touch $ext_srcdir/sqlite/src/parse.c $ext_srcdir/sqlite/src/parse.h
 [2005-09-01 19:45 UTC] akorthaus at web dot de
I'm not sure if it's the same problem, it's not the same problem as mentioned on php.internals link above.

The problem only occours with PHP 5.0.4 and lastest 5.0-dev, not with PHP 5.1 (earlier versions not tested, 5.0.4 reported by someone else).

If I apply my patch, it works with both versions. But as said before, there must be a deeper problem. 

With Bug http://pecl.php.net/bugs/bug.php?id=5010 it is the other way around, this one does not seem to have any effect on PHP 5.0.
 [2005-09-25 05:48 UTC] akorthaus at web dot de
This problem has been fixed in CVS:

http://pecl.php.net/bugs/bug.php?id=5391
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Jul 23 02:01:25 2018 UTC