2

I've been trying to get Gearman compiled on CentOS 5.8 all afternoon.

Searches have said to install the following via yum:

yum -y install --enablerepo=remi boost141-devel libgearman-devel e2fsprogs-devel e2fsprogs gcc44 gcc-c++ 

To get the Boost headers working correctly I did this:

 cp -f /usr/lib/boost141/* /usr/lib/ cp -f /usr/lib64/boost141/* /usr/lib64/ rm -f /usr/include/boost ln -s /usr/include/boost141/boost /usr/include/boost 

With all of the dependancies installed and paths setup I then download and compile gearmand-1.1.2 just fine.

 wget -O /tmp/gearmand-1.1.2.tar.gz https://launchpad.net/gearmand/1.2/1.1.2/+download/gearmand-1.1.2.tar.gz cd /tmp && tar zxvf gearmand-1.1.2.tar.gz ./configure && make -j8 && make install 

That works correctly. So now I need to install the Gearman library for PHP. I have attempted through PECL and downloading the source directly, both result in the same error:

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

What I don't understand is I installed the libgearman-devel package which also installed the core libgearman. The installation installs libgearman-devel-0.14-3.el5.x86_64, libgearman-devel-0.14-3.el5.i386, libgearman-0.14-3.el5.x86_64, and libgearman-0.14-3.el5.i386.

Is it possible the package version is lower than what is required? I'm still poking around with this, but figured I'd throw this up to see if anyone has a solution while I continue to research a fix.

Thanks!

7
  • 5
    gearmand is in the EPEL repo for EL5. For that matter, php-pecl-gearman is in remi. Why did you download your own? This is too much trouble for nothing. Commented Oct 22, 2012 at 20:43
  • I have a custom compiled PHP version. Installing php-pecl-gearman brings down packaged PHP versions which will conflict with my version already installed. So far the PHP library is the only thing I can't get compiled. And why the ./configure is not seeing the libgearman is beyond me. libgearman's headers are indeed located at /usr/include/libgearman... Commented Oct 22, 2012 at 20:49
  • It may also be worth noting that using ./configure --with-gearman=/usr/include/libgearman also results in the same error. Commented Oct 22, 2012 at 20:52
  • OK, so your web app is so old it won't run on PHP 5.3? That sucks. It would probably be easier to fix the web app and use the remi-packaged PHP (5.3.18 as of today). Commented Oct 22, 2012 at 20:53
  • 1
    Ouch. (You know remi-test has PHP 5.4 as well...) Doing this yourself is almost always going to backfire. Commented Oct 22, 2012 at 20:56

2 Answers 2

3

This should do the trick:

export GEARMAN_LIB_DIR=/usr/include/libgearman export GEARMAN_INC_DIR=/usr/include/libgearman 

That should work, if not you'll have to do some minor edits to config.m4.

0
2

Some other helpful notes regarding this can be found here: http://gearman.info/build/centos5-8.html

And based on link above and random googling around this has worked for me without messing lib/include folders:

yum install boost141 boost141-devel gcc44 gcc44-c++ uuid-devel export CC="gcc44" export CFLAGS="-std=gnu99" export CXX="gcc44-c++" export CPPFLAGS="-I/usr/include/boost141" export LDFLAGS="-L/usr/lib64/boost141" CC=gcc44 CXX=g++44 ./configure make make install 

UPDATE: Epel has recently updated to gearmand / libgearman 1.1.8 which is very recent compared to the version they had before (0.14?). So there should be no need to compile it by yourself (except the php pecl extension of course).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.