php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56264 fourth_arg_force_ref undeclared here
Submitted: 2005-01-06 03:14 UTC Modified: 2005-10-23 09:54 UTC
From: php at unixslave dot com Assigned:
Status: Closed Package: xdiff (PECL)
PHP Version: 4.3.2 OS: Mac OS X 10.3.7
Private report: No CVE-ID: None
 [2005-01-06 03:14 UTC] php at unixslave dot com
Description:
------------
I'm trying to build xdiff for my OSX installation and I get errors with that variable.

What is fourth_arg_force_ref and why is it undeclared?  Is my versio too low?

Reproduce code:
---------------
cd /tmp/diff
tar xvzf xdiff-1.2.tgz
cd xdiff-1.2
phpize
./configure

Actual result:
--------------
[[ phpize, configure output ]]
.
.
checking dynamic linker characteristics... darwin7.7.0 dyld
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
Marvin:/tmp/diff/xdiff-1.2 root# make
/bin/sh /tmp/diff/xdiff-1.2/libtool --mode=compile gcc  -I. -I/tmp/diff/xdiff-1.2 -DPHP_ATOM_INC -I/tmp/diff/xdiff-1.2/include -I/tmp/diff/xdiff-1.2/main -I/tmp/diff/xdiff-1.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM -I/usr/local/include  -I/usr/local/include -DHAVE_CONFIG_H  -g -O2  -prefer-pic -c /tmp/diff/xdiff-1.2/xdiff.c -o xdiff.lo 
mkdir .libs
 gcc -I. -I/tmp/diff/xdiff-1.2 -DPHP_ATOM_INC -I/tmp/diff/xdiff-1.2/include -I/tmp/diff/xdiff-1.2/main -I/tmp/diff/xdiff-1.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/diff/xdiff-1.2/xdiff.c  -fno-common -DPIC -o .libs/xdiff.o
/tmp/diff/xdiff-1.2/xdiff.c:109: error: `fourth_arg_force_ref' undeclared here (not in a function)
/tmp/diff/xdiff-1.2/xdiff.c:109: error: initializer element is not constant
/tmp/diff/xdiff-1.2/xdiff.c:109: error: (near initialization for `xdiff_functions[7].func_arg_types')
/tmp/diff/xdiff-1.2/xdiff.c:109: error: initializer element is not constant
/tmp/diff/xdiff-1.2/xdiff.c:109: error: (near initialization for `xdiff_functions[7]')
/tmp/diff/xdiff-1.2/xdiff.c:110: error: initializer element is not constant
/tmp/diff/xdiff-1.2/xdiff.c:110: error: (near initialization for `xdiff_functions[8]')
/tmp/diff/xdiff-1.2/xdiff.c:111: error: `fourth_arg_force_ref' undeclared here (not in a function)
/tmp/diff/xdiff-1.2/xdiff.c:111: error: initializer element is not constant
/tmp/diff/xdiff-1.2/xdiff.c:111: error: (near initialization for `xdiff_functions[9].func_arg_types')
/tmp/diff/xdiff-1.2/xdiff.c:111: error: initializer element is not constant
/tmp/diff/xdiff-1.2/xdiff.c:111: error: (near initialization for `xdiff_functions[9]')
/tmp/diff/xdiff-1.2/xdiff.c:112: error: initializer element is not constant
/tmp/diff/xdiff-1.2/xdiff.c:112: error: (near initialization for `xdiff_functions[10]')
make: *** [xdiff.lo] Error 1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-16 18:05 UTC] jamguo at gmail dot com
Description:
------------
I'm trying to build xdiff for my Debian Sarge and I get the same errors.

Reproduce code:
---------------
tar xzf libxdiff-0.9.tar.gz
cd libxdiff-0.9
./configure --prefix=/usr
make
make check
make install
cd ..

pear install xdiff

Actual result:
--------------
...(omitted)...
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/xdiff-1.2/libtool --mode=compile gcc  -I. -I/tmp/tmpmL0fHf/xdiff-1.2 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/xdiff-1.2/include -I/var/tmp/pear-build-root/xdiff-1.2/main -I/tmp/tmpmL0fHf/xdiff-1.2 -I/usr/include/php4 -I/usr/include/php4/main -I/usr/include/php4/Zend -I/usr/include/php4/TSRM  -DHAVE_CONFIG_H  -g -O2  -prefer-pic -c /tmp/tmpmL0fHf/xdiff-1.2/xdiff.c -o xdiff.lo
mkdir .libs
 gcc -I. -I/tmp/tmpmL0fHf/xdiff-1.2 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/xdiff-1.2/include -I/var/tmp/pear-build-root/xdiff-1.2/main -I/tmp/tmpmL0fHf/xdiff-1.2 -I/usr/include/php4 -I/usr/include/php4/main -I/usr/include/php4/Zend -I/usr/include/php4/TSRM -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpmL0fHf/xdiff-1.2/xdiff.c  -fPIC -DPIC -o .libs/xdiff.o
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:109: error: `fourth_arg_force_ref' undeclared here (not in a function)
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:109: error: initializer element is not constant
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:109: error: (near initialization for `xdiff_functions[7].func_arg_types')
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:109: error: initializer element is not constant
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:109: error: (near initialization for `xdiff_functions[7]')
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:110: error: initializer element is not constant
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:110: error: (near initialization for `xdiff_functions[8]')
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:111: error: `fourth_arg_force_ref' undeclared here (not in a function)
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:111: error: initializer element is not constant
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:111: error: (near initialization for `xdiff_functions[9].func_arg_types')
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:111: error: initializer element is not constant
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:111: error: (near initialization for `xdiff_functions[9]')
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:112: error: initializer element is not constant
/tmp/tmpmL0fHf/xdiff-1.2/xdiff.c:112: error: (near initialization for `xdiff_functions[10]')
make: *** [xdiff.lo] Error 1
 [2005-02-20 20:02 UTC] mg at iceni dot pl
Could you try this patch? 
 
--- xdiff.c     3 Feb 2005 15:45:59 -0000       1.10 
+++ xdiff.c     21 Feb 2005 01:01:02 -0000 
@@ -106,9 +106,18 @@ 
        PHP_FE(xdiff_file_merge3,               NULL) 
        PHP_FE(xdiff_string_diff,               NULL) 
        PHP_FE(xdiff_string_diff_binary,        NULL) 
+#ifdef ZEND_ENGINE_2 
        PHP_FE(xdiff_string_patch,              
fourth_arg_force_ref) 
+#else 
+       PHP_FE(xdiff_string_patch,      NULL) 
+#endif 
        PHP_FE(xdiff_string_patch_binary,       NULL) 
-       PHP_FE(xdiff_string_merge3,             
fourth_arg_force_ref) 
+ 
+#ifdef ZEND_ENGINE_2 
+       PHP_FE(xdiff_string_merge3,             
fourth_arg_force_ref) 
+#else 
+       PHP_FE(xdiff_string_merge3,             NULL) 
+#endif 
        {NULL, NULL, NULL} 
 }; 
 /* }}} */
 [2005-03-11 20:42 UTC] eric at gerlach dot ca
The patch provided works for me on Debian Sarge.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 13:03:33 2021 UTC