php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57133 pecl/sqlite fails to install
Submitted: 2006-07-11 12:02 UTC Modified: 2017-10-24 23:31 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:2 (66.7%)
From: fra423-spam at yahoo dot fr Assigned:
Status: Suspended Package: SQLite (PECL)
PHP Version: 5.4.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
40 + 17 = ?
Subscribe to this entry?

 
 [2006-07-11 12:02 UTC] fra423-spam at yahoo dot fr
Description:
------------
Hi,

When I try to upgrade or install SQLITE via PECL (pecl install sqlite), i've got some compilation errors. It seems to be a bug : 
--
running: make
/bin/bash /var/tmp/pear-build-root/SQLite-1.0.3/libtool --mode=compile gcc -I/tmp/tmp8laqB1/SQLite-1.0.3/libsqlite/src -I. -I/tmp/tmp8laqB1/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/SQLite-1.0.3/include -I/var/tmp/pear-build-root/SQLite-1.0.3/main -I/tmp/tmp8laqB1/SQLite-1.0.3 -I/opt/csw/php5/include/php -I/opt/csw/php5/include/php/main -I/opt/csw/php5/include/php/TSRM -I/opt/csw/php5/include/php/Zend -I/opt/csw/php5/include/php/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c -o sqlite.lo
mkdir .libs
 gcc -I/tmp/tmp8laqB1/SQLite-1.0.3/libsqlite/src -I. -I/tmp/tmp8laqB1/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/SQLite-1.0.3/include -I/var/tmp/pear-build-root/SQLite-1.0.3/main -I/tmp/tmp8laqB1/SQLite-1.0.3 -I/opt/csw/php5/include/php -I/opt/csw/php5/include/php/main -I/opt/csw/php5/include/php/TSRM -I/opt/csw/php5/include/php/Zend -I/opt/csw/php5/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c  -fPIC -DPIC -o .libs/sqlite.o
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: `BYREF_NONE' undeclared here (not in a function)
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: initializer element is not constant
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: (near initialization for `arg3_force_ref[1]')
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: `BYREF_NONE' undeclared here (not in a function)
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: initializer element is not constant
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: (near initialization for `arg3_force_ref[2]')
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: `BYREF_FORCE' undeclared here (not in a function)
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: initializer element is not constant
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:56: error: (near initialization for `arg3_force_ref[3]')
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/tmp/tmp8laqB1/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
*** Error code 1
make: Fatal error: Command failed for target `sqlite.lo'
ERROR: `make' failed
--

I have tried to download the package (pear download pecl/sqlite) and installed it and I've got the same problem.


---
PHP 5.1.2
PHP API 	20041225
PHP Extension 	20050922
Zend Extension 	220051025
---
Configure Command 	 './configure' '--prefix=/opt/csw/php5' '--enable-force-cgi-redirect' '--enable-discard-path' '--disable-static' '--with-libxml-dir=/opt/csw' '--enable-dom=shared' '--with-openssl=shared,/opt/csw' '--with-kerberos=/opt/csw' '--with-zlib=shared,/opt/csw' '--enable-bcmath=shared' '--with-bz2=shared,/opt/csw' '--enable-calendar=shared' '--with-curl=shared,/opt/csw' '--with-iconv=shared,/opt/csw' '--enable-dba=shared' '--with-ndbm' '--with-gdbm=/opt/csw' '--with-db4=/opt/csw/bdb43' '--with-inifile' '--enable-ftp=shared' '--with-gd=shared,/opt/csw' '--with-jpeg-dir=/opt/csw' '--with-png-dir=/opt/csw' '--with-zlib-dir=/opt/csw' '--with-xpm-dir=/opt/csw' '--with-freetype-dir=/opt/csw' '--with-t1lib=/opt/csw' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--enable-exif=shared' '--with-gettext=shared,/opt/csw' '--with-gmp=shared,/opt/csw' '--with-ldap=shared,/opt/csw' '--with-ldap-sasl=/opt/csw' '--enable-mbstring=shared' '--enable-pdo=shared' '--with-mssql=shared,/opt/csw' '--with-mysql=shared,/opt/csw/mysql4' '--with-pdo-mysql=shared,/opt/csw/mysql4' '--with-mysqli=shared' '--with-unixODBC=shared,/opt/csw' '--with-pdo-odbc=shared,unixODBC,/opt/csw' '--with-pgsql=shared,/opt/csw/postgresql/bin/sparcv8' '--with-pdo-pgsql=shared,/opt/csw/postgresql/bin/sparcv8' '--with-pspell=shared,/opt/csw' '--with-readline=shared,/opt/csw' '--with-mm=/opt/csw' '--enable-shmop=shared' '--with-openssl-dir=/opt/csw' '--with-snmp=shared,/opt/csw' '--enable-soap=shared' '--enable-sockets=shared' '--with-sqlite=shared,/opt/csw' '--with-pdo-sqlite=shared,/opt/csw' '--enable-sqlite-utf8' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-xml' '--with-expat-dir=/opt/csw' '--with-xsl=shared,/opt/csw' '--enable-wddx=shared' '--enable-xmlreader=shared' '--with-apxs2=/opt/csw/apache2/sbin/apxs' '--with-imap=../imap-2004f' '--with-imap-ssl=/opt/csw/ssl' '--with-kerberos=/opt/csw'

Expected result:
----------------
I expected to have extension sqlite.so compiled.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-11 20:19 UTC] ilia at prohost dot org
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 [2006-11-08 16:26 UTC] freedom at home dot com
How can this be closed, I am still getting the error and I do not see a fix for this posted on the SQLite package page.  I'm using OpenBSD 3.9, and am getting the same error, regardless of whether I try to build it myself or using PEAR/PECL.
 [2007-01-09 23:51 UTC] ss3 at silencer dot ws
Same error with PHP 5.2 on Fedora Core 6.
 [2007-12-06 06:02 UTC] simnpolseprasmolution at gmail dot com
Here's a patch for 1.0.3:

diff -Naur SQLite-1.0.3.orig/sqlite.c SQLite-1.0.3/sqlite.c
--- SQLite-1.0.3.orig/sqlite.c  2004-07-18 10:23:18.000000000 +0000
+++ SQLite-1.0.3/sqlite.c       2007-12-06 10:55:23.000000000 +0000
@@ -53,7 +53,7 @@
 extern int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out);
 extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out);

-static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
+/*static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };*/

 static int le_sqlite_db, le_sqlite_result, le_sqlite_pdb;

@@ -122,8 +122,8 @@
 enum { PHPSQLITE_ASSOC = 1, PHPSQLITE_NUM = 2, PHPSQLITE_BOTH = PHPSQLITE_ASSOC|PHPSQLITE_NUM };

 function_entry sqlite_functions[] = {
-       PHP_FE(sqlite_open, arg3_force_ref)
-       PHP_FE(sqlite_popen, arg3_force_ref)
+       PHP_FE(sqlite_open, third_arg_force_ref)
+       PHP_FE(sqlite_popen, third_arg_force_ref)
        PHP_FE(sqlite_close, NULL)
        PHP_FE(sqlite_query, NULL)
        PHP_FE(sqlite_exec, NULL)
 [2007-12-06 06:09 UTC] simnpolseprasmolution at gmail dot com
In regards to the above patch:

Once you apply it:

1) phpize
2) configure
3) make install
 [2008-10-12 17:18 UTC] mysqlee at gmail dot com
i still get same error now !
 [2008-11-19 00:04 UTC] lists at mattrude dot com
Im also still seeing this error.  Fedora 9 with php version 5.2.6

pecl install sqlite

...

running: make
/bin/sh /var/tmp/pear-build-matt/SQLite-1.0.3/libtool --mode=compile gcc -I/tmp/pear/download/SQLite-1.0.3/libsqlite/src -I. -I/tmp/pear/download/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-matt/SQLite-1.0.3/include -I/var/tmp/pear-build-matt/SQLite-1.0.3/main -I/tmp/pear/download/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/download/SQLite-1.0.3/sqlite.c -o sqlite.lo
mkdir .libs
 gcc -I/tmp/pear/download/SQLite-1.0.3/libsqlite/src -I. -I/tmp/pear/download/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-matt/SQLite-1.0.3/include -I/var/tmp/pear-build-matt/SQLite-1.0.3/main -I/tmp/pear/download/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/SQLite-1.0.3/sqlite.c  -fPIC -DPIC -o .libs/sqlite.o
/tmp/pear/download/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a function)
/tmp/pear/download/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a function)
/tmp/pear/download/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/tmp/pear/download/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
ERROR: `make' failed
 [2010-12-27 06:41 UTC] ermya dot johnson at gmail dot com
i have this problem on cenos 5.5 


 pecl install sqlite
WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update
downloading SQLite-1.0.3.tgz ...
Starting to download SQLite-1.0.3.tgz (371,189 bytes)
.................................done: 371,189 bytes
50 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/SQLite-1.0.3
running: /tmp/pear/download/SQLite-1.0.3/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for sqlite support... yes, shared
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for char *... yes
checking size of char *... 4
checking for usleep... yes
checking for nanosleep... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/SQLite-1.0.3/libtool --mode=compile cc -I/tmp/pear/download/SQLite-1.0.3/libsqlite/src -I. -I/tmp/pear/download/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/SQLite-1.0.3/include -I/var/tmp/pear-build-root/SQLite-1.0.3/main -I/tmp/pear/download/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/download/SQLite-1.0.3/sqlite.c -o sqlite.lo
mkdir .libs
 cc -I/tmp/pear/download/SQLite-1.0.3/libsqlite/src -I. -I/tmp/pear/download/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/SQLite-1.0.3/include -I/var/tmp/pear-build-root/SQLite-1.0.3/main -I/tmp/pear/download/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/SQLite-1.0.3/sqlite.c  -fPIC -DPIC -o .libs/sqlite.o
/tmp/pear/download/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a function)
/tmp/pear/download/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a function)
/tmp/pear/download/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/tmp/pear/download/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
ERROR: `make' failed
 [2010-12-27 06:43 UTC] ermya dot johnson at gmail dot com
i try to run :
pecl channel-update pear.php.net

and now again i have this problem :

pecl install sqlite
downloading SQLite-1.0.3.tgz ...
Starting to download SQLite-1.0.3.tgz (371,189 bytes)
.....................done: 371,189 bytes
50 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/SQLite-1.0.3
running: /tmp/pear/download/SQLite-1.0.3/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for sqlite support... yes, shared
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for char *... yes
checking size of char *... 4
checking for usleep... yes
checking for nanosleep... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/SQLite-1.0.3/libtool --mode=compile cc -I/tmp/pear/download/SQLite-1.0.3/libsqlite/src -I. -I/tmp/pear/download/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/SQLite-1.0.3/include -I/var/tmp/pear-build-root/SQLite-1.0.3/main -I/tmp/pear/download/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/download/SQLite-1.0.3/sqlite.c -o sqlite.lo
mkdir .libs
 cc -I/tmp/pear/download/SQLite-1.0.3/libsqlite/src -I. -I/tmp/pear/download/SQLite-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/SQLite-1.0.3/include -I/var/tmp/pear-build-root/SQLite-1.0.3/main -I/tmp/pear/download/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/SQLite-1.0.3/sqlite.c  -fPIC -DPIC -o .libs/sqlite.o
/tmp/pear/download/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a function)
/tmp/pear/download/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a function)
/tmp/pear/download/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/tmp/pear/download/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
ERROR: `make' failed
 [2011-02-09 11:49 UTC] test at example dot net
Still got this problem...
 [2011-02-25 03:31 UTC] exl2003 at gmail dot com
[root@esctoweb SQLite-1.0.3]# make
/bin/sh /root/delete/0002/SQLite-1.0.3/libtool --mode=compile gcc -I/root/delete/0002/SQLite-1.0.3/libsqlite/src -I. -I/root/delete/0002/SQLite-1.0.3 -DPHP_ATOM_INC -I/root/delete/0002/SQLite-1.0.3/include -I/root/delete/0002/SQLite-1.0.3/main -I/root/delete/0002/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext  -DHAVE_CONFIG_H  -g -O2   -c /root/delete/0002/SQLite-1.0.3/sqlite.c -o sqlite.lo 
mkdir .libs
 gcc -I/root/delete/0002/SQLite-1.0.3/libsqlite/src -I. -I/root/delete/0002/SQLite-1.0.3 -DPHP_ATOM_INC -I/root/delete/0002/SQLite-1.0.3/include -I/root/delete/0002/SQLite-1.0.3/main -I/root/delete/0002/SQLite-1.0.3 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /root/delete/0002/SQLite-1.0.3/sqlite.c  -fPIC -DPIC -o .libs/sqlite.o
/root/delete/0002/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a function)
/root/delete/0002/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a function)
/root/delete/0002/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/root/delete/0002/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
 [2012-06-08 07:05 UTC] mm at 1h dot com
I had the same issue, so I ported the code so it can compile for PHP 5.4.x. Here is my patch:

--- SQLite-1.0.3/sqlite.c       2004-07-18 13:23:18.000000000 +0300
+++ SQLite-1.0.3-mm/sqlite.c    2012-06-08 10:03:16.000000000 +0300
@@ -31,6 +31,10 @@
 #include "ext/standard/info.h"
 #include "php_sqlite.h"
 
+#define BYREF_NONE 0
+#define BYREF_FORCE 1
+#define BYREF_ALLOW 2
+
 #if HAVE_TIME_H
 # include <time.h>
 #endif
@@ -121,7 +125,7 @@ struct php_sqlite_agg_functions {
 
 enum { PHPSQLITE_ASSOC = 1, PHPSQLITE_NUM = 2, PHPSQLITE_BOTH = PHPSQLITE_ASSOC|PHPSQLITE_NUM };
 
-function_entry sqlite_functions[] = {
+zend_function_entry sqlite_functions[] = {
        PHP_FE(sqlite_open, arg3_force_ref)
        PHP_FE(sqlite_popen, arg3_force_ref)
        PHP_FE(sqlite_close, NULL)
@@ -482,7 +486,7 @@ static void php_sqlite_agg_step_function
 
        if (*context_p == NULL) {
                MAKE_STD_ZVAL(*context_p);
-               (*context_p)->is_ref = 1;
+//             (*context_p)->is_ref = 1;
                Z_TYPE_PP(context_p) = IS_NULL;
        }
 
@@ -590,9 +594,11 @@ static int php_sqlite_authorizer(void *a
                case SQLITE_COPY:
                        if (strncmp(arg4, ":memory:", sizeof(":memory:") - 1)) {
                                TSRMLS_FETCH();
+/* Not compatible with PHP 5.4.x
                                if (PG(safe_mode) && (!php_checkuid(arg4, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                                        return SQLITE_DENY;
                                }
+*/
 
                                if (php_check_open_basedir(arg4 TSRMLS_CC)) {
                                        return SQLITE_DENY;
@@ -603,9 +609,11 @@ static int php_sqlite_authorizer(void *a
                case SQLITE_ATTACH:
                        if (strncmp(arg3, ":memory:", sizeof(":memory:") - 1)) {
                                TSRMLS_FETCH();
+/* Not compatible with PHP 5.4.x
                                if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                                        return SQLITE_DENY;
                                }
+*/
 
                                if (php_check_open_basedir(arg3 TSRMLS_CC)) {
                                        return SQLITE_DENY;
@@ -736,7 +744,8 @@ static struct php_sqlite_db *php_sqlite_
        db->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, db, persistent_id ? le_sqlite_pdb : le_sqlite_db);
 
        if (persistent_id) {
-               list_entry le;
+//             list_entry le;
+               zend_rsrc_list_entry le;
 
                Z_TYPE(le) = le_sqlite_pdb;
                le.ptr = db;
@@ -760,7 +769,8 @@ PHP_FUNCTION(sqlite_popen)
        long filename_len, hashkeylen;
        zval *errmsg = NULL;
        struct php_sqlite_db *db = NULL;
-       list_entry *le;
+       //list_entry *le;
+       zend_rsrc_list_entry *le;
 
        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/",
                                &filename, &filename_len, &mode, &errmsg)) {
@@ -774,9 +784,11 @@ PHP_FUNCTION(sqlite_popen)
                /* resolve the fully-qualified path name to use as the hash key */
                fullpath = expand_filepath(filename, NULL TSRMLS_CC);
 
+/* Not compatible with PHP 5.4.x
                if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                        RETURN_FALSE;
                }
+*/
 
                if (php_check_open_basedir(fullpath TSRMLS_CC)) {
                        RETURN_FALSE;
@@ -847,10 +859,12 @@ PHP_FUNCTION(sqlite_open)
                /* resolve the fully-qualified path name to use as the hash key */
                fullpath = expand_filepath(filename, NULL TSRMLS_CC);
 
+/* Not compatible with PHP 5.4.x
                if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
                        efree(fullpath);
                        RETURN_FALSE;
                }
+*/
 
                if (php_check_open_basedir(fullpath TSRMLS_CC)) {
                        efree(fullpath);
 [2012-06-08 07:59 UTC] philip@php.net
-Status: Closed +Status: Re-Opened
 [2012-06-08 07:59 UTC] philip@php.net
A few notes:

 1. The PECL version of the sqlite extension has been dead for a long 
    time. Nobody should have been attempting to install it since around 
    2007

 2. As of PHP 5.4.0, ext/sqlite no longer exists, which means the pecl 
    version of this extension should live again (which means, a release
    should be made)

 3. We should have a new pecl/sqlite release that:

    A) Uses the latest source from ext/sqlite
    B) Works with PHP 5.4.0 and above (and below)
    C) Also installs pdo_sqlite2

This was worked on once before and I even tested a patch, but I've since lost 
said patch and forgot about the progress made. However, this bug report being 
open may help. Johannes created the patch.
 [2012-06-08 08:00 UTC] philip@php.net
-Summary: Installation sqlite +Summary: pecl/sqlite fails to install -Operating System: solaris 5.8 +Operating System: -PHP Version: 5.1.2 +PHP Version: 5.4.0
 [2012-06-28 18:37 UTC] devzone dot my at gmail dot com
Patch done http://pastebin.com/TMZBH5K8
 [2012-06-28 18:38 UTC] devzone dot my at gmail dot com
sqlite3 - burn in Hell
 [2012-08-02 20:47 UTC] roberto at spadim dot com dot br
could anyone update pecl sqlite2? there´s a patch done, and i reported some other patch in php docbug database, i tested a lot the code, and no problems reported... please just update the source to friendly install "pecl install sqlite" without errors in php 5.4.XXX

there´s many code with sqlite2 and porting to php 5.4.xxx is a feature request by many webservers...
thanks
 [2012-08-02 21:33 UTC] roberto at spadim dot com dot br
here the package with support for php5.4.5 (thanks to devzone.me@gmail, i don´t know how you are and me =] )
please test and update the pecl :)

please it´s a slow link, don´t burn it!

http://www.spadim.com.br/SQLite-1.0.4.tgz
 [2013-09-19 22:55 UTC] parazitts at gmial dot com
tank you very much devzone
i cant install eyeos on ubuntu and debian because sqlite extension required,
but with  the
http://static.inmac.org/download/patches/PHP/5.4/sqlite2/2.0dev/sqlite2_2.0-
dev.7z

install sqlite extension and eyeos
 [2013-09-19 23:14 UTC] roberto at spadim dot com dot br
Please! Update the PECL, or allow a new sqlite2 package to have this updates
sqlite2 is a old feature that some systems use and can't be removed in short time, 
see dbase... why it's not removed? everybody use, and sqlite2 is very better than 
dbase...
 [2017-10-24 23:31 UTC] kalle@php.net
-Status: Re-Opened +Status: Suspended
 [2017-10-24 23:31 UTC] kalle@php.net
The SQLite extension was moved out of the PHP source and back in to PECL and have not since had a release or any activity, I would highly suggest to use the bundled sqlite3 extension instead. If development begins at this extension, then this report should be re-opened
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 23:01:29 2024 UTC