Unable to compile 0.32 CentOS 5.7

Bug #992976 reported by Mike Willbanks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Medium
Brian Aker

Bug Description

benchmark/benchmark.cc: In function 'void benchmark_check_time(gearman_benchmark_st*)':
benchmark/benchmark.cc:32: error: expected `)' before 'PRIu64'
benchmark/benchmark.cc:42: warning: conversion lacks type at end of format [-Wformat]
benchmark/benchmark.cc:42: warning: too many arguments for format [-Wformat-extra-args]
make[1]: *** [benchmark/benchmark.lo] Error 1

Configure Statement:
./configure --enable-shared --disable-libpq --disable-libtokyocabinet --disable-libdrizzle --disable-libmemcached

Revision history for this message
Mike Willbanks (mike-digitalstruct) wrote :

Additional Information:

This looks to be related to the following previously fixed issue:
https://bugs.launchpad.net/gearmand/+bug/923183

Configuration summary for gearmand version 0.32

   * Installation prefix: /usr/local
   * System type: unknown-linux-gnu
   * Host CPU: x86_64
   * C Compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
   * Assertions enabled: yes
   * Debug enabled: no
   * Warnings as failure:
   * Building with libsqlite3 yes
   * Building with libdrizzle no
   * Building with libmemcached no
   * Building with libpq no
   * Building with tokyocabinet no
   * Building with libmysql no

Revision history for this message
Mike Willbanks (mike-digitalstruct) wrote :

Digging deeper:

Added:
#define __STDC_FORMAT_MACROS

right before:
#include <config.h>

for:
benchmark/benchmark.cc
libgearman-server/plugins/protocol/http/protocol.cc

This fixes the compilation issues of the following:

  CXX benchmark/benchmark.lo
benchmark/benchmark.cc: In function 'void benchmark_check_time(gearman_benchmark_st*)':
benchmark/benchmark.cc:33: error: expected `)' before 'PRIu64'
benchmark/benchmark.cc:43: warning: conversion lacks type at end of format [-Wformat]
benchmark/benchmark.cc:43: warning: too many arguments for format [-Wformat-extra-args]
make[1]: *** [benchmark/benchmark.lo] Error 1

  CXX libgearman-server/plugins/protocol/http/libgearman_server_libgearman_server_la-protocol.lo
libgearman-server/plugins/protocol/http/protocol.cc: In function 'size_t _http_pack(const gearmand_packet_st*, gearman_server_con_st*, void*, size_t, gearmand_error_t*)':
libgearman-server/plugins/protocol/http/protocol.cc:118: error: expected `)' before 'PRIu64'
libgearman-server/plugins/protocol/http/protocol.cc:134: error: expected primary-expression before ')' token
libgearman-server/plugins/protocol/http/protocol.cc:134: error: expected `;' before 'snprintf'
libgearman-server/plugins/protocol/http/protocol.cc:155: error: expected primary-expression before ')' token
libgearman-server/plugins/protocol/http/protocol.cc:155: error: expected `;' before 'snprintf'
make[1]: *** [libgearman-server/plugins/protocol/http/libgearman_server_libgearman_server_la-protocol.lo] Error 1

Now the present issue:

  CXX util/pidfile.o
util/pidfile.cc: In member function ‘bool datadifferential::util::Pidfile::create()’:
util/pidfile.cc:122: error: ‘O_CLOEXEC’ was not declared in this scope
make[1]: *** [util/pidfile.o] Error 1

Revision history for this message
Mike Willbanks (mike-digitalstruct) wrote :

Applying patch from #980114 seems to have fixed the issue with pidfile.o:
https://launchpadlibrarian.net/102708957/fcntl.patch

Next issue:

  CXX libgearman/libgearman_libgearman_la-actions.lo
libtool: Version mismatch error. This is libtool 2.4, but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4
libtool: and run autoconf again.
make[1]: *** [libgearman/libgearman_libgearman_la-actions.lo] Error 63

This is something that I cannot exactly fix easily :(

Revision history for this message
Mike Willbanks (mike-digitalstruct) wrote :

Downloaded libtool 2.4.2 from: http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
tar -zxf libtool-2.4.2.tar.gz
./configure && make && make install

checked libtool is equal to 2.4.2 but the cause for error is the above patch.

Revision history for this message
Mike Willbanks (mike-digitalstruct) wrote :

Removing
|O_CLOEXEC
from util/pidfile.cc file at line 121

Fixes the issue...

To summarize:
Doing #2 and the above allow me to compile.

Revision history for this message
Mike Willbanks (mike-digitalstruct) wrote :

The patch implements the needed changes in order to compile for centos 5.7.

Apply the patch with "patch -p0 < gearmand-0.32.centos.patch"

Revision history for this message
Brian Aker (brianaker) wrote :
Revision history for this message
Brian Aker (brianaker) wrote :

Try out 0.33 once it is uploaded, I suspect it will fix the issue.

Brian Aker (brianaker)
Changed in gearmand:
milestone: none → 0.34
assignee: nobody → Brian Aker (brianaker)
importance: Undecided → Medium
status: New → Fix Committed
Brian Aker (brianaker)
Changed in gearmand:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.