tests fail to compile with --enable-shared=no

Bug #912414 reported by David Barr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Confirmed
Medium
Brian Aker

Bug Description

I'm on Ubuntu 10.04. gearmand-0.26.

./configure --enable-shared=no
make
[...]
  CXXLD examples/wc_worker
  CXX gearmand/gearmand_hostile_gearmand-gearmand.o
  CXX util/gearmand_hostile_gearmand-daemon.o
  CXX util/gearmand_hostile_gearmand-pidfile.o
  CXXLD gearmand/hostile_gearmand
  CXX tests/killall.o
  CXXLD tests/killall
  CXX tests/cycle.o
  CXXLD tests/cycle
tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `thread_runner':
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:145: undefined reference to `gearman_worker_id'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:149: undefined reference to `gearman_worker_set_namespace'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:152: undefined reference to `gearman_worker_add_server'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:165: undefined reference to `gearman_worker_set_server_option'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:176: undefined reference to `gearman_worker_define_function'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:182: undefined reference to `gearman_worker_error'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:189: undefined reference to `gearman_worker_add_options'
/home/barr/gearman/gearmand-0.26/tests/start_worker.cc:196: undefined reference to `gearman_worker_work'
tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `Worker':
/home/barr/gearman/gearmand-0.26/./tests/worker.h:44: undefined reference to `gearman_worker_create'
tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `~Worker':
/home/barr/gearman/gearmand-0.26/./tests/worker.h:64: undefined reference to `gearman_worker_free'
collect2: ld returned 1 exit status
make[1]: *** [tests/cycle] Error 1
make[1]: Leaving directory `/home/barr/gearman/gearmand-0.26'
make: *** [all] Error 2

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

Got it, start worker needs to be linked as well to libgearman

Changed in gearmand:
assignee: nobody → Brian Aker (brianaker)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 912414] [NEW] tests fail to compile with --enable-shared=no
Download full text (4.6 KiB)

Hi,

One problem with compiling this way, is that the C program that we test with is not going to compile (since gcc handles the magic for std:: bits).

Any reason why building both is an issue?

Cheers,
 -Brian

On Jan 5, 2012, at 10:00 AM, David Barr wrote:

> Public bug reported:
>
> I'm on Ubuntu 10.04. gearmand-0.26.
>
> ./configure --enable-shared=no
> make
> [...]
> CXXLD examples/wc_worker
> CXX gearmand/gearmand_hostile_gearmand-gearmand.o
> CXX util/gearmand_hostile_gearmand-daemon.o
> CXX util/gearmand_hostile_gearmand-pidfile.o
> CXXLD gearmand/hostile_gearmand
> CXX tests/killall.o
> CXXLD tests/killall
> CXX tests/cycle.o
> CXXLD tests/cycle
> tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `thread_runner':
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:145: undefined reference to `gearman_worker_id'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:149: undefined reference to `gearman_worker_set_namespace'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:152: undefined reference to `gearman_worker_add_server'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:165: undefined reference to `gearman_worker_set_server_option'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:176: undefined reference to `gearman_worker_define_function'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:182: undefined reference to `gearman_worker_error'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:189: undefined reference to `gearman_worker_add_options'
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:196: undefined reference to `gearman_worker_work'
> tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `Worker':
> /home/barr/gearman/gearmand-0.26/./tests/worker.h:44: undefined reference to `gearman_worker_create'
> tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `~Worker':
> /home/barr/gearman/gearmand-0.26/./tests/worker.h:64: undefined reference to `gearman_worker_free'
> collect2: ld returned 1 exit status
> make[1]: *** [tests/cycle] Error 1
> make[1]: Leaving directory `/home/barr/gearman/gearmand-0.26'
> make: *** [all] Error 2
>
> ** Affects: gearmand
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> Gearman.
> https://bugs.launchpad.net/bugs/912414
>
> Title:
> tests fail to compile with --enable-shared=no
>
> Status in Gearman Server and Client Libraries:
> New
>
> Bug description:
> I'm on Ubuntu 10.04. gearmand-0.26.
>
> ./configure --enable-shared=no
> make
> [...]
> CXXLD examples/wc_worker
> CXX gearmand/gearmand_hostile_gearmand-gearmand.o
> CXX util/gearmand_hostile_gearmand-daemon.o
> CXX util/gearmand_hostile_gearmand-pidfile.o
> CXXLD gearmand/hostile_gearmand
> CXX tests/killall.o
> CXXLD tests/killall
> CXX tests/cycle.o
> CXXLD tests/cycle
> tests/.libs/libstartworker.a(tests_libstartworker_la-start_worker.o): In function `thread_runner':
> /home/barr/gearman/gearmand-0.26/tests/start_worker.cc:145: unde...

Read more...

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.