qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Teira <mte...@tid.es>
Subject Re: qpid (cpp) on solaris + Sun Studio 12
Date Thu, 29 May 2008 11:12:12 GMT
Gordon Sim escribió:
> Manuel Teira wrote:
>   
>> Yes, yes. I'm sorry for feeling the forum with short posts.
>>     
>
> Don't be! Its been very useful and informative.
>   
Thanks for all this kind support. :-)
>   
>> I will try
>> to collect more information to minimize the number of posts. However,
>> after reading that document, I've reached the conclusion that without a
>> binder2nd specialization for mem_fun_ref, this is not going to work
>> (perhaps the gnu STL is providing such a specialization). What I've
>> made, since the boost::bind is already used in some parts of that source
>> code, is to migrate every bind2nd + mem_fun_ref combination to a
>> boost::bind approach, resulting in the following patch:
>>     
>
> I came to the same conclusion, i.e. use boost bind throughout to avoid
> the problem (and for consistency).
>
> I've checked in a change that I think is pretty much identical to your
> patch. Thanks for persevering and helping us improve things!
>   
Actually better, as I wasn't aware that boost::binder was able to handle 
directly the method reference without need of a mem_fun_ref adaptor. It 
is working nice. Thanks a lot.

So, after minor changes here and there (some regarding some needed 
includes in Solaris, some other normalizing some types like u_int_8_t to 
uin8_t, as the formers are not present in solaris headers AFAIK,...) I 
was able to pass all the stages till the daemon linkage. But here, four 
new and dark monsters appeared:

CC -m64 -I/opt/dslap/contrib/include -mt -KPIC -mt -KPIC -o .libs/qpidd 
qpidd.o  -L/opt/dslap/contrib/lib -L/usr/lib/openais 
-L/usr/lib64/openais ./.libs/libqpidbroker.so  ./.libs/libqpidcommon.so 
-lboost_program_options -lboost_filesystem -luuid -library=stlport4 
-R/opt/dslap/contrib/lib
Undefined                       first referenced
 symbol                             in file
const boost::system::error_category&boost::system::get_posix_category() 
qpidd.o  (symbol belongs to implicit dependency 
/opt/dslap/contrib/lib/libboost_system.so)
const boost::system::error_category&boost::system::get_system_category() 
qpidd.o  (symbol belongs to implicit dependency 
/opt/dslap/contrib/lib/libboost_system.so)
qpid::broker::Exchange::Binding::Binding(const std::string &,const 
boost::shared_ptr<qpid::broker::Queue>,qpid::broker::Exchange*,qpid::framing::FieldTable)

./.libs/libqpidbroker.so
std::pair<boost::shared_ptr<qpid::broker::Queue>,bool>qpid::broker::QueueRegistry::declare(const

std::string &,bool,bool,const qpid::broker::OwnershipToken*const) 
./.libs/libqpidbroker.so
ld: fatal: Symbol referencing errors. No output written to .libs/qpidd

The boost related undefined symbols could be easily fixed just providing 
the -lboost_system to the linker. I don't know why this is necessary, as 
libboost_system.so should be linked automatically by 
libboost_filesystem.so, already provided as -lboost_filesystem to the 
linker. After that, two undefined symbols remain:

-bash-3.00$ CC -m64 -I/opt/dslap/contrib/include -mt -KPIC -mt -KPIC -o 
.libs/qpidd qpidd.o  -L/opt/dslap/contrib/lib -L/usr/lib/openais 
-L/usr/lib64/openais ./.libs/libqpidbroker.so  ./.libs/libqpidcommon.so 
-lboost_program_options -lboost_filesystem -lboost_system -luuid 
-library=stlport4 -R/opt/dslap/contrib/lib
Undefined                       first referenced
 symbol                             in file
qpid::broker::Exchange::Binding::Binding(const std::string &,const 
boost::shared_ptr<qpid::broker::Queue>,qpid::broker::Exchange*,qpid::framing::FieldTable)

./.libs/libqpidbroker.so
std::pair<boost::shared_ptr<qpid::broker::Queue>,bool>qpid::broker::QueueRegistry::declare(const

std::string &,bool,bool,const qpid::broker::OwnershipToken*const) 
./.libs/libqpidbroker.so
ld: fatal: Symbol referencing errors. No output written to .libs/qpidd


Looking at the libqpidbroker.so, this is what I've found, regarding 
those two symbols:

For
qpid::broker::Exchange::Binding::Binding(
  const std::string &,
  const boost::shared_ptr<qpid::broker::Queue>,
  qpid::broker::Exchange*,
  qpid::framing::FieldTable)

[Index]   Value          Size        Type  Bind  Other Shndx   Name
[10720] |       1581512|        2436|FUNC |GLOB |0    |10     
|qpid::broker::Exchange::Binding::Binding #Nvariant 1(const std::string 
&,const 
boost::shared_ptr<qpid::broker::Queue>,qpid::broker::Exchange*,qpid::framing::FieldTable)
[7746]  |             0|           0|FUNC |GLOB |0    |UNDEF  
|qpid::broker::Exchange::Binding::Binding(const std::string &,const 
boost::shared_ptr<qpid::broker::Queue>,qpid::broker::Exchange*,qpid::framing::FieldTable)
[12028] |       1581512|        2436|FUNC |GLOB |0    |10     
|qpid::broker::Exchange::Binding::Binding(const std::string 
&,boost::shared_ptr<qpid::broker::Queue>,qpid::broker::Exchange*,qpid::framing::FieldTable)

For
std::pair<boost::shared_ptr<qpid::broker::Queue>,
          bool>
  qpid::broker::QueueRegistry::declare(
    const std::string &,
    bool,
    bool,
    const qpid::broker::OwnershipToken*const)

[9297]  |             0|           0|FUNC |GLOB |0    |UNDEF  
|std::pair<boost::shared_ptr<qpid::broker::Queue>,bool>qpid::broker::QueueRegistry::declare(const

std::string &,bool,bool,const qpid::broker::OwnershipToken*const)
[8975]  |       2223216|        1688|FUNC |GLOB |0    |10     
|std::pair<boost::shared_ptr<qpid::broker::Queue>,bool>qpid::broker::QueueRegistry::declare(const

std::string &,bool,bool,const qpid::broker::OwnershipToken*)


For the first one, thereis a weird (Nvariant#1?) symbol for the const 
boost::shared_ptr<qpid::broker::Queue> second argument, but also an 
undefined one, without that Nvariant. What could be causing this?

For the second one, the symbol for non-const pointer 
qpid::broker::OwnershipToken is defined, but not for the const pointer.

Any idea about what could be causing this?

I was almost touching the executable!!

Regards.
--
Manuel.






Mime
View raw message