php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61241 Cannot build extension
Submitted: 2012-03-02 09:15 UTC Modified: 2012-06-12 19:17 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: laacz at laacz dot lv Assigned: tony2001 (profile)
Status: Closed Package: sphinx (PECL)
PHP Version: 5.4.0 OS: Ubuntu OneiricOcelot
Private report: No CVE-ID: None
 [2012-03-02 09:15 UTC] laacz at laacz dot lv
Description:
------------
Cannot build sphinx extension after PHP upgrade to PHP 5.4.0

Test script:
---------------
pecl install -f sphinx

Expected result:
----------------
Successful build.

Actual result:
--------------
root@zuze:~# pecl install -f sphinx
downloading sphinx-1.1.0.tgz ...
Starting to download sphinx-1.1.0.tgz (12,870 bytes)
.....done: 12,870 bytes
4 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Please provide the installation prefix of libsphinxclient [autodetect] :
building in /tmp/pear/temp/pear-build-root39PsZ1/sphinx-1.1.0
running: /tmp/pear/temp/sphinx/configure --with-sphinx
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-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/extensions/no-debug-non-
zts-20100525
checking for PHP installed headers prefix... /usr/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... gawk
checking for sphinx support... yes, shared
checking for libsphinxclient headers in default path... found in /usr
checking for sphinx_create in -lsphinxclient... yes
checking for sphinx_set_select in -lsphinxclient... yes
checking for sphinx_get_string in -lsphinxclient... no
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 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... 1572864
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 supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) 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

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-root39PsZ1/sphinx-1.1.0/libtool --
mode=compile cc  -I. -I/tmp/pear/temp/sphinx -DPHP_ATOM_INC -
I/tmp/pear/temp/pear-build-root39PsZ1/sphinx-1.1.0/include -
I/tmp/pear/temp/pear-build-root39PsZ1/sphinx-1.1.0/main -I/tmp/pear/temp/sphinx 
-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/temp/sphinx/sphinx.c -o sphinx.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/sphinx -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-
root39PsZ1/sphinx-1.1.0/include -I/tmp/pear/temp/pear-build-root39PsZ1/sphinx-
1.1.0/main -I/tmp/pear/temp/sphinx -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/temp/sphinx/sphinx.c  -fPIC -DPIC -o .libs/sphinx.o
/tmp/pear/temp/sphinx/sphinx.c: In function ‘php_sphinx_client_read_property’:
/tmp/pear/temp/sphinx/sphinx.c:105:2: error: too few arguments to function 
‘std_hnd->read_property’
/tmp/pear/temp/sphinx/sphinx.c: In function ‘zim_SphinxClient_updateAttributes’:
/tmp/pear/temp/sphinx/sphinx.c:1040:6: warning: passing argument 2 of ‘memset’ 
makes integer from pointer without a cast [enabled by default]
/usr/include/x86_64-linux-gnu/bits/string3.h:77:1: note: expected ‘int’ but 
argument is of type ‘void *’
/tmp/pear/temp/sphinx/sphinx.c: In function ‘zm_startup_sphinx’:
/tmp/pear/temp/sphinx/sphinx.c:1888:43: warning: assignment from incompatible 
pointer type [enabled by default]
make: *** [sphinx.lo] Error 1
ERROR: `make' failed



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-09 16:05 UTC] frankkessler at gmail dot com
I'm seeing this same error, however I am using php 5.3.10. I believe my issue 
stems from an upgrade to Sphinx 2.0.4.
 [2012-03-12 09:07 UTC] frizzy at paperjaw dot com
I am getting the same error on Natty Narwhal 64-bit and Basic Amazon Linux AMI 
2011.09 32-bit (Red Hat based) using Sphinx v.0.9.9. This problem did not occur 
anywhere while using PHP <= 5.3.8
 [2012-03-19 06:12 UTC] htaykhaing at gmail dot com
I'm getting same error too. My environment is PHP 5.3.6 ,Mac OS X 10.7, MAMP . Is 
there any solution to that issue?
Thanks.
HK
 [2012-03-19 06:12 UTC] htaykhaing at gmail dot com
I'm getting same error too. My environment is PHP 5.3.6 ,Mac OS X 10.7, MAMP . Is 
there any solution to that issue?
Thanks.
HK
 [2012-03-19 08:46 UTC] andrew at cbtech dot co dot uk
If you change line 105 of sphinx.c from:

retval = std_hnd->read_property(object, member, type TSRMLS_CC);

to 

retval = std_hnd->read_property(object, member, type TSRMLS_CC, NULL);

it compiles and seems to work.
 [2012-03-19 09:07 UTC] htaykhaing at gmail dot com
@ andrew 
Thank you for kind help..
I've tried to recompile again after changing what you advised but I'm getting 
same error.
Here's stack trace:

Jias-Mac-mini:sphinx-1.1.0 khaing$ sudo make
/bin/sh /Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/libtool --
mode=compile cc  -I. -I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0 -
DPHP_ATOM_INC -I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/include -
I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/main -
I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0 -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 -I/opt/sphinx/include  -
DHAVE_CONFIG_H  -g -O2   -c /Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-
1.1.0/sphinx.c -o sphinx.lo 
 cc -I. -I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0 -DPHP_ATOM_INC 
-I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/include -
I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/main -
I/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0 -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 -I/opt/sphinx/include -
DHAVE_CONFIG_H -g -O2 -c /Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-
1.1.0/sphinx.c  -fno-common -DPIC -o .libs/sphinx.o
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c: In function 
'php_sphinx_client_read_property':
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c:106: error: too 
many arguments to function 'std_hnd->read_property'
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c: In function 
'zim_SphinxClient_setRankingMode':
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c:773: error: too 
few arguments to function 'sphinx_set_ranking_mode'
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c: In function 
'zim_SphinxClient_updateAttributes':
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c:1041: warning: 
passing argument 2 of '__builtin___memset_chk' makes integer from pointer 
without a cast
/Users/khaing/hk/mydocuments/sphinx-1.1.0/sphinx-1.1.0/sphinx.c:1041: warning: 
passing argument 2 of '__inline_memset_chk' makes integer from pointer without a 
cast
 [2012-06-12 19:17 UTC] tony2001@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-06-12 19:17 UTC] tony2001@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: tony2001
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 00:03:49 2021 UTC