multiple definition of `std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)'

Loren James Rittle
Tue Apr 30 15:56:00 GMT 2002

> To ensure mainline hasn't regressed too much, today I test-bootstrapped
> that instead of the 3.1-branch and got the following error when building
> an application of our on i386-unknown-freebsd4.5:
>  plan.o: In function `std::__default_alloc_template<(bool)1,
>  plan.o(.text+0x20b6): multiple definition of
>`std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)'
>  grounding.o(.text+0x215a): first defined here
> Any ideas?

Hi Gerald,

I have no guess at the moment.  I bootstrapped gcc mainline last night
on i386-unknown-freebsd4.5 and i386-unknown-freebsd5.0.  No such
messages appear in the testsuite log.  The 4.5 bootstrap was against
binutils 2.12.X taken last Friday; the 5.0 bootstrap was againt
/usr/bin/{as,ld} (basically, FSF 2.12.0 with few local patches).  I am
quickstrapping all my active trees (with a complete rebuild of

OTOH, the testsuite probably doesn't cover your case (two C++ files
linked together).  Small test case?

BTW, do you bootstrap gcc against /usr/bin/{as,ld}?  My current
suggestion on FreeBSD is to use that or binutils 2.12.X (taken from
that branch within the last few days).


More information about the Libstdc++ mailing list