On 05/06/2010 08:37 AM, Lionel Sacks wrote:
Hi,
a, hopefully, quick question.
First time trying to build the c++ qpidc-0.6
Working on Ubuntu 8.4, fresh install of boost etc.

Configure and Make proceed with out errors till:
Must remake target `libqpidcommon.la'.

when I get a lot of errors like

`.L2263' referenced in section `.rodata' of qpid/.libs/Url.o: defined in
discarded section `.gnu.linkonce.t._ZN4qpid7AddressC1ERKS0_' of
qpid/.libs/Url.o

for various values of linkonce.t.xxx and then ld exit status 1.

Has anyone any ideas where that may come from? Some incompatible tool or
library?

thanks for any clues.

Lionel.


The symbol it's complaining about is the copy constructor qpid::Address::Address(qpid::Address const&). I suspect the fact that Address has only inline functions is confusing your version of the compiler, I don't see anything wrong in the code itself. Out-lining those function might help, there's no good reason for them to be inline. Try the attached patch, if it solves your problem I'll commit it.
>From eb434bd0101a7daea5c99776746f2a0af956f8f6 Mon Sep 17 00:00:00 2001
From: Alan Conway <acon...@redhat.com>
Date: Thu, 6 May 2010 10:58:15 -0400
Subject: [PATCH] Outline Address functions that don't need to be inline.

Fixes linking problems on some compiler versions.
---
 qpid/cpp/include/qpid/Address.h |    6 +++---
 qpid/cpp/src/qpid/Address.cpp   |    4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/qpid/cpp/include/qpid/Address.h b/qpid/cpp/include/qpid/Address.h
index fe82b21..57cba9b 100755
--- a/qpid/cpp/include/qpid/Address.h
+++ b/qpid/cpp/include/qpid/Address.h
@@ -55,9 +55,9 @@ std::ostream& operator<<(std::ostream& os, const ExampleAddress& a);
  */
 struct Address  {
 public:
-    Address(const Address& a) : value(a.value) {}
-    Address(const TcpAddress& tcp) : value(tcp) {}
-    Address(const ExampleAddress& eg) : value(eg) {} ///<@internal
+    Address(const Address& a);
+    Address(const TcpAddress& tcp);
+    Address(const ExampleAddress& eg); ///<@internal
 
     template <class AddressType> Address& operator=(const AddressType& t) { value=t; return *this; }
 
diff --git a/qpid/cpp/src/qpid/Address.cpp b/qpid/cpp/src/qpid/Address.cpp
index c3f6829..89b2d86 100644
--- a/qpid/cpp/src/qpid/Address.cpp
+++ b/qpid/cpp/src/qpid/Address.cpp
@@ -24,6 +24,10 @@ using namespace std;
 
 namespace qpid {
 
+Address::Address(const Address& a) : value(a.value) {}
+Address::Address(const TcpAddress& tcp) : value(tcp) {}
+Address::Address(const ExampleAddress& eg) : value(eg) {} 
+
 TcpAddress::TcpAddress(const std::string& h, uint16_t p): host(h), port(p) {}
 
 struct AddressOstreamVisitor : public boost::static_visitor<ostream&> {
-- 
1.6.6.1


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscr...@qpid.apache.org

Reply via email to