Building Gearman under Red Hat Enterprise 4 (RHEL4) or older CentOS-versions

While building gearman on our older RHEL4 servers, there was two issues that surfaced:

  • The version of boost included in RHEL4 is too old (1.32) for gearman. I decided to download the new boost version (1.48.0 at the time of writing) and install it. Be sure to remove the old version with rpm -e boost-devel, so that you don’t get strange conflicts while attempting to build the benchmark tools:
    benchmark/ undefined reference to 
    benchmark/ undefined reference to 
  • Issues while trying to build the tests/ directory:

    tests/ In function `test_return_t worker_ramp_TEST(void*)':
    tests/ error: `pthread_timedjoin_np' was not declared in this scope
    tests/ warning: unused variable 'pthread_timedjoin_np'
    make: *** [tests/stress_worker.o] Error 1

    This can be solved by removing the whole section enclosed in the #ifdef _GNU_SOURCE
    section. Let the content in the #else-part in place. Removing this will not affect the usual (and any important parts of it) gearman distribution in any way.

The configure / make process of gearman needs a way to exclude the benchmark/ and tests/ parts of the project from being built.