Why duplicate symbols in 1.0.1 and not 1.0 ???

Brad M. Garcia bgarcia@fore.com
Fri Jan 16 04:54:00 GMT 1998


Many people have mentioned the problem with duplicate symbols on
non-ELF platforms as follows:

    multiple definition of `__default_alloc_template<false, 0>::end_free'
    multiple definition of `__default_alloc_template<false, 0>::start_free'
    multiple definition of `__default_alloc_template<false, 0>::heap_size'
    multiple definition of `__default_alloc_template<false, 0>::free_list'
    etc...

My first question is, why didn't we have this "collision" in 1.0?


Using "-frepo" didn't work in my case - I somehow ended up with some 
_undefined_ symbols (ugly ones, too - they don't actually appear in my
code.  I'm guessing they're somehow generated by -frepo):

    undefined reference to `basic_string<char, string_char_traits<char> >
    * _uninitialized_copy_aux<basic_string<char, string_char_traits<char> > *,
    basic_string<char, string_char_traits<char> > *>(basic_string<char,
    string_char_traits<char> > *, basic_string<char, string_char_traits<char>
    > *, basic_string<char, string_char_traits<char> > *, __false_type)'

    undefined reference to `token * _uninitialized_copy_aux<token *, token
    *>(token *, token *, token *, __false_type)'

    undefined reference to `token * _uninitialized_copy_aux<token const *,
    token *>(token const *, token const *, token *, __false_type)'

My second question is, why doesn't -frepo work in my case?

The only option left for me is explicit template instantiation combined
with -fno-implicit-templates. This defines a *ton* of functions which
never get used.  I'd much rather have multiple definitions of the few
functions I actually use (which I assume is what happens by default on
non-ELF platforms).

Last question - can anyone tell me how to either 1) get rid of the
colliding definitions, or 2) get -frepo to work correctly?

Brad Garcia
   ___/  __ /  __ /  ___/ "Being the Linux of digital media
  __/   /  /  / _/  __/    would be a very good life."
_/    ____/ _/ _| ____/      - Jean-Louis Gassee, CEO of Be, Inc.




More information about the Gcc-bugs mailing list