php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63335 can't compile
Submitted: 2012-10-22 18:02 UTC Modified: 2012-10-27 17:22 UTC
From: roberto at spadim dot com dot br Assigned: krakjoe (profile)
Status: Closed Package: pthreads (PECL)
PHP Version: 5.4.8 OS: archlinux, kernel 3.4.6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: roberto at spadim dot com dot br
New email:
PHP Version: OS:

 

 [2012-10-22 18:02 UTC] roberto at spadim dot com dot br
Description:
------------
well, i can just explain showing the error...

[root@SPADIM-DELL ~]# pecl install channel://pecl.php.net/pthreads-0.0.35
downloading pthreads-0.0.35.tgz ...
Starting to download pthreads-0.0.35.tgz (31,117 bytes)
.........done: 31,117 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
building in /tmp/pear/temp/pear-build-root8WwmUs/pthreads-0.0.35
running: /tmp/pear/temp/pthreads/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... /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/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 whether to enable pthreads extension... yes, shared
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 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 -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/sh /tmp/pear/temp/pear-build-root8WwmUs/pthreads-0.0.35/libtool --
mode=compile cc  -I. -I/tmp/pear/temp/pthreads -DPHP_ATOM_INC -
I/tmp/pear/temp/pear-build-root8WwmUs/pthreads-0.0.35/include -
I/tmp/pear/temp/pear-build-root8WwmUs/pthreads-0.0.35/main -
I/tmp/pear/temp/pthreads -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/pthreads/php_pthreads.c -o php_pthreads.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/pthreads -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-
root8WwmUs/pthreads-0.0.35/include -I/tmp/pear/temp/pear-build-
root8WwmUs/pthreads-0.0.35/main -I/tmp/pear/temp/pthreads -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/pthreads/php_pthreads.c  -fPIC -DPIC -o .libs/php_pthreads.o
/tmp/pear/temp/pthreads/php_pthreads.c:23:3: error: #error "pthreads requires 
that Thread Safety is enabled, add --enable-maintainer-zts to your PHP build 
configuration"
In file included from /tmp/pear/temp/pthreads/php_pthreads.c:279:0:
/tmp/pear/temp/pthreads/pthreads_object.h: In function 'pthreads_pop':
/tmp/pear/temp/pthreads/pthreads_object.h:393:6: error: 'executor_globals_id' 
undeclared (first use in this function)
/tmp/pear/temp/pthreads/pthreads_object.h:393:6: note: each undeclared 
identifier is reported only once for each function it appears in
In file included from /tmp/pear/temp/pthreads/php_pthreads.c:279:0:
/tmp/pear/temp/pthreads/pthreads_object.h: In function 
'pthreads_attach_to_instance':
/tmp/pear/temp/pthreads/pthreads_object.h:527:16: error: 'tsrm_ls' undeclared 
(first use in this function)
/tmp/pear/temp/pthreads/pthreads_object.h: In function 
'pthreads_attach_to_import':
/tmp/pear/temp/pthreads/pthreads_object.h:611:15: error: 'tsrm_ls' undeclared 
(first use in this function)
/tmp/pear/temp/pthreads/pthreads_object.h: In function 'PHP_PTHREAD_ROUTINE':
/tmp/pear/temp/pthreads/pthreads_object.h:815:20: warning: assignment makes 
pointer from integer without a cast [enabled by default]
/tmp/pear/temp/pthreads/pthreads_object.h:883:24: error: 'sapi_globals_id' 
undeclared (first use in this function)
/tmp/pear/temp/pthreads/pthreads_object.h:1130:5: error: too few arguments to 
function 'php_request_shutdown'
In file included from /tmp/pear/temp/pthreads/php_pthreads.h:34:0,
                 from /tmp/pear/temp/pthreads/php_pthreads.c:20:
/usr/include/php/main/php_main.h:31:13: note: declared here
make: *** [php_pthreads.lo] Error 1
ERROR: `make' failed


Test script:
---------------
see description

Expected result:
----------------
should compile, but i think it's only for 5.3.xxxx maybe could upgrade to 5.4.xxxx 
?

Actual result:
--------------
can't compile

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-24 07:14 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2012-10-24 07:14 UTC] krakjoe@php.net
You do not have ZTS enabled on your build. pthreads requires a thread safe build 
of PHP.
 [2012-10-24 13:40 UTC] roberto at spadim dot com dot br
i'm tryng to run it in cli mode, does it need thread safe?
 [2012-10-27 17:22 UTC] krakjoe@php.net
Yes.
 [2012-10-30 12:23 UTC] roberto at spadim dot com dot br
hi, since i don't know the source... any idea if it could run without zts? i only 
have it in cli mode and only use on cli, no apache, no cgi, no gtk

if really no, i will contact archlinux to make a zts version and a nonzts version
 [2012-11-02 01:39 UTC] krakjoe@php.net
You must have ZTS for pthreads to work, in any environment.
 [2012-11-02 03:07 UTC] roberto at spadim dot com dot br
OK guy :) thanks i will contact guys at archlinux :)
in future version maybe this could be removed? or ZTS allow you create threads 
without killing hte mutex and others zend logic?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC