php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65606 Due to errors in the bcompiler code, it's uncompilable.
Submitted: 2013-09-02 19:49 UTC Modified: 2015-08-03 21:33 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:1 (20.0%)
From: ingwie2000 at googlemail dot com Assigned: cmb (profile)
Status: Duplicate Package: bcompiler (PECL)
PHP Version: 5.5.3 OS: Mac OS X 10.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ingwie2000 at googlemail dot com
New email:
PHP Version: OS:

 

 [2013-09-02 19:49 UTC] ingwie2000 at googlemail dot com
Description:
------------
I am unable to compile bcompiler into PHP. It appears to me as this is being 
caused by some mis-haps with the bcompiler-code.

Test script:
---------------
cd php-5.5.3/ext
git clone https://github.com/krakjoe/pthreads.git
curl -O http://pecl.php.net/get/bcompiler
tar xvfz bcompiler
rm package.xml
mv bcompiler-1.0.2 bcompiler
cd ..
make distclean
rm configure
./buildconf --force
./configure --prefix=$HOME/compiles/ \
	--disable-all \
	--enable-static \
	--with-config-file-path="" \
	--with-config-file-scan-dir="" \
	--enable-maintainer-zts \
	--enable-pthreads \
	--with-bz2 \
	--enable-bcompiler \
	--enable-libxml \
	--enable-xml \
	--with-curl \
	--enable-ftp \
	--with-gd \
	--enable-intl \
	--enable-mbstring \
	--with-mcrypt \
	--enable-embedded-mysqli \
	--enable-soap \
	--with-tidy \
	--enable-wddx \
	--enable-zip \
	--with-pear \
	--enable-opcache \
	--with-tsrm-pth=pth-config \
	--with-tsrm-pthreads && make && make test

Expected result:
----------------
A successful compile of PHP with bcompiler (it worked flawlessly with pthreads 
before).

Actual result:
--------------
/Users/Ingwie/Downloads/php-5.5.3/ext/bcompiler/php_bcompiler.c:468:28: warning: 
passing 'const char *' to parameter of type 'char *' discards qualifiers [-
Wincompatible-pointer-types]
                                        apc_serialize_zstring(pos->arKey, pos-
>nKeyLength TSRMLS_CC);
                                                              ^~~~~~~~~~
ext/bcompiler/php_bcompiler.h:298:34: note: passing argument to parameter 'string' 
here
void apc_serialize_zstring(char* string, int len TSRMLS_DC);
                                 ^
/Users/Ingwie/Downloads/php-5.5.3/ext/bcompiler/php_bcompiler.c:574:12: error: no 
member named 'filename' in 'struct _zend_class_entry'
                        if (zc->filename && strcmp(zc->filename, real_path) == 0)
                            ~~  ^
/Users/Ingwie/Downloads/php-5.5.3/ext/bcompiler/php_bcompiler.c:574:35: error: no 
member named 'filename' in 'struct _zend_class_entry'
                        if (zc->filename && strcmp(zc->filename, real_path) == 0)
                                                   ~~  ^
/Users/Ingwie/Downloads/php-5.5.3/ext/bcompiler/php_bcompiler.c:581:49: warning: 
passing 'const char *' to parameter of type 'char *' discards qualifiers [-
Wincompatible-pointer-types]
                                apc_serialize_zend_class_entry(zc, NULL, 0, pos-
>arKey, pos->nKeyLength TSRMLS_CC);
                                                                            
^~~~~~~~~~
ext/bcompiler/php_bcompiler.h:305:114: note: passing argument to parameter 
'force_key' here
void apc_serialize_zend_class_entry(zend_class_entry* zce , char* 
force_parent_name, int force_parent_len, char* force_key, int force_key_len 
TSRMLS_DC);
                                                                                                                 
^
/Users/Ingwie/Downloads/php-5.5.3/ext/bcompiler/php_bcompiler.c:635:12: error: no 
member named 'filename' in 'struct _zend_class_entry'
                        if (zc->filename && strcmp(zc->filename, real_path) == 0)
                            ~~  ^
/Users/Ingwie/Downloads/php-5.5.3/ext/bcompiler/php_bcompiler.c:635:35: error: no 
member named 'filename' in 'struct _zend_class_entry'
                        if (zc->filename && strcmp(zc->filename, real_path) == 0)
                                                   ~~  ^
2 warnings and 4 errors generated.
make: *** [ext/bcompiler/php_bcompiler.lo] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-09 09:19 UTC] bugs dot php dot net at javasys dot net
Using Xampp 1.8.3-1 on OS X v10.6.8, attempting to compile bcomplier like this:

test:bcompiler-1.0.2 paul$ /Applications/XAMPP/xamppfiles/bin/phpize
Configuring for:PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
test:bcompiler-1.0.2 paul$ CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' LDFLAGS='-arch x86_64' ./configure  --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config 
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 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 ISO C89... 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... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking target system type... x86_64-apple-darwin10.8.0
checking for PHP prefix... /Applications/XAMPP/xamppfiles
checking for PHP includes... -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib
checking for PHP extension directory... /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /Applications/XAMPP/xamppfiles/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable bcompiler support... yes, shared
checking whether to include debug code in bcompiler (default: no)... no
checking for ld used by cc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.8.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
configure: creating ./config.status
config.status: creating config.h
test:bcompiler-1.0.2 paul$ make
/bin/sh /Users/paul/Documents/bcompiler-1.0.2/libtool --mode=compile cc  -I. -I/Users/paul/Documents/bcompiler-1.0.2 -DPHP_ATOM_INC -I/Users/paul/Documents/bcompiler-1.0.2/include -I/Users/paul/Documents/bcompiler-1.0.2/main -I/Users/paul/Documents/bcompiler-1.0.2 -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib  -DHAVE_CONFIG_H  -arch x86_64   -c /Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c -o php_bcompiler.lo 
mkdir .libs
 cc -I. -I/Users/paul/Documents/bcompiler-1.0.2 -DPHP_ATOM_INC -I/Users/paul/Documents/bcompiler-1.0.2/include -I/Users/paul/Documents/bcompiler-1.0.2/main -I/Users/paul/Documents/bcompiler-1.0.2 -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -DHAVE_CONFIG_H -arch x86_64 -c /Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c  -fno-common -DPIC -o .libs/php_bcompiler.o
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c: In function ‘_bcompiler_write_functions_from_file’:
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c:468: warning: passing argument 1 of ‘apc_serialize_zstring’ discards qualifiers from pointer target type
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c: In function ‘zif_bcompiler_write_file’:
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c:574: error: ‘zend_class_entry’ has no member named ‘filename’
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c:574: error: ‘zend_class_entry’ has no member named ‘filename’
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c:581: warning: passing argument 4 of ‘apc_serialize_zend_class_entry’ discards qualifiers from pointer target type
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c:635: error: ‘zend_class_entry’ has no member named ‘filename’
/Users/paul/Documents/bcompiler-1.0.2/php_bcompiler.c:635: error: ‘zend_class_entry’ has no member named ‘filename’
make: *** [php_bcompiler.lo] Error 1
test:bcompiler-1.0.2 paul$ 

This same process used to work for previous PHP versions, so it seems to be bcompiler is incompatible with 
PHP Api Version: 20121113 / Zend Module Api No: 20121212 / Zend Extension Api No: 220121212
 [2015-08-03 21:33 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-08-03 21:33 UTC] cmb@php.net
Duplicate of bug #60618.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC