Build fails with non-standard boost location

Bug #948312 reported by Kevin Martin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Low
Brian Aker

Bug Description

Hi,

I'm trying to build gearmand-0.28 with a non-standard location for boost on Debian 6. (No boost libraries are installed with the package manager). It is boost 1.48 and I can supply the commands used to build it if necessary for you to replicate the problem.

I can successfully run the configure script with the --with-boost option and the configure script detects the headers/libraries. However, when running make I get numerous build errors relating to being unable to find the boost header files and libraries. I have traced this to the non standard locations not being passed on the command line.

I have spent the afternoon faffing with the include.am files to get it to a point where it builds (patch below), but I really don't know what I'm doing with automake, so it's not a fix. However, it should give you a clue as to what needs fixing.

Thanks,
Kevin

diff -rupN gearmand-0.28/benchmark/include.am gearmand-0.28-patched//benchmark/include.am
--- gearmand-0.28/benchmark/include.am 2011-11-02 22:20:24.000000000 +0000
+++ gearmand-0.28-patched//benchmark/include.am 2012-03-06 12:44:11.000000000 +0000
@@ -30,8 +30,9 @@ benchmark_blobslap_worker_SOURCES= \
        util/logfile.cc \
        util/pidfile.cc \
        util/signal.cc
-benchmark_blobslap_worker_CXXFLAGS= $(PTHREAD_CFLAGS)
+benchmark_blobslap_worker_CXXFLAGS= $(PTHREAD_CFLAGS) $(BOOST_CPPFLAGS)
 benchmark_blobslap_worker_LDADD= \
+ $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
      $(BOOST_PROGRAM_OPTIONS_LIBS) \
      benchmark/libbenchmark.la \
      libgearman/libgearman.la
diff -rupN gearmand-0.28/examples/include.am gearmand-0.28-patched//examples/include.am
--- gearmand-0.28/examples/include.am 2012-01-19 07:31:11.000000000 +0000
+++ gearmand-0.28-patched//examples/include.am 2012-03-06 12:47:20.000000000 +0000
@@ -12,6 +12,7 @@
 # All paths should be given relative to the root

 EXAMPLES_LDADD= \
+ $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
   $(BOOST_PROGRAM_OPTIONS_LIBS) \
   libgearman/libgearman.la

diff -rupN gearmand-0.28/gearmand/include.am gearmand-0.28-patched//gearmand/include.am
--- gearmand-0.28/gearmand/include.am 2012-01-26 21:04:11.000000000 +0000
+++ gearmand-0.28-patched//gearmand/include.am 2012-03-06 12:35:25.000000000 +0000
@@ -23,7 +23,7 @@ gearmand_gearmand_LDADD+= libgearman-ser

 gearmand_gearmand_LDFLAGS= $(BOOST_PROGRAM_OPTIONS_LDFLAGS)

-gearmand_gearmand_CXXFLAGS= $(BOOST_CXXFLAGS)
+gearmand_gearmand_CXXFLAGS= $(BOOST_CPPFLAGS)

 gearmand_gearmand_SOURCES= \
       gearmand/gearmand.cc \
diff -rupN gearmand-0.28/libgearman-server/include.am gearmand-0.28-patched//libgearman-server/include.am
--- gearmand-0.28/libgearman-server/include.am 2012-01-19 07:31:11.000000000 +0000
+++ gearmand-0.28-patched//libgearman-server/include.am 2012-03-06 12:17:43.000000000 +0000
@@ -81,6 +81,7 @@ libgearman_server_libgearman_server_la_C
 libgearman_server_libgearman_server_la_CFLAGS+= $(PTHREAD_CFLAGS)
 libgearman_server_libgearman_server_la_CFLAGS+= -DBUILDING_LIBGEARMAN

+libgearman_server_libgearman_server_la_CXXFLAGS+= $(BOOST_CPPFLAGS)
 libgearman_server_libgearman_server_la_CXXFLAGS+= $(LIBEVENT_CPPFLAGS)
 libgearman_server_libgearman_server_la_CXXFLAGS+= $(PTHREAD_CFLAGS)
 libgearman_server_libgearman_server_la_CXXFLAGS+= -DBUILDING_LIBGEARMAN
diff -rupN gearmand-0.28/tests/include.am gearmand-0.28-patched//tests/include.am
--- gearmand-0.28/tests/include.am 2012-01-09 16:16:21.000000000 +0000
+++ gearmand-0.28-patched//tests/include.am 2012-03-06 12:49:46.000000000 +0000
@@ -33,6 +33,7 @@ tests_libstartworker_la_CXXFLAGS=
 tests_libstartworker_la_CXXFLAGS+= $(PTHREAD_CFLAGS)
 tests_libstartworker_la_CXXFLAGS+= $(BOOST_CPPFLAGS)
 tests_libstartworker_la_LIBADD= $(PTHREAD_LIBS)
+tests_libstartworker_la_LIBADD+= $(BOOST_THREAD_LDFLAGS)
 tests_libstartworker_la_LIBADD+= $(BOOST_THREAD_LIBS)
 tests_libstartworker_la_LIBADD+= libgearman/libgearman.la
 tests_libstartworker_la_SOURCES= tests/start_worker.cc
diff -rupN gearmand-0.28/tests/libgearman-1.0/include.am gearmand-0.28-patched//tests/libgearman-1.0/include.am
--- gearmand-0.28/tests/libgearman-1.0/include.am 2011-12-16 06:41:15.000000000 +0000
+++ gearmand-0.28-patched//tests/libgearman-1.0/include.am 2012-03-06 13:12:50.000000000 +0000
@@ -5,6 +5,8 @@ LIBGEARMAN_1_0_CLIENT_LDADD= \
         libtest/libtest.la \
         tests/libstartworker.la

+tests_libgearman_1_0_client_test_CXXFLAGS=$(BOOST_CPPFLAGS)
+
 tests_libgearman_1_0_client_test_SOURCES= \
        tests/libgearman-1.0/client_test.cc \
        tests/libgearman-1.0/do.cc \

Brian Aker (brianaker)
Changed in gearmand:
assignee: nobody → Brian Aker (brianaker)
Brian Aker (brianaker)
Changed in gearmand:
milestone: none → 0.29
status: New → In Progress
importance: Undecided → Low
Brian Aker (brianaker)
Changed in gearmand:
status: In Progress → Fix Committed
Revision history for this message
Kevin Martin (kev82) wrote :

Can confirm this now builds in our environment

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.