Boost logo

Boost Users :

Subject: Re: [Boost-users] [Variant] Odd linker errors that somehow involveboost::variant
From: Charles Milutinovic (kssarh_at_[hidden])
Date: 2009-01-18 20:41:56


Thanks for the replies, sorry for the very belated response.

>From the demangling that steve posted I thought this might somehow involve
the [] operator. After removing every single [] operator from my code
though, I am still getting similar linker errors. This time, the new
section referenced is:

std::_Rb_tree<int, std::pair<int const, boost::variant<int, char, double,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
ACE_Time_Value, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_> >,
std::_Select1st<std::pair<int const, boost::variant<int, char, double,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
ACE_Time_Value, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_> > >,
std::less<int>, std::allocator<std::pair<int const, boost::variant<int,
char, double, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, ACE_Time_Value, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_> > >
>::erase(std::_Rb_tree_iterator<std::pair<int const, boost::variant<int,
char, double, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, ACE_Time_Value, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_> > >,
std::_Rb_tree_iterator<std::pair<int const, boost::variant<int, char,
double, std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, ACE_Time_Value, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_> > >)

I am guessing the problem here is deeper then I thought. Any ideas of
possible solutions to get this to link properly?

RE : Peter

For me, these are hard errors, not just warnings.

On Mon, Jan 12, 2009 at 4:57 PM, <peter_foelsche_at_[hidden]> wrote:

> the same happens to me in case of I link code compiled with -g and other
> code compiled with -O2.
>
> I think it is just a warning that the linker picks up a certain copy of
> code which is available more than once.
>
>
> ------------------------------
>
> *From:* boost-users-bounces_at_[hidden] [mailto:
> boost-users-bounces_at_[hidden]] *On Behalf Of *James Madison
> *Sent:* Monday, January 12, 2009 14:23
> *To:* Boost-users_at_[hidden]
> *Subject:* [Boost-users] [Variant] Odd linker errors that somehow
> involveboost::variant
>
>
>
> [NOTE : this is using boost v1.32. I am forced to use this version]
>
> In the code I am trying to compile I have a boost variant defined as:
>
> boost::variant<int, char, double, std::string, ACE_Time_Value>
>
> and it is used in several different ways. This project compiles and links
> fine using debug settings, essentially the -g flag in gcc, however whenever
> I try to compile without that flag I get the following error, repeated
> hundreds of times:
>
> `.gnu.linkonce.t._ZNSt3mapIiN5boost7variantIicdSs14ACE_Time_ValueNS0_6detail7variant5void_ES5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_EESt4lessIiESaISt4pairIKiS6_EEEixERSA_'
> referenced in section
> `.gnu.linkonce.r._ZNSt3mapIiN5boost7variantIicdSs14ACE_Time_ValueNS0_6detail7variant5void_ES5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_EESt4lessIiESaISt4pairIKiS6_EEEixERSA_'
> of ./src/geneva/infra/messaging/ResponseMsg.o: defined in discarded section
> `.gnu.linkonce.t._ZNSt3mapIiN5boost7variantIicdSs14ACE_Time_ValueNS0_6detail7variant5void_ES5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_EESt4lessIiESaISt4pairIKiS6_EEEixERSA_'
> of ./src/geneva/infra/messaging/ResponseMsg.o
>
> Google is not helping diagnose the problem at all. I am wondering if
> anyone here can point me in the right direction.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net