Build of Gearman 0.29 on Ubuntu Oneiric with --disable-libpq fails

Bug #970828 reported by Dossy Shiobara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Medium
Brian Aker

Bug Description

Trying to build Gearman 0.29 on Ubuntu Oneiric without Postgres support (e.g., configure --disable-libpq) fails:

   CXXLD gearmand/gearmand
  libgearman-server/.libs/libgearman-server.a(libgearman_server_libgearman_server_la-plugins.o): In function `gearmand::plugins::initialize(boost::program_options::options_description&)':
  /usr/src/gearmand-0.29/libgearman-server/plugins.cc:68: undefined reference to `gearmand::plugins::queue::initialize_postgres()'

Revision history for this message
Dossy Shiobara (dossy) wrote :

The real "bug" here is that even with --disable-libpq passed to configure, config.h defines HAVE_LIBPQ = 1 as long as Postgres is found, which causes lines 66-69 in libgearman-server/plugins.cc to do the wrong thing:

 66 if (HAVE_LIBPQ)
 67 {
 68 queue::initialize_postgres();
 69 }

My guess is the correct fix belongs in m4/have_libpq.m4. See proposed fix in attached patch have_libpq-patch.txt.

Revision history for this message
Dossy Shiobara (dossy) wrote :

The patch gets me past the initial build, but Gearman 0.29 is failing this test:

libtest/server.cc:233: in start() Failed to ping() server started, having pid_file. exec:/usr/src/gearmand-0.29/libtool --mode=execute /usr/src/gearmand-0.29/./gearmand/gearmand --verbose=DEBUG --log-file=var/log/gearmand.logIV12L0 --pid-file=var/run/gearmand.pidCUw0KN --daemon --port=48825 --listen=localhost

tests/ephemeral_test.cc:34: Assertion "test->initialize(0, NULL)" failed, in collection_init
ephemeral queue [ failed ]

Some test failed.
 Total Collections 1
 Failed Collections 1
 Skipped Collections 0
 Succeeded Collections 0

Total 0
 Failed 0
 Skipped 0
 Succeeded 0

FAIL: tests/ephemeral_test

My guess is this is unrelated and may be a separate bug?

Revision history for this message
Dossy Shiobara (dossy) wrote :

Looks like a Heisenbug. gearmand-0.14 was still running (from the official Ubuntu gearmand package). I stopped all running gearmand processes, and then dpkg-buildpackage'd again, and this time all tests passed.

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 970828] Re: Build of Gearman 0.29 on Ubuntu Oneiric with --disable-libpq fails

Hi,

The start bug fix should hit trunk today.

Cheers,
 -Brian

On Apr 1, 2012, at 11:05 AM, Dossy Shiobara wrote:

> The patch gets me past the initial build, but Gearman 0.29 is failing
> this test:
>
> libtest/server.cc:233: in start() Failed to ping() server started,
> having pid_file. exec:/usr/src/gearmand-0.29/libtool --mode=execute
> /usr/src/gearmand-0.29/./gearmand/gearmand --verbose=DEBUG --log-
> file=var/log/gearmand.logIV12L0 --pid-file=var/run/gearmand.pidCUw0KN
> --daemon --port=48825 --listen=localhost
>
> tests/ephemeral_test.cc:34: Assertion "test->initialize(0, NULL)" failed, in collection_init
> ephemeral queue [ failed ]
>
> Some test failed.
> Total Collections 1
> Failed Collections 1
> Skipped Collections 0
> Succeeded Collections 0
>
> Total 0
> Failed 0
> Skipped 0
> Succeeded 0
>
> FAIL: tests/ephemeral_test
>
> My guess is this is unrelated and may be a separate bug?
>
> --
> You received this bug notification because you are subscribed to
> Gearman.
> https://bugs.launchpad.net/bugs/970828
>
> Title:
> Build of Gearman 0.29 on Ubuntu Oneiric with --disable-libpq fails
>
> Status in Gearman Server and Client Libraries:
> New
>
> Bug description:
> Trying to build Gearman 0.29 on Ubuntu Oneiric without Postgres
> support (e.g., configure --disable-libpq) fails:
>
> CXXLD gearmand/gearmand
> libgearman-server/.libs/libgearman-server.a(libgearman_server_libgearman_server_la-plugins.o): In function `gearmand::plugins::initialize(boost::program_options::options_description&)':
> /usr/src/gearmand-0.29/libgearman-server/plugins.cc:68: undefined reference to `gearmand::plugins::queue::initialize_postgres()'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gearmand/+bug/970828/+subscriptions

Revision history for this message
Dossy Shiobara (dossy) wrote :

Thanks, Brian. Let me know if you have any questions about the patch. Is there a way in LP for me to commit my patch to my own branch, then submit a pull request? As you can tell, I'm a lot more familiar with contributing on Github than on LP ...

Brian Aker (brianaker)
Changed in gearmand:
assignee: nobody → Brian Aker (brianaker)
importance: Undecided → Medium
Brian Aker (brianaker)
Changed in gearmand:
milestone: none → 0.31
status: New → In Progress
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Dossy Shiobara's message of Mon Apr 02 01:41:13 UTC 2012:
> Thanks, Brian. Let me know if you have any questions about the patch.
> Is there a way in LP for me to commit my patch to my own branch, then
> submit a pull request? As you can tell, I'm a lot more familiar with
> contributing on Github than on LP ...
>

Yes!

bzr commit ...
bzr push lp:~your-launchpad-user/gearmand/name-of-branch
bzr lp-propose

That will create a merge proposal against gearmand's current dev series
(lp:gearmand)

Brian Aker (brianaker)
Changed in gearmand:
status: In Progress → 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.