php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57466 make failure
Submitted: 2007-01-05 05:32 UTC Modified: 2009-02-25 14:50 UTC
From: sidrit at hotmail dot com Assigned:
Status: Wont fix Package: SQLite (PECL)
PHP Version: 4.4.4 OS: FC5
Private report: No CVE-ID: None
 [2007-01-05 05:32 UTC] sidrit at hotmail dot com
Description:
------------
installation with pear through package.xml fail in the 
'make process'

Reproduce code:
---------------
[root@korn SQLite-1.0.3]# pwd
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3
[root@korn SQLite-1.0.3]# pear install package.xml

...........

/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a function)
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a function)
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
ERROR: `make' failed

[root@korn SQLite-1.0.3]#

Actual result:
--------------
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_NONE' undeclared here (not in a function)
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:56: error: 'BYREF_FORCE' undeclared here (not in a function)
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:125: warning: initialization from incompatible pointer type
/home/html/www/prado/SQLite-1.0.3/SQLite-1.0.3/sqlite.c:126: warning: initialization from incompatible pointer type
make: *** [sqlite.lo] Error 1
ERROR: `make' failed


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-15 00:40 UTC] php at numist dot net
the PEAR installed through MacPorts also gets the same 
error.  OS X v10.5.9

reproduce code:  sudo pear install sqlite

output:

Password:
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: /private/tmp/tmpFAE8kb/SQLite-1.0.3/configure
checking for grep that handles long lines and -e... /usr/
bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/
bin/sed
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc and cc understand -c and -o together... 
yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... no
checking build system type... powerpc-apple-darwin8.9.0
checking host system type... powerpc-apple-darwin8.9.0
checking target system type... powerpc-apple-darwin8.9.0
checking for PHP prefix... /opt/local
checking for PHP includes... -I/opt/local/include/php -I/
opt/local/include/php/main -I/opt/local/include/php/TSRM -I/
opt/local/include/php/Zend -I/opt/local/include/php/ext -I/
opt/local/include/php/ext/date/lib
checking for PHP extension directory... /opt/local/lib/php/
extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /opt/local/
include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if 
you want to regenerate PHP parsers.
checking for gawk... gawk
checking for sqlite support... yes, shared
checking how to run the C preprocessor... gcc -E
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 gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 
196608
checking command to parse /usr/bin/nm -p output from gcc 
object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports 
shared libraries... yes
checking dynamic linker characteristics... darwin8.9.0 dyld
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

creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports 
shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports 
shared libraries... yes
checking dynamic linker characteristics... darwin8.9.0 dyld
checking how to hardcode library paths into programs... 
immediate
checking whether stripping libraries is possible... yes
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/tmp/pear-build-root/SQLite-1.0.3/
libtool --mode=compile gcc -I/private/tmp/tmpFAE8kb/
SQLite-1.0.3/libsqlite/src -I. -I/private/tmp/tmpFAE8kb/
SQLite-1.0.3 -DPHP_ATOM_INC -I/private/var/tmp/pear-build-
root/SQLite-1.0.3/include -I/private/var/tmp/pear-build-
root/SQLite-1.0.3/main -I/private/tmp/tmpFAE8kb/SQLite-1.0.3 
-I/opt/local/include/php -I/opt/local/include/php/main -I/
opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/
opt/local/include/php/ext -I/opt/local/include/php/ext/date/
lib  -L/opt/local/lib -I/opt/local/include -L/usr/X11R6/lib 
-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec -fno-strict-
aliasing -Os -DHAVE_CONFIG_H  -L/opt/local/lib -I/opt/local/
include -L/usr/X11R6/lib -mcpu=7450 -O2 -pipe -maltivec -
mabi=altivec -fno-strict-aliasing -Os   -c /private/tmp/
tmpFAE8kb/SQLite-1.0.3/sqlite.c -o sqlite.lo
mkdir .libs
 gcc -I/private/tmp/tmpFAE8kb/SQLite-1.0.3/libsqlite/src -I. 
-I/private/tmp/tmpFAE8kb/SQLite-1.0.3 -DPHP_ATOM_INC -I/
private/var/tmp/pear-build-root/SQLite-1.0.3/include -I/
private/var/tmp/pear-build-root/SQLite-1.0.3/main -I/
private/tmp/tmpFAE8kb/SQLite-1.0.3 -I/opt/local/include/php 
-I/opt/local/include/php/main -I/opt/local/include/php/TSRM 
-I/opt/local/include/php/Zend -I/opt/local/include/php/ext -
I/opt/local/include/php/ext/date/lib -L/opt/local/lib -I/
opt/local/include -L/usr/X11R6/lib -mcpu=7450 -O2 -pipe -
maltivec -mabi=altivec -fno-strict-aliasing -Os -
DHAVE_CONFIG_H -L/opt/local/lib -I/opt/local/include -L/usr/
X11R6/lib -mcpu=7450 -O2 -pipe -maltivec -mabi=altivec -fno-
strict-aliasing -Os -c /private/tmp/tmpFAE8kb/SQLite-1.0.3/
sqlite.c  -fno-common -DPIC -o .libs/sqlite.o
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:56: error: 
?BYREF_NONE? undeclared here (not in a function)
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:56: error: 
?BYREF_FORCE? undeclared here (not in a function)
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:125: warning: 
initialization from incompatible pointer type
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:126: warning: 
initialization from incompatible pointer type
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c: In function 
?php_sqlite_fetch_array?:
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1181: warning: 
pointer targets in passing argument 1 of 
?sqlite_decode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1181: warning: 
pointer targets in passing argument 2 of 
?sqlite_decode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c: In function 
?php_sqlite_fetch_column?:
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1258: warning: 
pointer targets in passing argument 1 of 
?sqlite_decode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1258: warning: 
pointer targets in passing argument 2 of 
?sqlite_decode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c: In function 
?php_sqlite_fetch_single?:
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1402: warning: 
pointer targets in passing argument 1 of 
?sqlite_decode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1402: warning: 
pointer targets in passing argument 2 of 
?sqlite_decode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c: In function 
?zif_sqlite_escape_string?:
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:1795: warning: 
pointer targets in passing argument 3 of 
?sqlite_encode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c: In function 
?zif_sqlite_udf_encode_binary?:
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:2000: warning: 
pointer targets in passing argument 3 of 
?sqlite_encode_binary? differ in signedness
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c: In function 
?zif_sqlite_udf_decode_binary?:
/private/tmp/tmpFAE8kb/SQLite-1.0.3/sqlite.c:2028: warning: 
pointer targets in passing argument 2 of 
?sqlite_decode_binary? differ in signedness
make: *** [sqlite.lo] Error 1
ERROR: `make' failed
 [2007-04-15 01:40 UTC] dev at numist dot net
just noticed:

The sqlite.c file in pecl has an Id string of: 
$Id: sqlite.c,v 1.62.2.25 2004/07/10 12:25:33 wez Exp $ 

By comparison, here's what's in the php source HEAD:
$Id: sqlite.c,v 1.201 2007/01/03 20:49:27 tony2001 Exp $

yikes.
 [2008-01-02 15:27 UTC] jmcgraw1 at gmail dot com
This bug appears to be an easy fix:

http://www.phpbuilder.com/board/archive/index.php/t-10307306.html

So, what is the hold up?
 [2009-02-25 13:52 UTC] phantomcircuit at covertinferno dot org
$ diff -u sqlite.c sqlitefixed.c
--- sqlite.c	2009-02-25 13:51:46.000000000 -0500
+++ sqlitefixed.c	2009-02-25 13:51:51.000000000 -0500
@@ -53,8 +53,6 @@
 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 int le_sqlite_db, le_sqlite_result, le_sqlite_pdb;
 
 static inline void php_sqlite_strtoupper(char *s)
@@ -122,8 +120,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)
 [2009-02-25 14:45 UTC] philip at roshambo dot org
This will [likely] never be fixed. This PECL extension is no longer maintained, and I doubt ever will be. Instead use the well maintained sqlite extension that comes with the PHP sources.

The sqlite pecl page has been updated to reflect this.

See also: http://php.net/pecl.phpize
 [2009-02-25 14:50 UTC] philip at roshambo dot org
Marking as Won't Fix. Use http://bugs.php.net/ if this bug is still a problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC