This is the patch

在 2012年3月30日 下午11:34,Zhihua Che <[email protected]> 写道:
> Oh, sorry, I post a wrong patch:-(
> I'll post the right one next day.
>
> 在 2012年3月30日 下午11:32,Zhihua Che <[email protected]> 写道:
>> Hi, Pervez
>> Thanks for your patience. I guess I find a solution:-)
>>
>> Previously, I added LDFLAGS=-L<build-dir>/src/.libs, not <src-dir>/src/.libs.
>> .libs is generated during building, it's where built libraries are outputed.
>>
>> The following is my solution. Wish It would help others.
>>
>> I apply the attchment patch and export LDFLAGS=-L<build-dir>/src/.libs.
>> This patch solve the link problem which complains "cannot find
>> libboost_program_options etc.
>> export LDFLAGS solve the "make install" problem.
>>
>> The patch is originated from Cajus Pollmeier. Thanks for his work.
>> And this one is applicable to qpid higher than 0.14
>>
>> 在 2012年3月30日 下午10:25,Pervez, Salman <[email protected]> 写道:
>>> Hi Zhihua, can you please post your build commands including configure and 
>>> make? I am curious how you chose to build this and it might help solve the 
>>> problem.
>>>
>>> When you say LDFLAGS=-L<build-dir>/src/.libs to "make install", do you 
>>> really mean LDFLAGS=-L<source-dir>/src/.libs to "make install"? There is no 
>>> .libs dir in my build directory that I could find. Perhaps linking with the 
>>> actual build dir might help, I'm not sure.
>>>
>>> But ideally make install should just find stuff. So maybe the problem is 
>>> with something you might have done earlier?
>>>
>>> Salman
>>>
>>> -----Original Message-----
>>> From: Zhihua Che [mailto:[email protected]]
>>> Sent: Friday, March 30, 2012 3:41 AM
>>> To: [email protected]
>>> Subject: Re: [Building Error] cannot find 
>>> boost_program_option/boost_filesystem
>>>
>>> Thanks for your reply.
>>>
>>> I guess I've solved this problem and I also meet that typical link
>>> problem and address it using that fix-explicit-link-problem.patch:-)
>>> and finally make succeeded.
>>>
>>> But I'm struggling with "make install":-)
>>> which complains can't find -lqpidbroker. I'm sure qpidbroker is built
>>> and stored in src/.libs, and it still fails even if I add
>>> LDFLAGS=-L<build-dir>/src/.libs to "make install" command line.
>>>
>>> this is what I get.
>>>
>>> /usr/bin/ld: cannot find -lqpidbroker
>>> collect2: ld returned 1 exit status
>>> libtool: install: error: relink `ha.la' with the above command before
>>> installing it
>>>
>>>
>>>
>>>
>>> 在 2012年3月29日 下午10:13,Pervez, Salman <[email protected]> 写道:
>>>> What specific error do you get?
>>>>
>>>> You can try adding <path-to-boost-lib-dir> to your LDFLAGS.
>>>>
>>>> LDFLAGS="-L<path>" ...
>>>>
>>>> You can also try adding the flags -lboost_system and -lboost_filesystem to 
>>>> your CXXFLAGS.
>>>>
>>>> It will work eventually. :)
>>>>
>>>> Salman
>>>>
>>>> -----Original Message-----
>>>> From: Zhihua Che [mailto:[email protected]]
>>>> Sent: Thursday, March 29, 2012 2:23 AM
>>>> To: [email protected]
>>>> Subject: [Building Error] cannot find boost_program_option/boost_filesystem
>>>>
>>>> Hi, everyone
>>>>
>>>>    I'm building qpid from  git code repository and version is
>>>> 5c5088749ba26b1d3d6fb8132c14d3be0b20b959. I built it using automake
>>>> and configure succeeded in creating Makefile. I guess the compiling is
>>>> ok, but linking failed due to lack of libraries boost_program_option
>>>> and boost_filesystem. I've installed libboost-dev, but I cannot find
>>>> the two libraries in my system. I've searched a lot and have no clue
>>>> how to get this around.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>>
>>>> CONFIDENTIALITY AND SECURITY NOTICE
>>>>
>>>> The contents of this message and any attachments may be confidential and 
>>>> proprietary and also may be covered by the Electronic Communications 
>>>> Privacy Act. This message is not intended to be used by, and should not be 
>>>> relied upon in any way, by any third party.  If you are not an intended 
>>>> recipient, please inform the sender of the transmission error and delete 
>>>> this message immediately without reading, disseminating, distributing or 
>>>> copying the contents. Citadel makes no assurances that this e-mail and any 
>>>> attachments are free of viruses and other harmful code.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
diff --git a/qpid/cpp/examples/messaging/Makefile.am b/qpid/cpp/examples/messaging/Makefile.am
index 298d65e..d5303f4 100644
--- a/qpid/cpp/examples/messaging/Makefile.am
+++ b/qpid/cpp/examples/messaging/Makefile.am
@@ -33,10 +33,10 @@ hello_xml_SOURCES=hello_xml.cpp
 hello_xml_LDADD=$(CLIENT_LIB)
 
 drain_SOURCES=drain.cpp OptionParser.h OptionParser.cpp
-drain_LDADD=$(CLIENT_LIB)
+drain_LDADD=$(CLIENT_LIB) -lqpidtypes
 
 spout_SOURCES=spout.cpp OptionParser.h OptionParser.cpp
-spout_LDADD=$(CLIENT_LIB)
+spout_LDADD=$(CLIENT_LIB) -lqpidtypes
 
 client_SOURCES=client.cpp
 client_LDADD=$(CLIENT_LIB)
@@ -45,10 +45,10 @@ server_SOURCES=server.cpp
 server_LDADD=$(CLIENT_LIB)
 
 map_sender_SOURCES=map_sender.cpp
-map_sender_LDADD=$(CLIENT_LIB)
+map_sender_LDADD=$(CLIENT_LIB) -lqpidtypes
 
 map_receiver_SOURCES=map_receiver.cpp
-map_receiver_LDADD=$(CLIENT_LIB)
+map_receiver_LDADD=$(CLIENT_LIB) -lqpidtypes
 
 examples_DATA=                 \
 	hello_world.cpp	       \
diff --git a/qpid/cpp/examples/old_api/direct/Makefile.am b/qpid/cpp/examples/old_api/direct/Makefile.am
index 24f783f..09709c2 100644
--- a/qpid/cpp/examples/old_api/direct/Makefile.am
+++ b/qpid/cpp/examples/old_api/direct/Makefile.am
@@ -23,13 +23,13 @@ include $(top_srcdir)/examples/makedist.mk
 
 noinst_PROGRAMS=direct_producer listener declare_queues
 direct_producer_SOURCES=direct_producer.cpp
-direct_producer_LDADD=$(CLIENT_LIB)
+direct_producer_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 listener_SOURCES=listener.cpp
-listener_LDADD=$(CLIENT_LIB)
+listener_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 declare_queues_SOURCES=declare_queues.cpp
-declare_queues_LDADD=$(CLIENT_LIB)
+declare_queues_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 examples_DATA=               \
 	direct_producer.cpp  \
diff --git a/qpid/cpp/examples/old_api/failover/Makefile.am b/qpid/cpp/examples/old_api/failover/Makefile.am
index 8b1da80..516c362 100644
--- a/qpid/cpp/examples/old_api/failover/Makefile.am
+++ b/qpid/cpp/examples/old_api/failover/Makefile.am
@@ -24,13 +24,13 @@ include $(top_srcdir)/examples/makedist.mk
 noinst_PROGRAMS=declare_queues resuming_receiver replaying_sender
 
 declare_queues_SOURCES=declare_queues.cpp
-declare_queues_LDADD=$(CLIENT_LIB)
+declare_queues_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 resuming_receiver_SOURCES=resuming_receiver.cpp
-resuming_receiver_LDADD=$(CLIENT_LIB)
+resuming_receiver_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 replaying_sender_SOURCES=replaying_sender.cpp
-replaying_sender_LDADD=$(CLIENT_LIB)
+replaying_sender_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 examples_DATA=                \
 	declare_queues.cpp    \
diff --git a/qpid/cpp/examples/old_api/fanout/Makefile.am b/qpid/cpp/examples/old_api/fanout/Makefile.am
index 3ab43b0..797312a 100644
--- a/qpid/cpp/examples/old_api/fanout/Makefile.am
+++ b/qpid/cpp/examples/old_api/fanout/Makefile.am
@@ -26,7 +26,7 @@ fanout_producer_SOURCES=fanout_producer.cpp
 fanout_producer_LDADD=$(CLIENT_LIB)
 
 listener_SOURCES=listener.cpp
-listener_LDADD=$(CLIENT_LIB)
+listener_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 examples_DATA=               \
 	fanout_producer.cpp  \
diff --git a/qpid/cpp/examples/old_api/pub-sub/Makefile.am b/qpid/cpp/examples/old_api/pub-sub/Makefile.am
index 8f42ee0..fc61236 100644
--- a/qpid/cpp/examples/old_api/pub-sub/Makefile.am
+++ b/qpid/cpp/examples/old_api/pub-sub/Makefile.am
@@ -24,10 +24,10 @@ include $(top_srcdir)/examples/makedist.mk
 noinst_PROGRAMS=topic_listener topic_publisher
 
 topic_listener_SOURCES=topic_listener.cpp
-topic_listener_LDADD=$(CLIENT_LIB)
+topic_listener_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 topic_publisher_SOURCES=topic_publisher.cpp
-topic_publisher_LDADD=$(CLIENT_LIB)
+topic_publisher_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 examples_DATA=               \
 	topic_listener.cpp   \
diff --git a/qpid/cpp/examples/old_api/request-response/Makefile.am b/qpid/cpp/examples/old_api/request-response/Makefile.am
index f48762d..92f5bc6 100644
--- a/qpid/cpp/examples/old_api/request-response/Makefile.am
+++ b/qpid/cpp/examples/old_api/request-response/Makefile.am
@@ -24,10 +24,10 @@ include $(top_srcdir)/examples/makedist.mk
 noinst_PROGRAMS=client server
 
 client_SOURCES=client.cpp
-client_LDADD=$(CLIENT_LIB)
+client_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 server_SOURCES=server.cpp
-server_LDADD=$(CLIENT_LIB)
+server_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 examples_DATA=               \
 	server.cpp           \
diff --git a/qpid/cpp/examples/old_api/tradedemo/Makefile.am b/qpid/cpp/examples/old_api/tradedemo/Makefile.am
index 445b15b..a05bbc3 100644
--- a/qpid/cpp/examples/old_api/tradedemo/Makefile.am
+++ b/qpid/cpp/examples/old_api/tradedemo/Makefile.am
@@ -24,13 +24,13 @@ include $(top_srcdir)/examples/makedist.mk
 noinst_PROGRAMS=topic_listener topic_publisher declare_queues
 
 topic_listener_SOURCES=topic_listener.cpp
-topic_listener_LDADD=$(CLIENT_LIB)
+topic_listener_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 topic_publisher_SOURCES=topic_publisher.cpp 
-topic_publisher_LDADD=$(CLIENT_LIB)
+topic_publisher_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 declare_queues_SOURCES=declare_queues.cpp
-declare_queues_LDADD=$(CLIENT_LIB)
+declare_queues_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 
 examples_DATA=               \
diff --git a/qpid/cpp/examples/old_api/xml-exchange/Makefile.am b/qpid/cpp/examples/old_api/xml-exchange/Makefile.am
index 3e1082c..9391806 100644
--- a/qpid/cpp/examples/old_api/xml-exchange/Makefile.am
+++ b/qpid/cpp/examples/old_api/xml-exchange/Makefile.am
@@ -24,13 +24,13 @@ include $(top_srcdir)/examples/makedist.mk
 noinst_PROGRAMS=declare_queues xml_producer listener
 
 declare_queues_SOURCES=declare_queues.cpp
-declare_queues_LDADD=$(CLIENT_LIB)
+declare_queues_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 xml_producer_SOURCES=xml_producer.cpp
-xml_producer_LDADD=$(CLIENT_LIB)
+xml_producer_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 listener_SOURCES=listener.cpp
-listener_LDADD=$(CLIENT_LIB)
+listener_LDADD=$(CLIENT_LIB) -lqpidcommon
 
 EXTRA_DIST=                \
 	README.txt             \
diff --git a/qpid/cpp/examples/qmf-console/Makefile.am b/qpid/cpp/examples/qmf-console/Makefile.am
index f4cbb76..060147e 100644
--- a/qpid/cpp/examples/qmf-console/Makefile.am
+++ b/qpid/cpp/examples/qmf-console/Makefile.am
@@ -25,19 +25,19 @@ include $(top_srcdir)/examples/makedist.mk
 noinst_PROGRAMS=console printevents ping queuestats cluster-qmon
 
 console_SOURCES=console.cpp
-console_LDADD=$(CONSOLE_LIB)
+console_LDADD=$(CONSOLE_LIB) -lqpidcommon -lqpidclient
 
 printevents_SOURCES=printevents.cpp
-printevents_LDADD=$(CONSOLE_LIB)
+printevents_LDADD=$(CONSOLE_LIB) -lqpidcommon -lqpidclient
 
 ping_SOURCES=ping.cpp
-ping_LDADD=$(CONSOLE_LIB)
+ping_LDADD=$(CONSOLE_LIB) -lqpidcommon -lqpidclient
 
 queuestats_SOURCES=queuestats.cpp
-queuestats_LDADD=$(CONSOLE_LIB)
+queuestats_LDADD=$(CONSOLE_LIB) -lqpidcommon -lqpidclient
 
 cluster_qmon_SOURCES=cluster-qmon.cpp
-cluster_qmon_LDADD=$(CONSOLE_LIB)
+cluster_qmon_LDADD=$(CONSOLE_LIB) -lqpidcommon -lqpidclient
 
 examples_DATA= \
 	console.cpp \
diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am
index 5dcc4cd..55ea057 100644
--- a/qpid/cpp/src/Makefile.am
+++ b/qpid/cpp/src/Makefile.am
@@ -145,7 +145,8 @@ libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_MODULE_DIR=\"$(cmoduleexecdir
 
 qpidd_LDADD =					\
   libqpidbroker.la				\
-  libqpidcommon.la
+  libqpidcommon.la              \
+  -lboost_program_options
 
 posix_qpidd_src = posix/QpiddBroker.cpp
 
diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am
index 7c0afc4..f7ba301 100644
--- a/qpid/cpp/src/tests/Makefile.am
+++ b/qpid/cpp/src/tests/Makefile.am
@@ -157,7 +157,7 @@ receiver_SOURCES = \
   receiver.cpp \
   TestOptions.h \
   ConnectionOptions.h
-receiver_LDADD = $(lib_client)
+receiver_LDADD = $(lib_client) -lboost_program_options -lqpidcommon
 
 qpidexectest_PROGRAMS += sender
 sender_SOURCES = \
@@ -165,7 +165,7 @@ sender_SOURCES = \
   TestOptions.h \
   ConnectionOptions.h \
   Statistics.cpp
-sender_LDADD = $(lib_messaging)
+sender_LDADD = $(lib_messaging) -lboost_program_options -lqpidcommon -lqpidtypes -lqpidclient
 
 qpidexectest_PROGRAMS += qpid-receive
 qpid_receive_SOURCES = \
@@ -174,7 +174,7 @@ qpid_receive_SOURCES = \
   ConnectionOptions.h \
   Statistics.h \
   Statistics.cpp
-qpid_receive_LDADD = $(lib_messaging)
+qpid_receive_LDADD = $(lib_messaging) -lboost_program_options -lqpidcommon -lqpidtypes
 
 qpidexectest_PROGRAMS += qpid-send
 qpid_send_SOURCES = \
@@ -183,42 +183,42 @@ qpid_send_SOURCES = \
   ConnectionOptions.h \
   Statistics.h \
   Statistics.cpp
-qpid_send_LDADD = $(lib_messaging)
+qpid_send_LDADD = $(lib_messaging) -lboost_program_options -lqpidcommon -lqpidtypes
 
 qpidexectest_PROGRAMS+=qpid-perftest
 qpid_perftest_SOURCES=qpid-perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h
 qpid_perftest_INCLUDES=$(PUBLIC_INCLUDES)
-qpid_perftest_LDADD=$(lib_client) 
+qpid_perftest_LDADD=$(lib_client) -lboost_program_options -lqpidcommon
 
 qpidexectest_PROGRAMS+=qpid-txtest
 qpid_txtest_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_txtest_SOURCES=qpid-txtest.cpp  TestOptions.h ConnectionOptions.h
-qpid_txtest_LDADD=$(lib_client) 
+qpid_txtest_LDADD=$(lib_client) -lboost_program_options -lqpidcommon
 
 qpidexectest_PROGRAMS+=qpid-latency-test
 qpid_latency_test_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_latency_test_SOURCES=qpid-latency-test.cpp TestOptions.h ConnectionOptions.h
-qpid_latency_test_LDADD=$(lib_client) 
+qpid_latency_test_LDADD=$(lib_client) -lboost_program_options -lqpidcommon 
 
 qpidexectest_PROGRAMS+=qpid-client-test
 qpid_client_test_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_client_test_SOURCES=qpid-client-test.cpp TestOptions.h ConnectionOptions.h
-qpid_client_test_LDADD=$(lib_client) 
+qpid_client_test_LDADD=$(lib_client) -lboost_program_options -lqpidcommon   
 
 qpidexectest_PROGRAMS+=qpid-topic-listener
 qpid_topic_listener_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_topic_listener_SOURCES=qpid-topic-listener.cpp TestOptions.h ConnectionOptions.h
-qpid_topic_listener_LDADD=$(lib_client) 
+qpid_topic_listener_LDADD=$(lib_client) -lboost_program_options -lqpidcommon
 
 qpidexectest_PROGRAMS+=qpid-topic-publisher
 qpid_topic_publisher_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_topic_publisher_SOURCES=qpid-topic-publisher.cpp TestOptions.h ConnectionOptions.h
-qpid_topic_publisher_LDADD=$(lib_client) 
+qpid_topic_publisher_LDADD=$(lib_client) -lboost_program_options -lqpidcommon
 
 qpidexectest_PROGRAMS+=qpid-ping
 qpid_ping_INCLUDES=$(PUBLIC_INCLUDES)
 qpid_ping_SOURCES=qpid-ping.cpp test_tools.h TestOptions.h ConnectionOptions.h
-qpid_ping_LDADD=$(lib_client)
+qpid_ping_LDADD=$(lib_client) -lboost_program_options -lqpidcommon
 
 #
 # Other test programs
diff --git a/qpid/cpp/src/tests/cluster.mk b/qpid/cpp/src/tests/cluster.mk
index 199d1e7..4cf691f 100644
--- a/qpid/cpp/src/tests/cluster.mk
+++ b/qpid/cpp/src/tests/cluster.mk
@@ -97,7 +97,7 @@ cluster_test_SOURCES =				\
 # build and so we need to make sure it is present in the tarball
 EXTRA_DIST += StoreStatus.cpp
 
-cluster_test_LDADD=$(lib_client) $(lib_broker) ../cluster.la -lboost_unit_test_framework
+cluster_test_LDADD=$(lib_client) $(lib_broker) ../cluster.la -lboost_unit_test_framework -lqpidcommon
 
 qpidexectest_SCRIPTS += run_cluster_tests brokertest.py cluster_tests.py cluster_test_logs.py run_long_cluster_tests long_cluster_tests.py testlib.py cluster_tests.fail
 qpidexectest_SCRIPTS += $(CLUSTER_TEST_SCRIPTS_LIST)
diff --git a/qpid/cpp/src/tests/testagent.mk b/qpid/cpp/src/tests/testagent.mk
index 25cf43d..9f53062 100644
--- a/qpid/cpp/src/tests/testagent.mk
+++ b/qpid/cpp/src/tests/testagent.mk
@@ -46,6 +46,6 @@ testagent-testagent.$(OBJEXT): $(TESTAGENT_GEN_SRC)
 qpidexectest_PROGRAMS+=testagent
 testagent_CXXFLAGS=$(CXXFLAGS) -Itestagent_gen
 testagent_SOURCES=testagent.cpp $(TESTAGENT_GEN_SRC)
-testagent_LDADD=$(top_builddir)/src/libqmf.la
+testagent_LDADD=$(top_builddir)/src/libqmf.la -lqpidcommon -lqpidtypes -lqpidclient
 
 EXTRA_DIST+=testagent.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to