Re: Darwin-dev Digest, Vol 2, Issue 295
Re: Darwin-dev Digest, Vol 2, Issue 295
- Subject: Re: Darwin-dev Digest, Vol 2, Issue 295
- From: Ryan McGann <email@hidden>
- Date: Wed, 28 Dec 2005 13:48:35 -0800
I saw your message on the boost list, but since I think it's a bug in GCC, not in Boost, I'll reply here.
The CVS sources of the boost framework work around this by using an #ifdef to use static versions of the required symbols instead of an anonymous namespace. It would seem as if gcc doesn't coalesce multiple instantiations of templates what are explicitly instantiated inside an anonymous namespace. At least, that's what's happening with boost. I'm not sure how to reproduce this problem without boost, but it drives me nuts when I have to compile our PC team's code which relies on boost. I'd report it to the FSF if I knew where how. Perhaps I'll write a bug in Apple's bugtracker that shows how to reproduce the issue using boost. I'd suggest you do the same, since I may forget ( I'm on vacation :-) )
In the mean time, try using the CVS version of 1.33.1, which includes a workaround. If that's not possible, edit the file boost/bind/placeholders.hpp line 28 to:
#if defined(__BORLANDC__) || defined(__GCC__)
or
#if defined(__BORLANDC__) || defined(__APPLE__)
Ryan
On Dec 28, 2005, at 12:03 PM, email@hidden wrote:
The loader is complaining that some object files have multiply defined
symbols, even though the symbol in question is defined inside an unnamed
(anonymous) namespace and thus should be local to the translation unit
by the C++ standard. I don't get this problem on other systems.
I worked around this with the -m flag to the linker ("This flag's use is
strongly discouraged" says the man page).
Is there a better solution? Is this a known problem?
Details:
The software has not been refreshed recently, so is a little behind:
...
Representative errors:
ld: multiple definitions of symbol boost::test_tools::(anonymous
namespace)::check_is_close
mspathCEntry_test.o definition of boost::test_tools::(anonymous
namespace)::check_is_close in section (__DATA,__data)
ModelBuilder_test.o definition of boost::test_tools::(anonymous
namespace)::check_is_close in section (__DATA,__data)
ld: multiple definitions of symbol boost::test_tools::(anonymous
namespace)::check_is_small
mspathCEntry_test.o definition of boost::test_tools::(anonymous
namespace)::check_is_small in section (__DATA,__data)
ModelBuilder_test.o definition of boost::test_tools::(anonymous
namespace)::check_is_small in section (__DATA,__data)
LinearProduct_test.o definition of boost::test_tools::(anonymous
namespace)::check_is_close in section (__DATA,__data)
LinearProduct_test.o definition of boost::test_tools::(anonymous
namespace)::check_is_small in section (__DATA,__data)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden