php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59216 pecl install fails due to libgearman unavailability
Submitted: 2010-05-15 05:01 UTC Modified: 2011-05-15 03:13 UTC
From: tumanovsky at gmail dot com Assigned:
Status: Closed Package: gearman (PECL)
PHP Version: 5.2.10 OS: Ubuntu Linux 9.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tumanovsky at gmail dot com
New email:
PHP Version: OS:

 

 [2010-05-15 05:01 UTC] tumanovsky at gmail dot com
Description:
------------
I've installed gearman job server, as described on official site. This package installed libgearman2.

gearmand started, everything is fine.

But trying to install pecl extension or even to make it by hands fails on configure with:

# pecl install channel://pecl.php.net/gearman-0.7.0

checking whether to enable gearman support... yes, shared
not found
configure: error: Please install libgearman



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-01 16:06 UTC] brettstubbs at gmail dot com
I tried pecl install gearman-0.6.0 (as I heard 7 had an issue 
with Ubuntu 9.1), but got the same error after installing 
gearman that configure: error: Please install libgearman. 
Doing a find, I can see that that it is also libgearman2.
 [2010-06-01 16:22 UTC] brettstubbs at gmail dot com
Fixed. So here is how I got it to work (by the way this failed 
when I tried it with gearman-0.7.0). apt-get install 
libgearman-dev then pecl install gearman-0.6.0, and it all 
completed successfully. There is probably a better way to do 
it, but that worked.
 [2010-06-04 04:47 UTC] tumanovsky at gmail dot com
Not helped for me :(

In file included from /tmp/pear/temp/gearman/php_gearman.c:24:
/usr/include/libgearman/gearman.h:28:19: error: event.h: No such file or directory
make: *** [php_gearman.lo] Error 1
ERROR: `make' failed
root@diablo:/var/www#
 [2010-06-04 05:56 UTC] tumanovsky at gmail dot com
0.6.0 installed successfully.
But 0.7.0 gives the new errors:

/root/gearman/gearman-0.7.0/php_gearman.c: In function ?zm_startup_gearman?:
/root/gearman/gearman-0.7.0/php_gearman.c:4467: error: ?GEARMAN_VERBOSE_NEVER? undeclared (first use in this function)
/root/gearman/gearman-0.7.0/php_gearman.c:4467: error: (Each undeclared identifier is reported only once
/root/gearman/gearman-0.7.0/php_gearman.c:4467: error: for each function it appears in.)
make: *** [php_gearman.lo] Error 1
 [2010-07-02 14:53 UTC] email at example dot com
Bare install of Ubuntu Server 10.04

Ran these commands:

sudo bash
apt-get update
apt-get install php5-cli php5-dev pear
apt-get install gearman-job-server libgearman2 libgearman-dev gearman-tools

I can't get gearman 0.6.0 or 0.7.0 to work.

-------------------------------------------------
sudo pecl install "channel://pecl.php.net/gearman-0.6.0"
-------------------------------------------------
running: make
/bin/bash /var/tmp/pear-build-root/gearman-0.6.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/gearman -DPHP_ATOM_INC -I/var/tmp/pear-build-root/gearman-0.6.0/include -I/var/tmp/pear-build-root/gearman-0.6.0/main -I/tmp/pear/temp/gearman -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall   -c /tmp/pear/temp/gearman/php_gearman.c -o php_gearman.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/gearman -DPHP_ATOM_INC -I/var/tmp/pear-build-root/gearman-0.6.0/include -I/var/tmp/pear-build-root/gearman-0.6.0/main -I/tmp/pear/temp/gearman -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -c /tmp/pear/temp/gearman/php_gearman.c  -fPIC -DPIC -o .libs/php_gearman.o
In file included from /tmp/pear/temp/gearman/php_gearman.c:24:
/usr/include/libgearman/gearman.h:28:19: error: event.h: No such file or directory
make: *** [php_gearman.lo] Error 1
ERROR: `make' failed
-------------------------------------------------



-------------------------------------------------
sudo pecl install "channel://pecl.php.net/gearman-0.7.0"
-------------------------------------------------
running: make
/bin/bash /var/tmp/pear-build-root/gearman-0.7.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/gearman -DPHP_ATOM_INC -I/var/tmp/pear-build-root/gearman-0.7.0/include -I/var/tmp/pear-build-root/gearman-0.7.0/main -I/tmp/pear/temp/gearman -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2 -Wall   -c /tmp/pear/temp/gearman/php_gearman.c -o php_gearman.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/gearman -DPHP_ATOM_INC -I/var/tmp/pear-build-root/gearman-0.7.0/include -I/var/tmp/pear-build-root/gearman-0.7.0/main -I/tmp/pear/temp/gearman -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -c /tmp/pear/temp/gearman/php_gearman.c  -fPIC -DPIC -o .libs/php_gearman.o
In file included from /tmp/pear/temp/gearman/php_gearman.c:24:
/usr/include/libgearman/gearman.h:28:19: error: event.h: No such file or directory
/tmp/pear/temp/gearman/php_gearman.c: In function ?zm_startup_gearman?:
/tmp/pear/temp/gearman/php_gearman.c:4467: error: ?GEARMAN_VERBOSE_NEVER? undeclared (first use in this function)
/tmp/pear/temp/gearman/php_gearman.c:4467: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/gearman/php_gearman.c:4467: error: for each function it appears in.)
make: *** [php_gearman.lo] Error 1
ERROR: `make' failed
-------------------------------------------------
 [2010-07-16 12:36 UTC] sam at def dot reyssi dot net
Same situation here with Ubuntu 10.04. I have installed 
Gearman from the C source (not using apt) and tried to 
install pecl gearman using the source manually and using the 
pecl installer unsuccessfully.



downloading gearman-0.7.0.tgz ...
Starting to download gearman-0.7.0.tgz (29,258 bytes)
.........done: 29,258 bytes
3 source files, building
WARNING: php_bin /usr/local/php/bin/php appears to have a 
suffix /bin/php, but config variable php_suffix does not 
match
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
building in /var/tmp/pear-build-root/gearman-0.7.0
running: /tmp/pear/temp/gearman/configure
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-
compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -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 host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -
I/usr/local/php/include/php/main -
I/usr/local/php/include/php/TSRM -
I/usr/local/php/include/php/Zend -
I/usr/local/php/include/php/ext -
I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... 
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... 
/usr/local/php/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... nawk
checking if nawk is broken... no
checking whether to enable gearman support... yes, shared
found in /usr
checking for gearman_client_set_context in -lgearman... yes
checking build system type... x86_64-unknown-linux-gnu
checking for ld used by gcc... /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 object suffix... o
checking for executable suffix... no
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 
1572864
checking command to parse /usr/bin/nm -B output from gcc 
object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc 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
updating cache ./config.cache
creating ./config.status
creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/gearman-0.7.0/libtool --
mode=compile gcc  -I. -I/tmp/pear/temp/gearman -
DPHP_ATOM_INC -I/var/tmp/pear-build-root/gearman-
0.7.0/include -I/var/tmp/pear-build-root/gearman-0.7.0/main 
-I/tmp/pear/temp/gearman -I/usr/local/php/include/php -
I/usr/local/php/include/php/main -
I/usr/local/php/include/php/TSRM -
I/usr/local/php/include/php/Zend -
I/usr/local/php/include/php/ext -
I/usr/local/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -
g -O2 -Wall   -c /tmp/pear/temp/gearman/php_gearman.c -o 
php_gearman.lo
mkdir .libs
 gcc -I. -I/tmp/pear/temp/gearman -DPHP_ATOM_INC -
I/var/tmp/pear-build-root/gearman-0.7.0/include -
I/var/tmp/pear-build-root/gearman-0.7.0/main -
I/tmp/pear/temp/gearman -I/usr/local/php/include/php -
I/usr/local/php/include/php/main -
I/usr/local/php/include/php/TSRM -
I/usr/local/php/include/php/Zend -
I/usr/local/php/include/php/ext -
I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g 
-O2 -Wall -c /tmp/pear/temp/gearman/php_gearman.c  -fPIC -
DPIC -o .libs/php_gearman.o
/tmp/pear/temp/gearman/php_gearman.c: In function 
?zm_startup_gearman?:
/tmp/pear/temp/gearman/php_gearman.c:4467: error: 
?GEARMAN_VERBOSE_NEVER? undeclared (first use in this 
function)
/tmp/pear/temp/gearman/php_gearman.c:4467: error: (Each 
undeclared identifier is reported only once
/tmp/pear/temp/gearman/php_gearman.c:4467: error: for each 
function it appears in.)
make: *** [php_gearman.lo] Error 1
ERROR: `make' failed
 [2010-09-13 12:34 UTC] l dot alberton at quipo dot it
I tried following this tutorial: 

http://ralphschindler.com/2010/05/12/compiling-gearman-or-
anything-for-zend-server-ce-on-snow-leopard

but it failed on one CentOS machine because it couldn't find 
the libgearman library, even if it was in the path specified 
by  --with-gearman. The solution was to patch config.m4, by 
replacing lines 30-38 (i.e. the  PHP_CHECK_LIBRARY() 
function) with just this line:

 -L$GEARMAN_LIB_DIR -R$GEARMAN_LIB_DIR

effectively skipping the check.
 [2010-11-17 20:38 UTC] email at example dot com
Ubuntu 10.04

tried both 0.6.0 and 0.7.0, both manually and using pecl, to 
no avail. i'm getting this error, which someone else has 
posted on this thread: 

/usr/include/libgearman/gearman.h:28:19: error: event.h: No 
such file or
directory

i tried the fix from 2010-09-13, but that didn't change 
anything.

anyone have any other ideas?
 [2011-04-30 22:26 UTC] todayfunny at gmail dot com
In cenOS,
If encounter an error,you can configure it with "--with-gearman="
If encounter an error like "[php_gearman.lo] Error 1",you can cp "php_gearman.loT" to "php_gearman.lo".Then make, you will success.
 [2011-05-15 03:13 UTC] hradtke@php.net
Installing libgearman-dev and libevent-dev will fix these build issues.  You always need the development headers when compiling from source.
 [2012-06-12 11:55 UTC] ali at hubail dot com
With CentOS/Amazon Linux, give Webtatic repo a try:
http://www.webtatic.com/packages/gearmand014/
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jun 03 19:01:24 2020 UTC