Compiling gearman on CentOS 5.6

2660 views
Skip to first unread message

news...@syslog.com

unread,
Jul 6, 2011, 11:47:23 AM7/6/11
to gearman
I'm having a lot of trouble getting gearman 0.23 to compile on CentOS
5.6. The configure script will complete but it won't recognize the
libdrizzle libraries.

I found a post describing how to compile version 0.22, but it errors
at this point:

make all-am
make[1]: Entering directory `/home/jwilson/gearmand-0.23'
CXX libgearman/libgearman_libgearman_la-actions.lo
CXX libgearman/libgearman_libgearman_la-aggregator.lo
CXX libgearman/libgearman_libgearman_la-allocator.lo
CXX libgearman/libgearman_libgearman_la-argument.lo
CXX libgearman/libgearman_libgearman_la-add.lo
libgearman/add.cc: In function 'gearman_task_st*
add_task(gearman_client_st*, gearman_task_st*, void*,
gearman_command_t, const gearman_string_t&, const gearman_unique_t&,
const gearman_string_t&, time_t, gearman_actions_t&)':
libgearman/add.cc:116: error: aggregate 'uuid_t uuid' has incomplete
type and cannot be defined
libgearman/add.cc:166: error: 'uuid_generate' was not declared in this
scope
libgearman/add.cc:167: error: 'uuid_unparse' was not declared in this
scope
libgearman/add.cc: In function 'gearman_task_st*
add_reducer_task(gearman_client_st*, gearman_command_t,
gearman_job_priority_t, const gearman_string_t&, const
gearman_string_t&, const gearman_unique_t&, const gearman_string_t&,
gearman_actions_t&, time_t, void*)':
libgearman/add.cc:225: error: aggregate 'uuid_t uuid' has incomplete
type and cannot be defined
libgearman/add.cc:275: error: 'uuid_generate' was not declared in this
scope
libgearman/add.cc:276: error: 'uuid_unparse' was not declared in this
scope
make[1]: *** [libgearman/libgearman_libgearman_la-add.lo] Error 1
make[1]: Leaving directory `/home/jwilson/gearmand-0.23'
make: *** [all] Error 2

to get it that far I had to symlink uuid.h from /usr/lib to /usr/lib/
uuid/uuid.h as no matter how I formatted the uuid option in configure,
it refused to look anywhere else.

Can someone help me get gearmand running with libdrizzle support?

Song David

unread,
Jul 6, 2011, 9:30:14 PM7/6/11
to gea...@googlegroups.com
  You can find uuid's lib in http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.14.tar.gz , you can download this, configure/make , then you will find libuuid.a  under lib. You can copy it to /usr/lib to use. Now everthing will OK. 

news...@syslog.com

unread,
Jul 7, 2011, 11:20:38 AM7/7/11
to gearman


On Jul 6, 9:30 pm, Song David <heven...@gmail.com> wrote:
>   You can find uuid's lib inhttp://downloads.sourceforge.net/e2fsprogs/*
> e2fsprogs-*1.41.14.tar.gz<http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.14.tar.gz> ,
> you can download this, configure/make , then you will find libuuid.a  under
> lib. You can copy it to /usr/lib to use. Now everthing will OK.

I did that but still get compile errors. I did manage to get 0.22 to
compile so I am trying that out.

geocine

unread,
Aug 16, 2011, 1:28:50 PM8/16/11
to gearman


On Jul 7, 11:20 pm, "newsgr...@syslog.com" <newsgr...@syslog.com>
wrote:
Hi Song,

How did you manage to compile 0.22 . I am trying to compile 0.22 on my
64bit cent OS 5.6. I get this error on make:

configure: error: cannot find boost/program_options.hpp

Herman Radtke

unread,
Aug 16, 2011, 3:37:30 PM8/16/11
to gea...@googlegroups.com
>> I did that but still get compile errors.  I did manage to get 0.22 to
>> compile so I am trying that out.
>
> Hi Song,
>
> How did you manage to compile 0.22 . I am trying to compile 0.22 on my
> 64bit cent OS 5.6. I get this error on make:
>
> configure: error: cannot find boost/program_options.hpp

Boost libraries on CentOS are a nightmare. I am still trying to find a
solution that compiles and passes the tests without segfaulting.


--
Herman Radtke
herman...@gmail.com | http://hermanradtke.com

geocine

unread,
Aug 16, 2011, 6:55:12 PM8/16/11
to gearman
Yeah but you said you managed to make 0.22 work but how?
> hermanrad...@gmail.com |http://hermanradtke.com

Bradley Falzon

unread,
Aug 16, 2011, 7:48:06 PM8/16/11
to gea...@googlegroups.com
FYI, these are our steps for gearman on CentOS 6.

yum install gcc gcc-c++ make boost-devel libevent-devel.x86_64
libuuid-devel sqlite-devel.x86_64
cd /usr/local/
wget http://launchpad.net/gearmand/trunk/0.23/+download/gearmand-0.23.tar.gz
tar xvzf gearmand-0.23.tar.gz
ln -s gearmand-0.23 gearmand
cd gearmand
./configure
make

useradd -M gearmand
mkdir /var/run/gearmand
sed -i 's:/usr/sbin/gearmand:/usr/local/gearmand/gearmand/gearmand:'
support/gearmand.init
cp support/gearmand.init /etc/init.d/gearmand
chmod a+x /etc/init.d/gearmand
chkconfig gearmand on

This obviously doesn't do a make install, instead we run it out of
/usr/local/germand/ which symlinks to the current version downloaded.

--
Bradley Falzon
br...@teambrad.net

geocine

unread,
Aug 16, 2011, 7:51:29 PM8/16/11
to gearman
Thanks,

does libdrizzle work?

On Aug 17, 7:48 am, Bradley Falzon <b...@teambrad.net> wrote:
> FYI, these are our steps for gearman on CentOS 6.
>
> yum install gcc gcc-c++ make boost-devel libevent-devel.x86_64
> libuuid-devel sqlite-devel.x86_64
> cd /usr/local/
> wgethttp://launchpad.net/gearmand/trunk/0.23/+download/gearmand-0.23.tar.gz
> b...@teambrad.net

Herman Radtke

unread,
Aug 16, 2011, 7:53:39 PM8/16/11
to gea...@googlegroups.com
> FYI, these are our steps for gearman on CentOS 6.
>
> yum install gcc gcc-c++ make boost-devel libevent-devel.x86_64
> libuuid-devel sqlite-devel.x86_64
> cd /usr/local/
> wget http://launchpad.net/gearmand/trunk/0.23/+download/gearmand-0.23.tar.gz
> tar xvzf gearmand-0.23.tar.gz
> ln -s gearmand-0.23 gearmand
> cd gearmand
> ./configure
> make
>
> useradd -M gearmand
> mkdir /var/run/gearmand
> sed -i 's:/usr/sbin/gearmand:/usr/local/gearmand/gearmand/gearmand:'
> support/gearmand.init
> cp support/gearmand.init /etc/init.d/gearmand
> chmod a+x /etc/init.d/gearmand
> chkconfig gearmand on
>
> This obviously doesn't do a make install, instead we run it out of
> /usr/local/germand/ which symlinks to the current version downloaded.

These steps do not work for me. Standard CentOS 5.6 ships with boost 1.37.

Here is what I did to install 0.24:

yum install boost141 boost141--devel
cd /usr/lib/boost141 && cp * ../
cd /usr/lib64/boost141 && cp * ../
cd /usr/include && ln -s boost141/boost/

now configure and make as normal

Bradley Falzon

unread,
Aug 16, 2011, 8:00:29 PM8/16/11
to gea...@googlegroups.com
On Wed, Aug 17, 2011 at 9:21 AM, geocine <geoc...@gmail.com> wrote:
> Thanks,
>
> does libdrizzle work?
>

My apologies, I didn't see your original post was related directly to
libdrizzle. We haven't used libdrizzle itself, that configuration was
using sqlite only.

--
Bradley Falzon
br...@teambrad.net

geocine

unread,
Aug 16, 2011, 8:26:25 PM8/16/11
to gearman
does libdrizzle work ? thanks :)

On Aug 17, 7:53 am, Herman Radtke <hermanrad...@gmail.com> wrote:
> > FYI, these are our steps for gearman on CentOS 6.
>
> > yum install gcc gcc-c++ make boost-devel libevent-devel.x86_64
> > libuuid-devel sqlite-devel.x86_64
> > cd /usr/local/
> > wgethttp://launchpad.net/gearmand/trunk/0.23/+download/gearmand-0.23.tar.gz
> > tar xvzf gearmand-0.23.tar.gz
> > ln -s gearmand-0.23 gearmand
> > cd gearmand
> > ./configure
> > make
>
> > useradd -M gearmand
> > mkdir /var/run/gearmand
> > sed -i 's:/usr/sbin/gearmand:/usr/local/gearmand/gearmand/gearmand:'
> > support/gearmand.init
> > cp support/gearmand.init /etc/init.d/gearmand
> > chmod a+x /etc/init.d/gearmand
> > chkconfig gearmand on
>
> > This obviously doesn't do a make install, instead we run it out of
> > /usr/local/germand/ which symlinks to the current version downloaded.
>
> These steps do not work for me. Standard CentOS 5.6 ships with boost 1.37.
>
> Here is what I did to install 0.24:
>
> yum install boost141 boost141--devel
> cd /usr/lib/boost141 && cp * ../
> cd /usr/lib64/boost141 && cp * ../
> cd /usr/include && ln -s boost141/boost/
>
> now configure and make as normal
>
> --
> Herman Radtke
> hermanrad...@gmail.com |http://hermanradtke.com

Bradley Falzon

unread,
Aug 16, 2011, 9:18:44 PM8/16/11
to gea...@googlegroups.com
On Wed, Aug 17, 2011 at 9:56 AM, geocine <geoc...@gmail.com> wrote:
> does libdrizzle work ? thanks :)
>

We don't use libdrizzle, however, no reason why
http://docs.drizzle.org/installing/from_source.html#compiling-the-source
wouldn't work.

The RPM's as docs.drizzle suggest are version 0.8 in epel, appears
gearman requires 1.0.

http://docs.drizzle.org/installing/redhat.html#using-rpms has some
instructions on packages required to compile from source.

geocine

unread,
Aug 17, 2011, 3:51:29 PM8/17/11
to gearman
@Herman

I followed your steps and I get this:


checking for Boost headers version >= 1.39.0... yes
checking for Boost's header version... 1_41
checking for the toolset name used by Boost for g++... gcc41 -gcc
checking boost/program_options.hpp usability... yes
checking boost/program_options.hpp presence... yes
checking for boost/program_options.hpp... yes
checking for the Boost program_options library...
configure: error: cannot find the flags to link with Boost
program_options

any idea?

On Aug 17, 9:18 am, Bradley Falzon <b...@teambrad.net> wrote:
> On Wed, Aug 17, 2011 at 9:56 AM, geocine <geocip...@gmail.com> wrote:
> > does libdrizzle work ? thanks :)
>
> We don't use libdrizzle, however, no reason whyhttp://docs.drizzle.org/installing/from_source.html#compiling-the-source
> wouldn't work.
>
> The RPM's as docs.drizzle suggest are version 0.8 in epel, appears
> gearman requires 1.0.
>
> http://docs.drizzle.org/installing/redhat.html#using-rpmshas some

Frutik

unread,
Aug 26, 2011, 5:34:01 AM8/26/11
to gearman
Hi.

I did that. But when I trying to make

. ./tests/gearman_execute_partition.h
tests/gearman_execute_partition.cc:49: warning: ignoring #pragma GCC
diagnostic [-Wunknown-pragmas]
tests/gearman_execute_partition.cc: In function ‘test_return_t
gearman_execute_partition_basic(void*)’:
tests/gearman_execute_partition.cc:109: error: no matching function
for call to ‘_compare(const char [35], int, const char [32], long
unsigned int, size_t)’
tests/gearman_execute_partition.cc: In function ‘test_return_t
gearman_execute_partition_use_as_function(void*)’:
tests/gearman_execute_partition.cc:191: error: no matching function
for call to ‘_compare(const char [35], int, const char [42], long
unsigned int, size_t)’
make: *** [tests/gearman_execute_partition.o] Error 1


Centos 5.6
gearmand 0.24

Any ideas?

On Aug 17, 2:53 am, Herman Radtke <hermanrad...@gmail.com> wrote:
> > FYI, these are our steps for gearman on CentOS 6.
>
> > yum install gcc gcc-c++ make boost-devel libevent-devel.x86_64
> > libuuid-devel sqlite-devel.x86_64
> > cd /usr/local/
> > wgethttp://launchpad.net/gearmand/trunk/0.23/+download/gearmand-0.23.tar.gz
> > tar xvzf gearmand-0.23.tar.gz
> > ln -s gearmand-0.23 gearmand
> > cd gearmand
> > ./configure
> > make
>
> > useradd -M gearmand
> > mkdir /var/run/gearmand
> > sed -i 's:/usr/sbin/gearmand:/usr/local/gearmand/gearmand/gearmand:'
> > support/gearmand.init
> > cp support/gearmand.init /etc/init.d/gearmand
> > chmod a+x /etc/init.d/gearmand
> > chkconfig gearmand on
>
> > This obviously doesn't do a make install, instead we run it out of
> > /usr/local/germand/ which symlinks to the current version downloaded.
>
> These steps do not work for me. Standard CentOS 5.6 ships with boost 1.37.
>
> Here is what I did to install 0.24:
>
> yum install boost141 boost141--devel
> cd /usr/lib/boost141 && cp * ../
> cd /usr/lib64/boost141 && cp * ../
> cd /usr/include && ln -s boost141/boost/
>
> now configure and make as normal
>
> --
> Herman Radtke
> hermanrad...@gmail.com |http://hermanradtke.com

Herman Radtke

unread,
Aug 26, 2011, 2:22:16 PM8/26/11
to gea...@googlegroups.com
> I did that. But when I trying to make
>
> . ./tests/gearman_execute_partition.h
> tests/gearman_execute_partition.cc:49: warning: ignoring #pragma GCC
> diagnostic [-Wunknown-pragmas]
> tests/gearman_execute_partition.cc: In function ‘test_return_t
> gearman_execute_partition_basic(void*)’:
> tests/gearman_execute_partition.cc:109: error: no matching function
> for call to ‘_compare(const char [35], int, const char [32], long
> unsigned int, size_t)’
> tests/gearman_execute_partition.cc: In function ‘test_return_t
> gearman_execute_partition_use_as_function(void*)’:
> tests/gearman_execute_partition.cc:191: error: no matching function
> for call to ‘_compare(const char [35], int, const char [42], long
> unsigned int, size_t)’
> make: *** [tests/gearman_execute_partition.o] Error 1
>
>
> Centos 5.6
> gearmand 0.24
>
> Any ideas?

geocine and I worked out a bunch of issues with compiling and he got
his working. He said he was going to reply to this thread with a
write-up. If you want to hope on irc.freenode.net and ping me (i am
hjr3) we can work through your issues. I don't want to spam the list
with all the back and forth it is going to require in order to figure
out what sys config we need to tweak.

Roger Halliburton

unread,
Sep 2, 2011, 6:30:07 PM9/2/11
to gearman
Hi all, new subscriber here. I am having some of the same issues
building gearmand on CentOS.

I got past the boost problems in configure by renaming/linking some
directories and files. Also had the problem with boost/program_options
and that also went away.

I had a uuid problem when trying to make. I did a yum install
e2fsprogs e2fsprogs-devel and that seems to be resolved.

Now this is killing the make:

CXXLD benchmark/blobslap_worker
/usr/bin/ld: cannot find -lboost_program_options-mt
collect2: ld returned 1 exit status
make[1]: *** [benchmark/blobslap_worker] Error 1
make[1]: Leaving directory `/root/gearmand-0.24'

I see this in the Makefile:
BOOST_PROGRAM_OPTIONS_LDFLAGS = -L/usr/lib/boost-141/ -Wl,-rpath -Wl,/
usr/lib/boost-141/
BOOST_PROGRAM_OPTIONS_LDPATH = /usr/lib/boost-141/
BOOST_PROGRAM_OPTIONS_LIBS = -lboost_program_options-mt

I think the .so file should be /usr/lib/boost-141/
libboost_program_options-mt.so, but I can't seem to get the Makefile
to see the correct file.

Any suggestions?

geocine

unread,
Sep 3, 2011, 10:32:45 AM9/3/11
to gearman
Anyone having a problem setting up their gearman on CentOS 5.6

follow this steps and if you have problems reply to this thread:

@herman its been a while I was so busy

So here it is:

yum remove boost*
yum install boost141* boost141-* libevent-devel* libevent
cd /usr/lib/boost141 && /bin/cp -rf * ../
cd /usr/lib64/boost141 && /bin/cp -rf * ../
cd /usr/include && ln -s boost141/boost/

vi /etc/yum.repos.d/drizzle.repo

// add this

[drizzle-dev]
name=drizzle-dev
baseurl=http://rpm.drizzle.org/7-dev/redhat/5/$basearch/
enabled=0
gpgcheck=0

yum install --enablerepo=drizzle-dev drizzle7 drizzle7-devel
libdrizzle libdrizzle-devel

rpm -U http://rpm.drizzle.org/7-dev/redhat/5/i386/libdrizzle-devel-2011.08.23-1.el5.i386.rpm

wget http://launchpad.net/gearmand/trunk/0.24/+download/gearmand-0.24.tar.gz
tar xf gearmand-0.24.tar.gz
cd gearmand-0.24
libdrizzle_CFLAGS="-I/usr/include/libdrizzle-2.0" libdrizzle_LIBS="-
ldrizzle-2.0" CXX=/usr/bin/g++44 CC=/usr/bin/gcc44 ./configure --
prefix=/usr
make
make test
make install



On Sep 3, 6:30 am, Roger Halliburton <roger.hallibur...@gmail.com>
wrote:

geocine

unread,
Sep 3, 2011, 10:34:49 AM9/3/11
to gearman
My new lines where messed up so here it is, I will post it again:

yum remove boost*
yum install boost141* boost141-* libevent-devel* libevent
cd /usr/lib/boost141 && /bin/cp -rf * ../
cd /usr/lib64/boost141 && /bin/cp -rf * ../
cd /usr/include && ln -s boost141/boost/

vi /etc/yum.repos.d/drizzle.repo

// add this

[drizzle-dev]
name=drizzle-dev
baseurl=http://rpm.drizzle.org/7-dev/redhat/5/$basearch/
enabled=0
gpgcheck=0

yum install --enablerepo=drizzle-dev drizzle7 drizzle7-devel
libdrizzle libdrizzle-devel

rpm -U http://rpm.drizzle.org/7-dev/redhat/5/i386/libdrizzle-devel-2011.08.2

wget http://launchpad.net/gearmand/trunk/0.24/+download/gearmand-0.24.tar.gz
tar xf gearmand-0.24.tar.gz
cd gearmand-0.24
libdrizzle_CFLAGS="-I/usr/include/libdrizzle-2.0" libdrizzle_LIBS="-
ldrizzle-2.0" CXX=/usr/bin/g++44 CC=/usr/bin/gcc44 ./configure --
prefix=/usr
make
make test
make install

On Sep 3, 10:32 pm, geocine <geocip...@gmail.com> wrote:
> Anyone having a problem setting up their gearman on CentOS 5.6
>
> follow this steps and if you have problems reply to this thread:
>
> @herman its been a while I was so busy
>
> So here it is:
>
> yum remove boost*
> yum install boost141* boost141-* libevent-devel* libevent
> cd /usr/lib/boost141 && /bin/cp -rf * ../
> cd /usr/lib64/boost141 && /bin/cp -rf * ../
> cd /usr/include && ln -s boost141/boost/
>
> vi /etc/yum.repos.d/drizzle.repo
>
> // add this
>
> [drizzle-dev]
> name=drizzle-dev
> baseurl=http://rpm.drizzle.org/7-dev/redhat/5/$basearch/
> enabled=0
> gpgcheck=0
>
> yum install --enablerepo=drizzle-dev drizzle7 drizzle7-devel
> libdrizzle libdrizzle-devel
>
> rpm -Uhttp://rpm.drizzle.org/7-dev/redhat/5/i386/libdrizzle-devel-2011.08.2...
>
> wgethttp://launchpad.net/gearmand/trunk/0.24/+download/gearmand-0.24.tar.gz

geocine

unread,
Sep 3, 2011, 10:37:56 AM9/3/11
to gearman

Erich

unread,
Feb 13, 2012, 11:01:22 AM2/13/12
to gea...@googlegroups.com
I followed these great instructions, but unfortunately ran into a make error:

  CXXLD  benchmark/blobslap_worker
benchmark/blobslap_worker.o: In function `get_single_string<char>':
/usr/local/include/boost/program_options/detail/value_semantic.hpp:58: undefined reference to `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/include/boost/program_options/detail/value_semantic.hpp:62: undefined reference to `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
benchmark/blobslap_worker.o: In function `main':
/opt/gearmand-0.24/benchmark/blobslap_worker.cc:86: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'

collect2: ld returned 1 exit status
make[1]: *** [benchmark/blobslap_worker] Error 1
make[1]: Leaving directory `/opt/gearmand-0.24'

Sven Nierlein

unread,
Feb 13, 2012, 11:05:18 AM2/13/12
to gea...@googlegroups.com
Hi,

On 2/13/12 17:01, Erich wrote:
> I followed these great instructions, but unfortunately ran into a make error:

You could try these instructions:
http://labs.consol.de/nagios/mod-gearman/#_centos_redhat

I did them for 0.25, but they might work with latest tarball too.

Bye,
Sven

Erich

unread,
Feb 13, 2012, 11:20:00 AM2/13/12
to gea...@googlegroups.com
That worked perfectly - thanks!!
Reply all
Reply to author
Forward
0 new messages