Building Gearman 0.27 on CentOS 6

CentOS 6 comes with an outdated version of Gearman, version 0.14 released July 2010. (Ubuntu ships the same version; I wonder if it’s because the download page incorrectly lists 0.14 as the latest version of libgearman?) The latest version is currently 0.27, so I tried compiling it on a fresh install of CentOS. I came across this error:

checking for Boost headers version >= 1.39.0... no
configure: error: cannot find Boost headers version >= 1.39.0

I installed the boost-devel package and tried again… and got the exact same result. The version of boost-devel in CentOS 6 is 1.41, so everything should have been fine. A quick google search revealed some posts by people having trouble compiling Gearman on older CentOS versions because boost was out of date, but that shouldn’t apply here.

I finally found this bug report which revealed the real problem: I didn’t install g++ (found in the gcc-c++ package). Installing the gcc-c++ package fixed the issue. If you’re starting with a fresh CentOS 6 install, make sure to install the gcc and make packages, too.

Finally, if you want to rebuild the CentOS RPM with the newer upstream version, here are the changes I made to the .spec file. Beware: I haven’t tested the RPM or Gearman 0.27 at all yet, I just got it building. Update: I just posted a spec file for the gearman PECL extension, too.

Tagged , , ,

14 thoughts on “Building Gearman 0.27 on CentOS 6

  1. From the spec file, it looks like the configure line was:

    ./configure \
    --disable-static \
    --enable-tcmalloc \
    --enable-libmemcached \

    But I’m not sure about the two –enable lines because the spec file conditionally includes those. I didn’t directly build gearman myself — I installed the source package, made changes to the spec file, then rebuilt the RPM.

  2. Unfortunately, this does not work on CentOS 6.3.

    The `boost-devel` package installs 1.41.0 and the `./configure` still does not see Boost headers (even after a reboot). I am investigating why this is happening.

Leave a Reply

Your email address will not be published. Required fields are marked *