Cannot compile on CentOS due to boost

1,248 views
Skip to first unread message

Tim Yim

unread,
Oct 4, 2011, 12:58:13 PM10/4/11
to gearman
If trying to install the latest gearman on CentOS 5.x but are having
problems with boost, make sure you:

$ yum install boost141-devel
$ ln -s /usr/include/boost141/boost/ /usr/include/boost
$ export LDFLAGS="-L/usr/lib64/boost141"
$ export LD_LIBRARY_PATH=/usr/lib64/boost141:$LD_LIBRARY_PATH

Then, everything should work fine.

$ ./configure
$ make
$ make install

Maybe we can get the gearman devs to automatically recognize where
boost is installed???

Tim

Chris Smith

unread,
Mar 14, 2012, 9:42:31 PM3/14/12
to gea...@googlegroups.com
Thanks Tim!

This has helped me with CentOS 5.6.

Now I get this error on make:


  CCLD   libhostile/libhostile.la
  CXX    benchmark/benchmark.lo
benchmark/benchmark.cc: In function 'void benchmark_check_time(gearman_benchmark_st*)':
benchmark/benchmark.cc:30: error: expected `)' before 'PRIu64'
benchmark/benchmark.cc:40: warning: conversion lacks type at end of format [-Wformat]
benchmark/benchmark.cc:40: warning: too many arguments for format [-Wformat-extra-args]
make[1]: *** [benchmark/benchmark.lo] Error 1
make[1]: Leaving directory `/gearman-stuff/gearmand-0.28'
make: *** [all] Error 2

Chris Smith

unread,
Mar 14, 2012, 10:24:33 PM3/14/12
to gea...@googlegroups.com
For record's sake: I did find out how to fix ALL the installation issues.



Copy in case links break in the future: 

Hello,

I have had just the most horrible time compiling Gearman 0.28.   I understand this fix has been committed in 0.29, but for this is for people who had the same problems as I have.

I am running the following CentOS and cPanel versions:

# uname -a
Linux 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/redhat-release
CentOS release 5.8 (Final)

# /usr/local/cpanel/cpanel -V
11.30.6 (build 4)


I could not install using "pecl install gearman" because it errors at libgearman not installed.  I could not install libgearman because Boost was not up-to-date.  After updating Boost, I could not make Gearman 0.28 because of this bug.

Here are the steps I did to fix the errors:


*****Fix Boost 1.39 >= must be installed issue*****:

1. Download epel-release-5-4.noarch.rpm (or suitable version) from http://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F

2. Install the EPEL repo list using "rpm -Uvh epel-release-5-4.noarch.rpm"

3. yum install boost141-devel

4. ln -s /usr/include/boost141/boost/ /usr/include/boost 

5. export LDFLAGS="-L/usr/lib64/boost141" 

6. export LD_LIBRARY_PATH=/usr/lib64/boost141:$LD_LIBRARY_PATH 

*****Fix Gearman benchmark.lo error (before 0.29) *****:
1. yum install gcc44 gcc-c++

2. export CC="gcc44"

3. export CXX="g++44"


*****Configure, Make, Make Install (no rinsing or repeating)*****:
1. ./configure in your gearman folder after using wget for the current release

2. make

3. make install

*****INSTALL THE PECL EXTENSION!!! YAY!*****:
1. pecl install gearman

If you're running cPanel 11.31.2.x and lower, like me, you will have to copy it to the correct location due to a cPanel bug.

2. cp gearman.so /usr/local/lib/php/extensions/no-debug-non-zts-20090626 (for me - check yours!)

3. chmod 775 gearman.so for good measure!

More importantly, give me a call if you need any help... seriously.  This was the biggest pain in the ass and I'm a newbie in the Linux world.

Number can be found at http://www.cgsmith.net/

Thanks guys!
Chris Smith

On Tuesday, October 4, 2011 11:58:13 AM UTC-5, Tim Yim wrote:
Reply all
Reply to author
Forward
0 new messages